Peke ki ngā ihirangi
CrewAI

Ngā kaiwhakahaere whaiaro, motuhake hoki

Whakamahia a CrewAI me Shannon

Hangaia he LLM CrewAI me te tūāpapa openai/ me te base_url a Shannon; ka rere ngā kaitono, ngā mahi me ngā rōpū i runga i ngā model Shannon.

  • I whakamātauria 7 Noe 2026
  • OpenAI Chat Completions
  • Tata ki te 3 meneti

Mō CrewAI

He anga Python a CrewAI e mahi ai ngā kaitono he tūranga, he whāinga, he taputapu hoki i ngā mahi hei rōpū, i roto rānei i ngā rere e whakahaerehia ana e ngā takahanga. Ka haere tāna akomanga LLM mā LiteLLM, nō reira ka ranea he base URL hototahi-OpenAI hei whakahaere i ngā rōpū i runga i ngā model Shannon.

Ngā mea e hiahiatia ana

He API key Shannon
Ngā kī me te whakamahinga
URL pūtake
https://api.shannon-ai.com/v1 Pito mutunga: /v1/chat/completions
Ka whai ia wāhanga waehere i raro iho i tō kōwhiringa.

Whakaritea

  1. Whakauruhia a CrewAI

    Shell
    pip install crewai
  2. Hangaia te LLM

    Ka kōwhiri te tūāpapa openai/ i te ara hototahi-OpenAI. Tukuna te context_window_size: mō ngā id kāore a CrewAI e mōhio, ka whakaaro ia he 8,192 token.

    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. Whakahaerehia tētahi rōpū me tētahi taputapu

    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())

Tirohia kei te mahi

Tukuna: Whakahaerehia te tauira rōpū.

Me kite koe i: He rerenga kotahi me te huarere i Oslo mai i te taputapu.

Ngā model e hāngai ana ki CrewAI

Ka tutuki i ia id i raro iho ngā hiahia o CrewAI. Ko te tuatahi te taunoa i ngā wāhanga waehere.

Id tauiraMatapihi horopakiOutput nui rawaInput whakaahua
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

Ngā tautuhinga model

Ka tono a CrewAI i ēnei uara. Ka whai rātou i te model i kōwhiria e koe.

TautuhingaUaraHe aha ai
context_window_size 1022976 Mēnā kāore ia, ka whakaaro a CrewAI he 8,192 mō ngā id kāore e mōhiotia.

He pai kia mōhio

  • Mēnā kāore te context_window_size, ka whakatūpato a CrewAI kāore e mōhiotia te matapihi, ā, ka whakaaro he 8,192 token (6,963 ka taea te whakamahi), nō reira ka tapahia wawe ngā mahi roa.
  • Hoatu ki ia kaitono te llm=; ka whakamahi te kaitono kāore he mea i te model OpenAI taunoa a CrewAI, ā, me whai key OpenAI.
  • Ka tuku ngā rōpū me te whakamahere, te mahara rānei i ētahi tono tāpiri; me whai embedder hoki te mahara, kāore a Shannon e tuku.

Ngā tohutohu

  1. Ka whakatepe te max_iter i te maha o ngā hikoinga ka mahia e tētahi kaitono mō tētahi mahi.
  2. Ka aukati te CREWAI_TRACING_ENABLED=false i te whai i ngā rere ki te ratonga a CrewAI.
  3. Whakamahia he ahanoa LLM kotahi mō ia id Shannon, ā, hoatu ngā mea rerekē ki ngā kaitono rerekē.

Te whakatika raruraru

TohuTakeWhakatika
LLM Provider NOT provided Kāore he tūāpapa openai/ i te id model. Tuhia hei openai/<id>.
He 401 e whakahua ana i a OpenAI Kāore he llm a tētahi kaitono, a te kaiwhakamahere rānei, ā, ka whakamahi i te taunoa. Tukuna te llm= ki ngā wāhi katoa, tae atu ki te planning_llm.
401 Unauthorized Kei te ngaro te key, kua hē te pato, kua hurihia rānei. Tāruatia anō te key mai i Keys & usage; ka tīmata ki te sk-.
context_length_exceeded, te karere "prompt is too long" rānei He roa ake te kōrero i te matapihi horopaki o te model. Tīmatahia he kōrerorero hou, tukuna te taputapu kia whakamāmā, kōwhiria rānei he model he nui ake te matapihi.
insufficient_quota Kāore e rawaka tō toenga hei utu i te tono. Tāpiri nama, huri mahere rānei; kāore te tono e ngana anō ko ia anake.

Ngā pātai

Ka mahi a CrewAI me Shannon?

Āe, mā te LLM(model="openai/<id>", base_url="https://api.shannon-ai.com/v1").

Ka mahi ngā taputapu a CrewAI?

Āe; i whakahaerehia e mātou tētahi rōpū i karanga tana kaitono i tētahi taputapu.

Kōwhiria tō reo

He ōrite ngā reo katoa. Kōwhiria te reo e hiahia ana koe ki te whakamahi.

Ūropi

Te Rāwhiti Waenga me Āwherika ki te Raki

Āhia ki te Tonga

Āhia ki te Tonga-ma-Rāwhiti

Āhia ki te Rāwhiti

Āhia Waenga me Kōkahu

Āwherika

Te Moana-nui-a-Kiwa

Reo Hanga me te Reo Tawhito