ናብ ትሕዝቶ ዝለል
Responses API

Responses API

ሓድሽ

POST /v1/responses መምርሕታትን ዝርዝር input items ን ይቕበል ከምኡውን response object ዝተሰርሐ ካብ output items ይመልስ፣ ብቅርጺ OpenAI Responses። ምስ responses API ናይ OpenAI SDK ከምኡውን ምስ መሳርሒታት ኣብኡ ዝተሃንጹ፣ ከም Codex CLI፣ ተጠቐሞ። እቲ endpoint ኩነታት ኣይዕቅብን፦ ኣብ ነፍሲ ወከፍ ጠለብ ምሉእ ዕላል ልኣኽ።

POST https://api.shannon-ai.com/v1/responses

እቲ ዝንእስ ጠለብ id ናይ ሞዴል ከምኡውን ጽሑፍ እዩ። ምላሽ ክሳብ ዘይሓተትካ ኣይውሕዝን።

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1",
)

response = client.responses.create(
    model="shannon-3",
    input="Say hello in one sentence.",
)

print(response.output_text)

እቲ ምላሽ response object እዩ። output ናቱ reasoning፣ እቲ ሞዴል ዝሓሰበ እንተ ኾይኑ፣ ከምኡውን እቲ መልእኽቲ ይሕዝ፦

