ናብ ትሕዝቶ ዝለል
Mastra

Frameworks ከምኡውን SDKs

Mastra ምስ Shannon ተጠቐም

ንagent Mastra ነገር ሞዴል ምስ URL፣ ቁልፊ ከምኡውን id Shannon ሃብ፤ streaming ከምኡውን tools ድሕሪኡ ኣብ ሞዴላት Shannon ይሰርሑ።

  • ዝተፈተነ 7 ሕዳ 2026
  • OpenAI Chat Completions
  • ኣስታት 3 ደቒቕ

ብዛዕባ Mastra

Mastra ማዕቀፍ TypeScript እዩ ንagents፣ workflows፣ ዝክርን ምምላስን፣ ምስ ናይ ቦታ dev studio። Agents ሞዴል ብmodel router ናቱ ይወስዱ፣ ንዝኾነ endpoint ምስ OpenAI ዝሰማማዕ ምስ URL ከምኡውን ቁልፊ ይቕበል። እዚ ንMastra agents ከምኡውን workflows ኣብ ሞዴላት Shannon የሰርሕ።

እንታይ የድልየካ

ናይ Shannon API ቁልፊ
ቁልፍታትን ኣጠቓቕማን
Base URL
https://api.shannon-ai.com/v1 Endpoint: /v1/chat/completions
ኩሎም ኣብ ታሕቲ ዘለዉ ቁራጻት ኮድ ምርጫኻ ይስዕቡ።

ኣዳልዎ

  1. Mastra ኣጽንብር

    Shell
    npm install @mastra/core zod
  2. Agent ኣብ Shannon ፍጠር

    id <any prefix>/<Shannon id> እዩ፤ url base URL እዩ፣ endpoint chat ኣይኮነን።

    TypeScript
    import { Agent } from "@mastra/core/agent";
    import { createTool } from "@mastra/core/tools";
    import { z } from "zod";
    
    const getWeather = createTool({
      id: "get-weather",
      description: "Weather for a city",
      inputSchema: z.object({ city: z.string() }),
      execute: async ({ city }) => ({ weather: `Sunny, 18 C in ${city}` }),
    });
    
    export const agent = new Agent({
      id: "assistant",
      name: "assistant",
      instructions: "Answer briefly. Use tools for weather.",
      model: { id: "shannon/Kimi-K3-uncensored-NVFP4", url: "https://api.shannon-ai.com/v1", apiKey: process.env.SHANNON_API_KEY },
      tools: { getWeather },
    });
  3. Stream ግበር ከምኡውን ፍጠር

    TypeScript
    const stream = await agent.stream("Name three colours a cat can be.");
    for await (const text of stream.textStream) process.stdout.write(text);
    
    const r = await agent.generate("What is the weather in Oslo?");
    console.log(r.text);

ከም ዝሰርሕ ኣረጋግጽ

ልኣኽ: ንናሙና ምስ SHANNON_API_KEY ዝተቐመጠ ኣሰርሕ።

ክትርኢ ዘለካ: እቲ ሕብርታት ይመጹ፣ ድሕሪኡ መልሲ ኩነታት ኣየር ናይ tool ዝጥቀም።

ምስ Mastra ዝሰማምዑ ሞዴላት

ነፍሲ ወከፍ ኣብ ታሕቲ ዘሎ id ነቲ Mastra ዘድልዮ የማልእ። እቲ ቀዳማይ ኣብ ቁራጻት ኮድ ነባሪ እዩ።

ሞዴል idcontext መስኮትዝለዓለ outputስእሊ ኣተዋዕዎ
Kimi-K3-uncensored-NVFP4 1,022,976 262,144 እወ
Kimi-K3-uncensored-3BIT-REAP 225,280 225,280 እወ
shannon-3 196,608 65,536 እወ
shannon-coder-1 131,072 65,536 ኣይፋል

ክትፈልጦ ዘለካ

  • url base URL ብ/v1 ዝውዳእ ክኸውን ኣለዎ፤ Mastra /chat/completions ይወስኽ።
  • ብክንዲኡ /v1/responses ናይ Shannon ንምጥቃም ንነገር ሞዴል api: "responses" ወስኽ።

ምኽርታት

  1. Agents ኣብ ኣብነት Mastra ኣመዝግብ ኣብ ናይ ቦታ studio ንምርኣይ (mastra dev)።
  2. ተመሳሳሊ ነገር ሞዴል ኣብ workflows ከምኡውን memory processors ሞዴል ዝወስዱ ይሰርሕ።
  3. ቁልፊ ኣብ apiKey ኣሕልፍ፣ ንኣብነት ካብ SHANNON_API_KEY፤ ሰነዳት Mastra ንባዕላዊ endpoint ባዕሉ ዘንብቦ variable ስም ኣይጠቅስን።

ጸገማት ምፍታሕ

ምልክትምክንያትፍታሕ
404 Not Found url /v1 ይጎድሎ ወይ ብ/chat/completions ይውዳእ። https://api.shannon-ai.com/v1 ተጠቐም።
401 apiKey ባዶ እዩ። ቁልፊ ኣብ apiKey ኣሕልፍ።
401 Unauthorized እቲ ቁልፊ የለን፣ ብጌጋ ተጻሒፉ ወይ ተቐይሩ። ቁልፊ ካብ ቁልፍታትን ኣጠቓቕማን ደጊምካ ቀዲሕ፤ ብ sk- ይጅምር።
context_length_exceeded ወይ "prompt is too long" ዝብል መልእኽቲ እቲ ዘተ ካብ context window ናይቲ ሞዴል ይነውሕ። ሓድሽ chat ጀምር፣ ነቲ መሳለጥያ ከጥርኖ ፍቐደሉ፣ ወይ ዝዓበየ window ዘለዎ ሞዴል ምረጽ።
insufficient_quota ሚዛንካ ነዚ ጠለብ ንምኽፋል ኣይኣክልን። credit ምላእ ወይ ፕላን ቀይር፤ እቲ ጠለብ ባዕሉ ደጊሙ ኣይፍተንን።

ሕቶታት

Mastra ምስ Shannon ይሰርሕዶ?

እወ፦ ሞዴል agent { id, url, apiKey } ምስ url: "https://api.shannon-ai.com/v1" ናብ Shannon ይበጽሕ።

Tools Mastra ይሰርሑዶ?

እወ፤ tools createTool ከም ቀዳምቲ ጸዋዕታት tools ይለኣኹ።

ቋንቋኻ ምረጽ

ኩሎም ቋንቋታት እኩላት እዮም። እቲ ትደሊ ቋንቋ ምረጽ።

ኤውሮጳ

ማእከላይ ምብራቕን ሰሜን ኣፍሪቃን

ደቡብ ኤስያ

ደቡብ ምብራቕ ኤስያ

ምብራቕ ኤስያ

ማእከላይ ኤስያን ካውካሰስን

ኣፍሪቃ

ኦሽያኒያ

ሰራሕቲን ጥንታውያንን