Tlola ho ea ho litaba
CrewAI

Li-agent tsa botho le tse ikemetseng

Sebelisa CrewAI le Shannon

Etsa LLM ea CrewAI e nang le sehlooho sa openai/ le base_url ea Shannon; li-moemeli, mesebetsi le lihlopha li ntan'o sebetsa ho li-model tsa Shannon.

  • E lekiloe 2026 Pun 7
  • OpenAI Chat Completions
  • Metsotso e ka bang 3

Mabapi le CrewAI

CrewAI ke foreimiwekhi ea Python moo li-moemeli tse nang le likarolo, lipakane le lisebelisoa li sebetsang mesebetsing e le sehlopha, kapa ka hare ho li-flow tse tsamaisoang ke liketsahalo. Sehlopha sa eona sa LLM se feta ka LiteLLM, kahoo base URL e lumellanang le OpenAI e lekane ho tsamaisa lihlopha ho li-model tsa Shannon.

Seo u se hlokang

Senotlolo sa API sa Shannon
Linotlolo le tšebeliso
Base URL
https://api.shannon-ai.com/v1 Endpoint: /v1/chat/completions
Snippet e 'ngoe le e 'ngoe e ka tlase e latela khetho ea hau.

E hlophise

  1. Kenya CrewAI

    Shell
    pip install crewai
  2. Etsa LLM

    Sehlooho sa openai/ se khetha tsela e lumellanang le OpenAI. Fetisa context_window_size: bakeng sa li-id tseo CrewAI e sa li tsebeng, ho seng joalo e nka li-token tse 8,192.

    Python
    from crewai import LLM
    
    llm = LLM(
        model="openai/Kimi-K3-uncensored-NVFP4",
        base_url="https://api.shannon-ai.com/v1",
        api_key="YOUR_API_KEY",
        context_window_size=1022976,
    )
    print(llm.call("Name three colours a cat can be."))
  3. Tsamaisa sehlopha se nang le sesebelisoa

    Python
    from crewai import Agent, Task, Crew
    from crewai.tools import tool
    
    @tool("get_weather")
    def get_weather(city: str) -> str:
        """Weather for a city."""
        return f"Sunny, 18 C in {city}"
    
    reporter = Agent(role="Weather reporter", goal="Report the weather", backstory="You check the weather tool.",
                     llm=llm, tools=[get_weather], max_iter=3)
    task = Task(description="What is the weather in Oslo? Use the tool.", expected_output="One sentence.", agent=reporter)
    print(Crew(agents=[reporter], tasks=[task]).kickoff())

Hlahloba hore e a sebetsa

Romela: Tsamaisa sampole ea sehlopha.

U lokela ho bona: Polelo e le 'ngoe e nang le boemo ba leholimo ba Oslo bo tsoang sesebelisoa.

Li-model tse loketseng CrewAI

Id e 'ngoe le e 'ngoe e ka tlase e khotsofatsa seo CrewAI e se hlokang. Ea pele ke default ho li-snippet.

Id ea modelFensetere ea contextTsoa e kholo ka ho fetisisaKenyo ea setšoantšo
Kimi-K3-uncensored-NVFP4 1,022,976 262,144 E
Kimi-K3.1-Pro-uncensored-NVFP4 1,022,976 262,144 E
MiMo-V2.6-Pro-uncensored-NVFP4 1,022,976 131,072 E
Kimi-K3-uncensored-3BIT-REAP 225,280 225,280 E
shannon-3 196,608 65,536 E

Li-setting tsa model

CrewAI e kopa boleng bona. Bo itšetlehile ka model eo u e khethileng.

TlhophisoBolengHobaneng
context_window_size 1022976 CrewAI e nka 8,192 bakeng sa li-id tse sa tsejoeng ntle le eona.

Ho molemo ho tseba

  • Ntle le context_window_size, CrewAI e lemosa hore window ha e tsejoe mme e nka li-token tse 8,192 (tse 6,963 tse ka sebelisoang), kahoo mesebetsi e telele e khutsufatsoa kapele.
  • Fa moemeli e mong le e mong llm=; moemeli ea se nang eona o sebelisa model ea default ea OpenAI ea CrewAI mme o hloka senotlolo sa OpenAI.
  • Lihlopha tse nang le moralo kapa memori li romela likopo tse eketsehileng; memori e boetse e hloka embedder, eo Shannon e sa e sebeletseng.

Malebela

  1. max_iter e fokotsa hore na moemeli a nka mehato e kae mosebetsing.
  2. CREWAI_TRACING_ENABLED=false e thibela hore lipalo li latelloe ho tšebeletso ea CrewAI.
  3. Sebelisa ntho e le 'ngoe ea LLM ka id ea Shannon mme u fe li-moemeli tse sa tšoaneng tse sa tšoaneng.

Ho rarolla mathata

MatšoaoLebakaTokiso
LLM Provider NOT provided Id ea model ha e na sehlooho sa openai/. E ngole e le openai/<id>.
401 e buang ka OpenAI Moemeli kapa moralo ha o na llm mme o sebelisa ea default. Fetisa llm= hohle, ho kenyeletsa le planning_llm.
401 Unauthorized Senotlolo ha se eo, se ngotsoe hampe kapa se fetotsoe. Kopitsa senotlolo hape ho tsoa ho Keys & usage; se qala ka sk-.
context_length_exceeded / “prompt is too long” Puisano e telele ho feta window ea model. Qala chat e ncha, tlohela tool e e compact, kapa khetha model e nang le window e kholoanyane.
insufficient_quota Balance ea hau e ke ke ea lefella kopo. Eketsa credit kapa fetola plan; kopo ha e lekoe hape ka boeona.

Lipotso

Na CrewAI e sebetsa le Shannon?

Ee, ka LLM(model="openai/<id>", base_url="https://api.shannon-ai.com/v1").

Na lisebelisoa tsa CrewAI lia sebetsa?

Ee; re tsamaisitse sehlopha seo moemeli oa sona a ileng a bitsa sesebelisoa.

Kgetha puo ya hao

Dipuo tsohle di lekana. Kgetha eo o batlang ho e sebedisa ha o bala.

Yuropa

Middle East le Afrika Leboea

Asia Boroa

Asia Boroa-Botjhabela

Asia Botjhabela

Asia e Bohareng le Caucasus

Afrika

Oceania

Lipuo tse Entsoeng le tsa Khale