200 JSON
{
  "id": "resp_5f0c1e7a9b3d4c62a8e1f07d2b46c9a3",
  "object": "response",
  "created_at": 1791625200,
  "model": "shannon-3",
  "status": "completed",
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "metadata": {},
  "parallel_tool_calls": true,
  "temperature": null,
  "tool_choice": "auto",
  "tools": [],
  "top_p": null,
  "output": [
    {
      "id": "rs_8a2e6c1f4b7d4e03b9c5a1d70f3e2b64",
      "type": "reasoning",
      "summary": [
        {
          "type": "summary_text",
          "text": "The user wants a greeting in one sentence. Keep it short and friendly."
        }
      ]
    },
    {
      "id": "msg_1c7b9e3a5d2f4a86b0e4c8d19a6f7e25",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "Hello, it is good to meet you.",
          "annotations": []
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 1184,
    "output_tokens": 46,
    "total_tokens": 1230
  }
}

Request fields

model ከምኡውን input እዮም ጠለብ ዘድልዮም። እቲ ዓምዲ Applied by ሓደ field ምላሽ ዝቕይረሎም ሞዴላት ይሰምዮም። ዝተሃንደሱ open-weight ሞዴላት እቶም ዓሰርተው ክልተ ids ናይ ዝርዝር ሞዴላት እዮም፤ ስድራ Shannon 3 shannon-3፣ shannon-3-pro፣ shannon-3.1 ከምኡውን shannon-3.1-pro እዩ። ሞዴላትን ዋጋን

Field ዓይነት ነባሪ መግለጺ ዝትግብሮ
model string ዘድሊ። id ካብ ዝርዝር ሞዴላት። ዓበይትን ንኣሽቱን ፊደላት ኣይፍለዩን። ጎደሎ ወይ ዘይታተመ id 400 unknown model ይመልስ። ኩሎም ሞዴላት
input string | array string፣ ከም ሓንቲ መልእኽቲ user ዝንበብ፣ ወይ array ናይ input items። ኣብ ታሕቲ Input items ርአ። ኩሎም ሞዴላት
instructions string መምርሕታት ን ሞዴል፣ system prompt ናይዚ ቅርጺ። ዝተሃንደሱ open-weight ሞዴላት፣ shannon-1.6-*፣ shannon-2-*፣ shannon-coder-1
stream boolean false true ነቲ ምላሽ ከም server-sent events ይልእኽ። ኣብ ታሕቲ Streaming ርአ። ኩሎም ሞዴላት
max_output_tokens integer 4096 ላዕለዋይ ወሰን ናይ ምላሽ፣ ብ tokens። ካብ 1 ክሳብ 65,536 ወጻኢ ዝኾነ ዋጋ ናብ እቲ ወሰን ይግባእ። እቲ ጠለብ ክሰርሕ ከሎ ካብ ሚዛንካ ዝተረፈ መጠን እውን እዩ። ኣብ ታሕቲ Output limit ርአ። ዝተሃንደሱ open-weight ሞዴላት፣ shannon-1.6-*፣ shannon-2-*፣ shannon-coder-1
temperature number Sampling temperature። ኣብ ዝተሃንደሱ open-weight ሞዴላት ዋጋታት ኣብ መንጎ 0 ከምኡውን 2 ይዕቀቡ። ዝተሃንደሱ open-weight ሞዴላት፤ shannon-1.6-*፣ shannon-2-* ከምኡውን shannon-coder-1 ኣብ ዘይውሕዙ ምላሻት
top_p number Nucleus sampling። ዋጋታት ኣብ መንጎ 0 ከምኡውን 1 ይዕቀቡ። ዝተሃንደሱ open-weight ሞዴላት
tools array እቶም functions ሞዴል ክጽውዖም ዝኽእል፣ ብጽሩይ ቅርጺ ናይዚ format: {"type": "function", "name", "description", "parameters"}። ኣብ ታሕቲ Tools ርአ። ኩሎም ሞዴላት
tool_choice string | object auto "auto" ሞዴል ባዕሉ ክውስን ይሓድገሉ። "required" tool ክጽውዕ የገድዶ። {"type": "function", "name": "…"} ነቲ tool ክጽውዕ የገድዶ። ዝተሃንደሱ open-weight ሞዴላት
reasoning object {"effort": "…"} ምስ off፣ low፣ medium ወይ high። ዝኾነ ካልእ ዋጋ 400 ይመልስ። ዝተሃንደሱ open-weight ሞዴላት
text object {"format": {…}} JSON መልሲ ይልምን። ኣብ ታሕቲ Structured output ርአ። ኩሎም ደረጃታት Shannon፤ ዝተሃንደሱ open-weight ሞዴላት ከም ኣብ ነፍሲ ወከፍ id ዝተዘርዘሩ

previous_response_id፣ store፣ metadata፣ parallel_tool_calls፣ truncation፣ include፣ user ከምኡውን prompt_cache_key ይቕበሉ፣ ከምኡ ኮድ ናይ client ዝነበረ ብዘይ ለውጢ ይሰርሕ። ምላሽ ኣይቕይሩን። ዕላል ስለ ዘይዕቀብ፣ ዝቕጽል ጠለብ ነቶም ዝሓለፉ turns ኣብ input ይሕዞም።

Input items

ሓደ input item ወይ መልእኽቲ እዩ፣ ምስ role ከምኡውን content፣ ወይ ዓይነት ዘለዎ ኣተዋብ ጥሪ tool ወይ ውጽኢቱ ዝሕዝ። content string ወይ array ናይ ክፋላት እዩ።

ኣተዋብ መግለጺ ዝትግብሮ
{"role": "user", "content": …} እትሓትቶ። content string፣ ወይ ክፋላት input_text ከምኡውን input_image እዩ። ኩሎም ሞዴላት
{"role": "assistant", "content": …} ዝሓለፈ ምላሽ ናይ ሞዴል። content string፣ ወይ ክፋላት output_text እዩ። ኩሎም ሞዴላት
{"role": "system", "content": …}
{"role": "developer", "content": …}
መምርሕታት ኣብ ውሽጢ ዕላል። ዝተሃንደሱ open-weight ሞዴላት
{"type": "function_call", "call_id": "…", "name": "…", "arguments": "…"} ሞዴል ኣብ ዝሓለፈ ምላሽ ዝገበሮ ጥሪ tool። arguments JSON string እዩ። ኩሎም ሞዴላት
{"type": "function_call_output", "call_id": "…", "output": "…"} ውጽኢት ናይቲ ጥሪ። call_id id ናይቲ ጥሪ ከምኡውን output ውጽኢት ከም string እዩ። ኩሎም ሞዴላት

መምርሕታት ኣብ field instructions ኣእቱ። ምስ id ናይ ስድራ Shannon 3፣ ክሕልዉ ዘለዎም መምርሕታት ኣብ መልእኽቲ user ኣእቱ።

እቲ ኣተዋባት ናይ output ናይ ምላሽ ከም ዘለዉ ናብ input ክምለሱ ይኽእሉ፦ ኣተዋባት message ከምኡውን function_call ይንበቡ፣ ኣተዋባት reasoning ይሕለፉ።

ክፋላት content

ክፋል መግለጺ ዝርከበሉ
{"type": "input_text", "text": "…"} ጽሑፍ ናይ መልእኽቲ user። ኩሎም ሞዴላት
{"type": "output_text", "text": "…"} ጽሑፍ ናይ መልእኽቲ assistant። ኩሎም ሞዴላት
{"type": "input_image", "image_url": "…"} ስእሊ፣ ከም URL data: ምስ base64 content ወይ ከም URL http(s)። ስድራ Shannon 3፣ shannon-1.6-lite፣ shannon-1.6-pro፣ ከምኡውን ዝተሃንደሱ open-weight ሞዴላት ኣተዋብ ስእሊ ዝዝርዝሩ
{"type": "input_file", "file_data": "data:application/pdf;base64,…"} ሰነድ (PDF፣ Word፣ PowerPoint ወይ Excel)፦ file_data URL data: ይሕዝ፣ ወይ file_url URL http(s) ይሕዝ። ስድራ Shannon 3

ኣብ ደረጃታት Shannon ስእልታትን ፋይላትን ካብ እቲ ናይ መወዳእታ ኣተዋብ user ናይ input ይንበቡ። መጠናትን ወሰናትን ናቶም ገጽ ኣለዎም። ስእልታትን ፋይላትን

ጠለብ ምስ instructions ከምኡውን options

እዚ ጠለብ instructions፣ ዕላል ከም input items፣ ወሰን output፣ temperature ከምኡውን ደረጃ reasoning effort ይልእኽ። ኩሎም ዝትግብር ዝተሃንደሰ open-weight ሞዴል ይጥቀም።

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1",
)

