# अपने एजेंटों को Magpie के मॉडल पर चलाएँ

> अपना चलाया हुआ Magpie connect करें, अपने Mac पर या किसी public address पर, ताकि आपके एजेंट उसके मॉडल इस्तेमाल कर सकें।

Source: https://air.build/hi/docs/team/use-models-from-magpie/

Magpie एक अलग ऐप है जो gateway के ज़रिए AI मॉडल देता है। अगर आप Magpie चलाते हैं, तो आपके एजेंट उसके मॉडल इस्तेमाल कर सकते हैं: आप इसे एक बार Settings › **Custom Keys** में connect करते हैं, फिर किसी भी एजेंट के लिए Magpie मॉडल चुनते हैं।

Magpie form का हर field और state [Custom Keys](https://air.build/hi/docs/settings/custom-keys/#magpie) में है। यह पेज setup को step-by-step समझाता है।

टीम के एजेंट टीम के owner के AI connections इस्तेमाल करते हैं ([अपनी टीम में लोगों को आमंत्रित करें](https://air.build/hi/docs/team/invite-people/#owner-and-member) देखें), इसलिए Magpie उस टीम के owner के रूप में sign in रहते हुए सेट करें जिसके एजेंटों को इसे इस्तेमाल करना है। AirBuild इसे जाँचता नहीं: Magpie उस account में save होता है जिससे आपने sign in किया है, और यह आपकी owned टीमों के काम आता है। अगर आप किसी टीम के member हैं, owner नहीं, तो उस टीम के एजेंट इसे इस्तेमाल नहीं करेंगे।

## चुनें कि AirBuild Magpie तक कैसे पहुँचे

| **Connection** | कब इस्तेमाल करें | इसे क्या चाहिए |
| --- | --- | --- |
| **Mac Bridge** | Magpie आपके Mac पर चलता है। | AirBuild for Mac, उसी Mac पर जो Magpie चलाता है। वह Mac AirBuild खुला रखकर जागा रहता है, वरना आपके एजेंट Magpie तक नहीं पहुँच सकते। |
| **Direct** | Magpie ऐसी जगह चलता है जहाँ HTTPS से पहुँचा जा सकता है। | उसका public address। cloud टीम किसी private network address तक नहीं पहुँच सकती, जैसे आपके home network का कोई address: आपके Mac पर Magpie के लिए, **Mac Bridge** चुनें। |

## Magpie में gateway key बनाएँ

1. Magpie में, **Settings › Network and sharing** खोलें और **Share on local network** चालू करें।
2. **Gateway › Gateway keys** खोलें और AirBuild के लिए एक key जोड़ें। उसे copy करें।

ये Magpie के अपने labels हैं। Magpie से जुड़ी मदद के लिए, AirBuild के Magpie form में (**Set Up Magpie** के नीचे) **Magpie Guide** button Magpie की guide खोलता है।

**Direct** के लिए, gateway key वैकल्पिक है, लेकिन दोनों ही स्थिति में Magpie की sharing चालू होनी चाहिए। **Mac Bridge** के लिए, key ज़रूरी है।

## AirBuild में Magpie connect करें

**Mac**

Magpie चलाने वाले Mac पर:

1. **Settings** खोलें, sidebar में **Custom Keys** पर click करें, और providers की list में **Magpie** पर click करें।
2. **Connection** के नीचे, **Mac Bridge** चुनें (पहली बार यह पहले से चुना होता है)। जाँचें कि **Port** वही port है जो Magpie इस्तेमाल करता है।
3. key को **Gateway Key** में paste करें।
4. **Save** पर click करें। AirBuild जाँचता है कि Magpie जवाब देता है और key लेता है, फिर form बंद करता है।

इसकी जगह **Direct** के लिए, **Direct** चुनें, **URL** में Magpie का address डालें, अगर key बनाई है तो paste करें, और **Save** पर click करें।

**iPhone**

iPhone और iPad पर आप Magpie सिर्फ़ **Direct** से connect कर सकते हैं। **Mac Bridge** उस Mac पर सेट होता है जो Magpie चलाता है (Mac टैब देखें)।

1. **Settings** खोलें, **Connections** के नीचे **Custom Keys** पर tap करें, और providers की list में **Magpie** पर tap करें।
2. **Connection** के नीचे, **Direct** रहने दें और **URL** में Magpie का address डालें।
3. अगर key बनाई है, तो उसे **Gateway Key** में paste करें।
4. **Save** पर tap करें।

अगर आप यहाँ **Mac Bridge** चुनते हैं जबकि वह किसी Mac पर सेट नहीं है, तो form दिखाता है कि Mac पर क्या करना है, **Get AirBuild for Mac** के साथ, और **Save** धुँधला रहता है।

key आपके account के साथ save होती है और फिर कभी नहीं दिखती। बाद में बदलने के लिए, **Magpie** खोलें और नई key paste करें; save की हुई key रखने के लिए field ख़ाली छोड़ दें।

Magpie save होने के बाद, Custom Keys के नीचे उसकी row दिखाती है कि वह जवाब देता है या नहीं। हर state के लिए [Custom Keys](https://air.build/hi/docs/settings/custom-keys/#magpies-state) देखें।

## किसी एजेंट के लिए Magpie मॉडल चुनें

Magpie के मॉडल अब **Model** list में, **Magpie** के नीचे दिखते हैं:

- किसी एक एजेंट के लिए, उसके editor में Magpie मॉडल चुनें: देखें [चुनें कि एजेंट कौन-सा मॉडल इस्तेमाल करे](https://air.build/hi/docs/agents/choose-an-agents-model/#change-an-agents-model)।
- हर उस एजेंट के लिए जिसका अपना कोई मॉडल नहीं है, उसे [Custom Keys](https://air.build/hi/docs/settings/custom-keys/#default-model) में **Default Model** के रूप में चुनें।

## Magpie हटाएँ

Magpie हटाने से पहले, Magpie मॉडल इस्तेमाल करने वाले एजेंटों को दूसरा मॉडल दें, वरना वे रुक जाते हैं।

1. Settings › **Custom Keys** › **Magpie** खोलें।
2. नीचे बाईं ओर **Remove Magpie** पर tap करें (iPhone और iPad पर, trash)।
3. **Remove** से confirm करें।

सवाल चेतावनी देता है कि Magpie मॉडल पर सेट एजेंट तब तक रुके रहते हैं जब तक उन्हें दूसरा मॉडल न मिले, और gateway key delete हो जाती है।

## जब कुछ गलत हो

ये messages form में तब दिखते हैं जब आप Magpie चलाने वाले Mac पर **Mac Bridge** save करते हैं। **Direct** connection Magpie से संपर्क किए बिना save होता है; फिर Custom Keys में उसकी row दिखाती है कि वह जवाब देता है या नहीं।

| आप क्या देखते हैं | क्या करें |
| --- | --- |
| **Magpie didn't answer. Check that it's running and the address is right.** | Magpie खोलें, और **Port** जाँचें। |
| **This address isn't a Magpie gateway.** | उस port पर कुछ और जवाब देता है। जाँचें कि **Port** Magpie का है। |
| **Magpie only answers apps on this Mac. In Magpie, turn on Settings › Share on local network, then save again.** | Magpie में **Share on local network** चालू करें, फिर फिर से save करें। |
| **Enter a gateway key from Magpie. Your agents reach this Mac's Magpie from outside it, so Magpie asks for one.** | Magpie में gateway key बनाएँ और paste करें। |
| **Magpie didn't accept this gateway key. Check the key and that it's turned on in Magpie.** | Magpie के **Gateway keys** में key जाँचें, या नई बनाएँ। |
| **Magpie's model list couldn't be read. Update Magpie and try again.** | Magpie अपडेट करें, फिर फिर से save करें। |

## सवाल

**Magpie मॉडल पर चल रहे एक एजेंट ने काम करना बंद कर दिया।**

Magpie जवाब नहीं दे रहा। **Mac Bridge** के साथ, Magpie चलाने वाले Mac को जगाएँ और उस पर AirBuild खोलें; **Direct** के साथ, जाँचें कि Magpie अपने address पर चल रहा है। [Custom Keys](https://air.build/hi/docs/settings/custom-keys/#magpies-state) में उसका state बताता है कि क्या गलत है। या एजेंट को दूसरा मॉडल दें।

**मॉडल list कहती है कि Magpie “Offline” है।**

list पढ़ते समय Magpie ने जवाब नहीं दिया। देखें [चुनें कि एजेंट कौन-सा मॉडल इस्तेमाल करे](https://air.build/hi/docs/agents/choose-an-agents-model/#questions)।

**क्या मुझे अपना Mac चालू रखना होगा?**

**Mac Bridge** के साथ, हाँ: जब तक आपके एजेंट इसे इस्तेमाल करते हैं, Magpie चलाने वाला Mac AirBuild खुला रखकर जागा रहता है। **Direct** के साथ, Magpie का बस अपने address पर reachable होना काफ़ी है।
