Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
字节跳动 Seed 2.0 Code 编程模型,专为代码生成与理解优化。
curl https://ai.cubeuaeai.com/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-seed-2.0-code", "messages": [ { "role": "user", "content": "用简单的话解释量子纠缠。" } ] }'
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://ai.cubeuaeai.com/v1" ) response = client.chat.completions.create( model="doubao-seed-2.0-code", messages=[ {"role": "user", "content": "用简单的话解释量子纠缠。"} ] ) print(response.choices[0].message.content)
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://ai.cubeuaeai.com/v1" ) stream = client.chat.completions.create( model="doubao-seed-2.0-code", messages=[ {"role": "user", "content": "写一首关于大海的短诗。"} ], stream=True ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="")
model
doubao-seed-2.0-code
messages
{ role, content }
max_tokens
temperature
0
2
1
stream
false
top_p
stop