response = client.responses.create(
    model="DeepSeek-V4-Flash-0731-W4A16-AUTOROUND-REAP",
    instructions="You are a physics teacher. Answer in two sentences.",
    input=[
        {"role": "user", "content": "Why is the sky blue?"},
        {"role": "assistant", "content": "Air scatters blue light more than red light."},
        {"role": "user", "content": "And why are sunsets red?"},
    ],
    max_output_tokens=512,
    temperature=0.3,
    reasoning={"effort": "low"},
)

for item in response.output:
    if item.type == "reasoning":
        print("reasoning:", item.summary[0].text)
    elif item.type == "message":
        print("answer:", item.content[0].text)
print(response.usage)

ምላሽ ናይ ዝተሃንደሰ open-weight ሞዴል id፣ object፣ model፣ created_at፣ status፣ output ከምኡውን usage ኣለዎ። usage ናቱ እቶም ካብ cache ዝተነበቡ tokens ከምኡውን እቶም ኣብ reasoning ዝወዓሉ tokens ይውስኽ፦

200 JSON
{
  "usage": {
    "input_tokens": 58,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 67,
    "output_tokens_details": {
      "reasoning_tokens": 19
    },
    "total_tokens": 125
  }
}

እቲ response object

id፣ object፣ status፣ output ከምኡውን usage ኣብ ነፍሲ ወከፍ ምላሽ ኣለዉ። ኮድካ ኣብዞም ሃንጽ።

Field ዓይነት መግለጺ ዝልእኾ
id string resp_ ድሕሪኡ 32 hexadecimal ፊደላት። ኩሎም ሞዴላት
object string ኩሉ ግዜ response። ኩሎም ሞዴላት
status string completed። ኣብ stream መጀመርታ in_progress እዩ፣ ኣብ event response.failed ድማ failed። ኩሎም ሞዴላት
output array እቶም output items ብትእዛዝ እቲ ሞዴል ዝፈጠሮም፦ reasoning፣ message፣ function_call። ኩሎም ሞዴላት
usage object input_tokens፣ output_tokens ከምኡውን total_tokens። ኩሎም ሞዴላት
usage.input_tokens_details object cached_tokens፦ እቶም ካብ prompt cache ዝተነበቡ input tokens። ዝተሃንደሱ open-weight ሞዴላት
usage.output_tokens_details object reasoning_tokens፦ እቶም ኣብ reasoning ዝወዓሉ output tokens። ዝተሃንደሱ open-weight ሞዴላት
model string እቲ ቀኖናዊ id ናይቲ ዝመለሰ ሞዴል። ስድራ Shannon 3፣ ዝተሃንደሱ open-weight ሞዴላት
created_at integer ግዜ ናይ ምላሽ፣ ብ Unix ሰከንድታት። ስድራ Shannon 3፣ ዝተሃንደሱ open-weight ሞዴላት
instructions, tools, temperature, … instructions፣ tools ከምኡውን temperature ነቲ ጠለብ ይደግሙ። error ከምኡውን incomplete_details null እዮም፣ metadata {} እዩ፣ parallel_tool_calls true እዩ፣ tool_choice auto እዩ ከምኡውን top_p null እዩ። ስድራ Shannon 3

