Àwọn agent ti ara ẹni àti agent aládàáṣe
Lo Agno pẹ̀lú Shannon
Fún àwọn agent Agno ní model OpenAILike pẹ̀lú base URL àti key Shannon; àwọn tool, streaming àti ẹgbẹ́ yóò sì ṣiṣẹ́ lórí àwọn model Shannon.
- A dán an wò 7 Oṣù Bélú 2026
- OpenAI Chat Completions
- Nǹkan bí ìṣẹ́jú 2
Nípa Agno
Agno jẹ́ Python framework fún kíkọ́ àwọn agent, ẹgbẹ́ àwọn agent àti àwọn service tó yí wọn ká, pẹ̀lú ìrántí, knowledge àti àwọn tool. Class model OpenAILike rẹ̀ ń bá endpoint èyíkéyìí tó bá OpenAI mu sọ̀rọ̀, nítorí náà àwọn agent Agno lè ṣiṣẹ́ lórí àwọn model Shannon.
Ohun tí o nílò
- API key Shannon kan
- Àwọn key àti ìlò
- Base URL
-
https://api.shannon-ai.com/v1Endpoint:/v1/chat/completions - Gbogbo àpẹẹrẹ code nísàlẹ̀ ń tẹ̀lé àṣàyàn rẹ.
Ṣètò rẹ̀
-
Fi Agno sori ẹrọ
Shellpip install agno openai -
Ṣẹ̀dá agent kan lórí Shannon
Pythonfrom agno.agent import Agent from agno.models.openai.like import OpenAILike model = OpenAILike(id="Kimi-K3-uncensored-NVFP4", base_url="https://api.shannon-ai.com/v1", api_key="YOUR_API_KEY") def get_weather(city: str) -> str: """Weather for a city.""" return f"Sunny, 18 C in {city}" agent = Agent(model=model, tools=[get_weather]) agent.print_response("What is the weather in Oslo?", stream=True)
Ṣàyẹ̀wò pé ó ń ṣiṣẹ́
Fi ránṣẹ́: Ṣe àpẹẹrẹ náà.
Ó yẹ kí o rí: Ìdáhùn tí a ń stream tó ń lo èsì tool fún Oslo.
Àwọn model tó bá Agno mu
Id kọ̀ọ̀kan nísàlẹ̀ bá ohun tí Agno nílò mu. Èyí àkọ́kọ́ ni a ń lò ní ìbẹ̀rẹ̀ nínú àwọn àpẹẹrẹ code.
| Id model | Context window | Output tó pọ̀ jù | Input àwòrán |
|---|---|---|---|
Kimi-K3-uncensored-NVFP4 | 1,022,976 | 262,144 | Bẹ́ẹ̀ni |
Kimi-K3.1-Pro-uncensored-NVFP4 | 1,022,976 | 262,144 | Bẹ́ẹ̀ni |
MiMo-V2.6-Pro-uncensored-NVFP4 | 1,022,976 | 131,072 | Bẹ́ẹ̀ni |
Kimi-K3-uncensored-3BIT-REAP | 225,280 | 225,280 | Bẹ́ẹ̀ni |
shannon-3 | 196,608 | 65,536 | Bẹ́ẹ̀ni |
Ó dára láti mọ̀
- Lo
OpenAILike, kì í ṣeOpenAIChat:OpenAIChatń ro àwọn orúkọ model àti àwọn àṣàyàn OpenAI fúnra rẹ̀. - Àwọn ẹ̀yà ìrántí àti knowledge nílò embedder fún ìwádìí vector; Shannon kò pèsè embeddings.
print_responseń fi ìronú model hàn nínú àpótí lọ́tọ̀ lókè ìdáhùn nígbà tí model bá dá ìronú padà, bí àwọn model Shannon ti ń ṣe.
Àwọn ìmọ̀ràn
- Àwọn Python function lásán pẹ̀lú type hint àti docstring ń ṣiṣẹ́ bí àwọn tool.
agent.run(...)ń dá response object padà;.contentni ó ní ọ̀rọ̀ náà.- Àwọn ẹgbẹ́ ń gba model object kan náà fún gbogbo ọmọ ẹgbẹ́.
Ìyanjú ìṣòro
| Àmì àìsàn | Ohun tó fà á | Ojútùú |
|---|---|---|
404 Not Found | base_url kò ní /v1. | Lo https://api.shannon-ai.com/v1. |
401 | A kò fi key kankan ránṣẹ́ àti OPENAI_API_KEY ṣófo. | Fi api_key= ránṣẹ́ sí OpenAILike. |
401 Unauthorized | Key náà kò sí, a tẹ̀ ẹ́ ní àṣìṣe, tàbí a ti pààrọ̀ rẹ̀. | Daakọ key náà padà láti Àwọn key àti ìlò; ó bẹ̀rẹ̀ pẹ̀lú sk-. |
context_length_exceeded tàbí ìfiránṣẹ́ "prompt is too long" | Ìjíròrò náà gùn ju context window ti model lọ. | Bẹ̀rẹ̀ chat tuntun, jẹ́ kí tool náà kó o pọ̀, tàbí yan model tí window rẹ̀ tóbi jù. |
insufficient_quota | Balance rẹ kò tó láti sanwó fún ìbéèrè náà. | Fi credit kún un tàbí yí plan padà; ìbéèrè náà kò ní tún ara rẹ̀ gbìyànjú fúnra rẹ̀. |
Àwọn ìbéèrè
Ṣé Agno ń ṣiṣẹ́ pẹ̀lú Shannon?
Bẹ́ẹ̀ ni, nípasẹ̀ OpenAILike(base_url="https://api.shannon-ai.com/v1").
Ṣé àwọn tool Agno ń ṣiṣẹ́?
Bẹ́ẹ̀ ni; a ṣe agent kan tó pe Python tool.