Output items

ኣተዋብ መግለጺ
{"id": "rs_…", "type": "reasoning", "summary": [{"type": "summary_text", "text": "…"}]} reasoning ናይ ሞዴል ከም ሓደ ክፋል summary_text። እቲ ሞዴል ዝሓሰበ እንተ ኾይኑ ጥራይ ይርከብ።
{"id": "msg_…", "type": "message", "role": "assistant", "content": [{"type": "output_text", "text": "…"}]} እቲ መልሲ፦ ሓደ ክፋል output_text ምስ ጽሑፍ።
{"id": "fc_…", "type": "function_call", "call_id": "call_…", "name": "…", "arguments": "…"} ጥሪ tool። arguments JSON string እዩ። ውጽኢቱ ብተመሳሳሊ call_id ተመሊስካ ልኣኽ።

እቶም OpenAI SDKs ጽሑፍ ናይ እቲ መልእኽቲ ኣብ response.output_text ንዓኻ የሕብርዎ።

Streaming

ን server-sent events stream ናብ true ኣዘጋጅ። ነፍሲ ወከፍ frame መስመር event: ምስ ስም event ከምኡውን መስመር data: ምስ JSON object ኣለዎ፤ እቲ object ስም ኣብ type ይደግም። Deltas ብ output_index ምስ ኣተዋቦም ኣዛምድ።

ምስ OpenAI SDK፣ events ብ type ኣንብብ፦

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1",
)

stream = client.responses.create(
    model="shannon-3",
    input="Explain server-sent events in three sentences.",
    stream=True,
)

for event in stream:
    kind = getattr(event, "type", "error")     # an event without a type is an error event
    if kind == "response.reasoning_summary_text.delta":
        pass                                   # a piece of reasoning: event.delta
    elif kind == "response.output_text.delta":
        print(event.delta, end="", flush=True)
    elif kind == "response.output_item.done" and event.item.type == "function_call":
        print("\ntool call:", event.item.name, event.item.arguments)
    elif kind == "response.completed":
        print("\n", event.response.usage)
    elif kind in ("response.failed", "error"):
        raise RuntimeError("the stream failed, send the request again")

እቶም events ብዚ ትእዛዝ ይመጹ። እቶም ጉጅለታት ን reasoning፣ መልእኽቲ ከምኡውን ጥሪታት tool እቲ ምላሽ እንተ ሓዘሎም ጥራይ ይርከቡ።

Event Payload መዓስ
response.created response ኩሉ ግዜ ቀዳማይ። response.status in_progress ከምኡውን response.output ባዶ እዩ።
response.in_progress response ኩሉ ግዜ ካልኣይ፣ ምስ ተመሳሳሊ object።
response.output_item.added output_index, item reasoning ይጅምር፦ ኣተዋብ reasoning ምስ ባዶ summary።
response.reasoning_summary_text.delta output_index, summary_index, delta ቁራጽ ናይ reasoning።
response.reasoning_summary_text.done output_index, summary_index, text reasoning ተወዲኡ፦ እቲ ምሉእ text ናቱ።
response.output_item.done output_index, item እቲ ዝወደአ ኣተዋብ reasoning።
response.output_item.added output_index, item እቲ መልሲ ይጅምር፦ ኣተዋብ message ምስ status in_progress ከምኡውን ብዘይ content።
response.content_part.added output_index, content_index, part ባዶ ክፋል output_text ይኽፈት።
response.output_text.delta output_index, content_index, delta ቁራጽ ናይ መልሲ።
response.output_text.done output_index, content_index, text እቲ መልሲ ተወዲኡ፦ እቲ ምሉእ text ናቱ።
response.content_part.done output_index, content_index, part እቲ ዝወደአ ክፋል output_text።
response.output_item.done output_index, item እቲ ዝወደአ ኣተዋብ message፣ ምስ status completed።
response.output_item.added output_index, item ጥሪ tool ይጅምር፦ ኣተዋብ function_call ምስ call_id፣ name ከምኡውን ባዶ arguments።
response.function_call_arguments.delta output_index, delta እቶም arguments ናይ ጥሪ፣ ኣብ ሓደ delta ምሉእ።
response.function_call_arguments.done output_index, arguments ተመሳሳሊ arguments፣ ከም arguments።
response.output_item.done output_index, item እቲ ዝወደአ ኣተዋብ function_call።
response.completed response ኣብ ዓወት ኩሉ ግዜ መወዳእታ፦ እቲ ምሉእ response object ምስ output ከምኡውን usage።
200 text/event-stream
event: response.created
data: {"type":"response.created","response":{"id":"resp_5f0c…","object":"response","status":"in_progress","output":[], …}}

event: response.in_progress
data: {"type":"response.in_progress","response":{"id":"resp_5f0c…","object":"response","status":"in_progress","output":[], …}}

event: response.output_item.added
data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_1c7b…","type":"message","role":"assistant","status":"in_progress","content":[]}}

event: response.content_part.added
data: {"type":"response.content_part.added","output_index":0,"content_index":0,"part":{"type":"output_text","text":""}}

event: response.output_text.delta
data: {"type":"response.output_text.delta","output_index":0,"content_index":0,"delta":"Server-sent"}

event: response.output_text.delta
data: {"type":"response.output_text.delta","output_index":0,"content_index":0,"delta":" events let a server push text over one HTTP reply."}

event: response.output_text.done
data: {"type":"response.output_text.done","output_index":0,"content_index":0,"text":"Server-sent events let a server push text over one HTTP reply."}

event: response.content_part.done
data: {"type":"response.content_part.done","output_index":0,"content_index":0,"part":{"type":"output_text","text":"Server-sent events let a server push text over one HTTP reply."}}

event: response.output_item.done
data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_1c7b…","type":"message","role":"assistant","status":"completed","content":[{"type":"output_text","text":"Server-sent events let a server push text over one HTTP reply.","annotations":[]}]}}

event: response.completed
data: {"type":"response.completed","response":{"id":"resp_5f0c…","object":"response","status":"completed","output":[…],"usage":{"input_tokens":1190,"output_tokens":18,"total_tokens":1208}, …}}

ዝወድቕ stream

ኣብ ደረጃታት Shannon ዝወደቐ ምላሽ ብ response.failed ኣብ ክንዲ response.completed ይወድእ። response.status ናቱ failed እዩ ከምኡውን response.error code፣ rate_limit_exceeded ወይ server_error፣ ከምኡውን message ይሕዝ።

ኣብ ዝተሃንደሱ open-weight ሞዴላት ውድቀት event error እዩ ምስ code api_error ከምኡውን message። response.completed ግን ድሕሪኡ ይመጽእ።

stream ምስ response.failed ወይ ምስ event error ከም ዝወደቐ ርአዮ፣ ከምኡውን እቲ ጠለብ ደጊምካ ልኣኽ።

Tools

tool function እዩ ኮድካ ዘካይዶ። ኣብ tools ግለጾ፤ እቲ ሞዴል ክደልዮ ከሎ፣ እቲ ምላሽ ኣብ ክንዲ እቲ መልእኽቲ ወይ ጎኒ እቲ መልእኽቲ ኣተዋብ function_call ይሕዝ።

ትርጉም tool ኣብ tools፦

tools
[
  {
    "type": "function",
    "name": "get_weather",
    "description": "Current weather for a city.",
    "parameters": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        }
      },
      "required": [
        "city"
      ]
    }
  }
]

እቲ output ናይ ምላሽ እቲ ዝጽውዖ፦

200 output
[
  {
    "id": "call_3d9a7c1e5b2f4a60c8e1d7f09b24a6c5",
    "type": "function_call",
    "name": "get_weather",
    "call_id": "call_3d9a7c1e5b2f4a60c8e1d7f09b24a6c5",
    "arguments": "{\"city\":\"Paris\"}"
  }
]

እቲ function ኣስርሕ፣ ደሓር እቲ ጠለብ ምስ ጥሪን ውጽኢቱን ናብ input ዝወሰኽካዮ ደጊምካ ልኣኽ፦

input
[
  {
    "role": "user",
    "content": "What is the weather in Paris?"
  },
  {
    "type": "function_call",
    "call_id": "call_3d9a7c1e5b2f4a60c8e1d7f09b24a6c5",
    "name": "get_weather",
    "arguments": "{\"city\":\"Paris\"}"
  },
  {
    "type": "function_call_output",
    "call_id": "call_3d9a7c1e5b2f4a60c8e1d7f09b24a6c5",
    "output": "{\"temperature_c\": 18, \"sky\": \"cloudy\"}"
  }
]

ዓይነት function ጥራይ ይንበብ። ኣብ shannon-1.6-*፣ shannon-2-* ከምኡውን shannon-coder-1 schema parameters ናብ ልሙድ keywords ናይ JSON Schema ይንኣስ፦ oneOf ከም anyOf ይንበብ፣ keywords ከም $ref፣ additionalProperties፣ const፣ default ከምኡውን title ናብ ሞዴል ኣይሓልፉን።

ዋጋታት tool_choice required ከምኡውን ሓደ ዝተሰምየ function ብዝተሃንደሱ open-weight ሞዴላት ይትግበሩ።

እቲ tool loop ብምሉእ ኣብ ናቱ ገጽ ተገሊጹ ኣሎ። ግብር ጥሪ

Structured output

እዚ ቅርጺ structured output ከም text.format ይጽሕፎ። እቲ schema ብቐጥታ ኣብ format ኣሎ፣ ጎኒ name ከምኡውን strict፣ ከም ኣብ Chat Completions ኣብ ትሕቲ ኣባል json_schema ኣይኮነን።

  • {"type": "json_object"} ዝኾነ JSON object ይልምን።
  • {"type": "json_schema", "name", "schema", "strict"} schema ናትካ ዝሰዓበ JSON ይልምን። strict ምስ ዘይሰፈረ true እዩ።
POST /v1/responses
{
  "model": "shannon-1.6-lite",
  "input": "Extract the city and the date: 'The conference opens in Lisbon on 12 May 2027.'",
  "text": {
    "format": {
      "type": "json_schema",
      "name": "event",
      "strict": true,
      "schema": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "description": "ISO 8601 date"
          }
        },
        "required": [
          "city",
          "date"
        ]
      }
    }
  }
}

እቲ JSON ከም ጽሑፍ ኣብ ክፋል output_text ናይ መልእኽቲ ይመጽእ፤ ባዕልኻ parse ግበሮ። ዝተሃንደሰ open-weight ሞዴል ብዘይ structured output 400 ይመልስ።

output_text
{"city": "Lisbon", "date": "2027-05-12"}

እቲ ሞዴል ኣየናይ ቅርጺ ከም ዝቕበል ኣብ ናቱ ገጽ ተዘርዚሩ ኣሎ። የተዋቀረ ውጤት

Reasoning

ዝሓስብ ሞዴል reasoning ናቱ ከም output item ዓይነት reasoning፣ ቅድሚ እቲ መልእኽቲ ይመልስ። ኣብ stream ከም events response.reasoning_summary_text.delta ይመጽእ።

እቶም ዝተሃንደሱ open-weight ሞዴላት reasoning.effort ይትግብሩ፦ off፣ low፣ medium ወይ high፣ ዋላ ሓንቲ ዘይለኣኽካ እንተ ኾይኑ high። off ኣተዋብ reasoning ኣይመልስን። ከም object ልኣኽ፤ ጽሩይ string ኣብዚ endpoint ኣይንበብን።

እቶም effort ኣብ ናይ ባዕሎም ገጽ ተገሊጾም ኣለዉ። Reasoning effort

Output limit

max_output_tokens ኣብ ዘይልኣኽካዮ እዋን 4,096 እዩ። እቲ ጠለብ ክጅምር ከሎ ካብ ሚዛንካ ዝቕመጥ ብዝሒ tokens እዩ፤ ምላሽ ምስ ዝውዳእ፣ እቲ መጠን ብእቲ ጠለብ ዝተጠቀመሉ ይትካእ። ኣብ ዝተረፈ ሚዛንካ ዘይሽፈን ዋጋ 429 Quota exceeded ይመልስ።

ኣብ shannon-1.6-*፣ shannon-2-* ከምኡውን shannon-coder-1 ነውሓት ናይ ምላሽ፣ ኣብ ዝተሃንደሱ open-weight ሞዴላት ድማ ነውሓት ናይ ጽሑፍ መልሲ የገድብ።

ኣብዚ endpoint shannon-coder-1 ከም ኩሎም ካልኦት ሞዴላት ብ tokens ካብ ሚዛንካ ይኽፈል።

body ናይ ጠለብ ክሳብ 32 MiB ክኸውን ይኽእል። ገደባትን ሚዛንን

ጌጋታት

ጌጋታት ናይ OpenAI error body ይጥቀሙ፦ ሓደ error object ምስ type ከምኡውን message፤ ገሊኦም code ከምኡውን param ምስ ዋጋ null ይሕዙ። እቲ ሰንጠረዥ እዚ endpoint ብዙሕ ግዜ ዝመልሶም ይዝርዝር። እቲ ምሉእ ዝርዝር፣ ምስ እንታይ ደጊም ክፍተን ከም ዘለዎ፣ ናቱ ገጽ ኣለዎ። ሓጋይ ኣስተዳደር

Status ዓይነት መልእኽቲ መዓስ
401 authentication_error Missing authentication
Invalid API key
ዝኾነ API key ኣይተላእከን፣ ወይ እቲ ቁልፊ ኣይፍለጥን ወይ ተሰሪዙ።
400 invalid_request_error unknown model: <id> model ጎደሎ ወይ ዝታተመ id ኣይኮነን።
400 invalid_request_error No user message provided. ደረጃታት Shannon፦ input ጽሑፍ ተጠቃሚ የለን።
400 invalid_request_error <id> does not accept image input ስእሊ ናብ ዝተሃንደሰ open-weight ሞዴል ብዘይ ኣተዋብ ስእሊ ተላኢኹ።
400 invalid_request_error <id> does not accept response_format text.format ናብ ዝተሃንደሰ open-weight ሞዴል ብዘይ structured output ተላኢኹ።
400 invalid_request_error unknown reasoning effort '<value>'; expected off, low, medium or high reasoning.effort ካብ ዝርዝር ወጻኢ ዋጋ ይሕዝ።
422 invalid_request_error Failed to deserialize the JSON body into the target type: … እቲ body ቅኑዕ JSON እዩ ግን ሓደ field ጌጋ ዓይነት ኣለዎ።
429 rate_limit_error Quota exceeded. Upgrade your plan at shannon-ai.com/plan max_output_tokens ካብ እቲ ኣብ ሚዛንካ ዝተረፈ ይዓቢ።
429 rate_limit_error Too many requests. Retry in <n>s. Flood protection፦ ኣብ ኣካውንትካ ኣብ ሓደ ደቒቕ ልዕሊ 120 ጠለባት።
500 api_error The model backend failed to answer. Please retry. እቲ ሞዴል ምላሽ ኣይፈጠረን። እቲ ጠለብ ደጊምካ ልኣኽ።
502 api_error The model backend failed to answer. Please retry. ተመሳሳሊ፣ ኣብ ዝተሃንደሱ open-weight ሞዴላት።
504 api_error upstream timed out ሓደ ዝተሃንደሰ open-weight ሞዴል ካብ ግዜ ወሰን ናይ ዘይውሕዝ ምላሽ ንላዕሊ ወሲዱ። ምስ stream ናብ true ዝተዘጋጀ ልኣኽ።