From 7653c37aec85c8dedf7219981f5038131caf5b4e Mon Sep 17 00:00:00 2001 From: "ark-hand[bot]" <315378070+ark-hand[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 22:22:11 +0800 Subject: [PATCH] fix(examples): use versioned Seed 2.1 Pro model ID Sync-Source-Commit: 6094eec300f4d6da881e41ef6e1f78f5b99ba215 Ark-APIs-Commit: 99ec1eeb10274c8924ef526863c09dd4a374a5e3 Hand-Written-Reason: Manual example update (versioned Seed 2.1 Pro model ID). No ark-apis regeneration involved; attributed to the same ark-apis snapshot as parent 6d3231a. --- README.md | 20 ++++++++++---------- examples/agents.py | 2 +- examples/chat/completions.py | 2 +- examples/chat/function_call.py | 2 +- examples/chat/reasoning_completions.py | 2 +- examples/chat/structured_output.py | 2 +- examples/chat/vision_completions.py | 2 +- examples/responses/async_create.py | 14 +++++++------- examples/responses/async_doubao_app.py | 4 ++-- examples/responses/async_video.py | 4 ++-- examples/sessions_loop.py | 2 +- examples/tokenization.py | 2 +- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index af7b3ab..129b16a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ from arkruntime import Ark client = Ark() response = client.responses.create( - model=os.environ.get("ARK_MODEL", "doubao-seed-1-6"), + model=os.environ.get("ARK_MODEL", "doubao-seed-2-1-pro-260628"), input="Explain how large language models work in three sentences.", ) print(response.output_text) @@ -43,7 +43,7 @@ from arkruntime import Ark client = Ark() completion = client.chat.completions.create( - model=os.environ.get("ARK_MODEL", "doubao-seed-1-6"), + model=os.environ.get("ARK_MODEL", "doubao-seed-2-1-pro-260628"), messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Write a haiku about programming."}, @@ -65,7 +65,7 @@ from arkruntime import Ark client = Ark() stream = client.responses.create( - model=os.environ.get("ARK_MODEL", "doubao-seed-1-6"), + model=os.environ.get("ARK_MODEL", "doubao-seed-2-1-pro-260628"), input="Count from 1 to 10 slowly.", stream=True, ) @@ -82,7 +82,7 @@ from arkruntime import Ark client = Ark() stream = client.chat.completions.create( - model=os.environ.get("ARK_MODEL", "doubao-seed-1-6"), + model=os.environ.get("ARK_MODEL", "doubao-seed-2-1-pro-260628"), messages=[{"role": "user", "content": "Count from 1 to 10 slowly."}], stream=True, ) @@ -104,7 +104,7 @@ client = AsyncArk() async def main(): response = await client.responses.create( - model=os.environ.get("ARK_MODEL", "doubao-seed-1-6"), + model=os.environ.get("ARK_MODEL", "doubao-seed-2-1-pro-260628"), input="Explain quantum computing briefly.", ) print(response.output_text) @@ -123,7 +123,7 @@ from arkruntime import Ark client = Ark() completion = client.chat.completions.create( - model=os.environ.get("ARK_MODEL", "doubao-seed-1-6"), + model=os.environ.get("ARK_MODEL", "doubao-seed-2-1-pro-260628"), messages=[ { "role": "user", @@ -164,7 +164,7 @@ tools = [ ] completion = client.chat.completions.create( - model=os.environ.get("ARK_MODEL", "doubao-seed-1-6"), + model=os.environ.get("ARK_MODEL", "doubao-seed-2-1-pro-260628"), messages=[{"role": "user", "content": "What is the weather in Beijing?"}], tools=tools, ) @@ -205,7 +205,7 @@ client = Ark() try: client.chat.completions.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", messages=[{"role": "user", "content": "Hello"}], ) except ArkRateLimitError: @@ -253,7 +253,7 @@ Per-request overrides are also supported: ```python client.chat.completions.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", messages=[{"role": "user", "content": "Hello"}], timeout=30.0, ) @@ -269,7 +269,7 @@ from arkruntime import Ark client = Ark(timeout=24 * 3600) result = client.batch.chat.completions.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", messages=[{"role": "user", "content": "Hello"}], ) print(result) diff --git a/examples/agents.py b/examples/agents.py index 0d4df49..7ef633f 100644 --- a/examples/agents.py +++ b/examples/agents.py @@ -3,7 +3,7 @@ Runs against the outward /api/v3/agents endpoint. export ARK_API_KEY=... - export ARK_MODEL_ID=doubao-seed-1-8-251228 # or whatever you have access to + export ARK_MODEL_ID=doubao-seed-2-1-pro-260628 # or whatever you have access to python examples/agents.py """ diff --git a/examples/chat/completions.py b/examples/chat/completions.py index d234d59..219b10e 100644 --- a/examples/chat/completions.py +++ b/examples/chat/completions.py @@ -14,7 +14,7 @@ # To get your ak&sk, please refer to this document(https://www.volcengine.com/docs/6291/65568) # For more information,please check this document(https://www.volcengine.com/docs/82379/1263279) client = Ark() -MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-1-6") +MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-2-1-pro-260628") if __name__ == "__main__": diff --git a/examples/chat/function_call.py b/examples/chat/function_call.py index a2c180a..423c1c6 100644 --- a/examples/chat/function_call.py +++ b/examples/chat/function_call.py @@ -13,7 +13,7 @@ # Authentication # 1.If you authorize your endpoint using an API key, you can set your api key to environment variable "ARK_API_KEY" client = Ark() -MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-1-6") +MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-2-1-pro-260628") WEATHER_TOOL = { "type": "function", diff --git a/examples/chat/reasoning_completions.py b/examples/chat/reasoning_completions.py index 0285bbd..46e184d 100644 --- a/examples/chat/reasoning_completions.py +++ b/examples/chat/reasoning_completions.py @@ -5,7 +5,7 @@ # Authentication # 1.If you authorize your endpoint using an API key, you can set your api key to environment variable "ARK_API_KEY" client = Ark() -MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-1-6") +MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-2-1-pro-260628") if __name__ == "__main__": # Streaming: diff --git a/examples/chat/structured_output.py b/examples/chat/structured_output.py index 6592e80..d2d907b 100644 --- a/examples/chat/structured_output.py +++ b/examples/chat/structured_output.py @@ -18,7 +18,7 @@ # Authentication # 1.If you authorize your endpoint using an API key, you can set your api key to environment variable "ARK_API_KEY" client = Ark() -MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-1-6") +MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-2-1-pro-260628") class MeetingInfo(BaseModel): diff --git a/examples/chat/vision_completions.py b/examples/chat/vision_completions.py index 4ce4b52..0907b74 100644 --- a/examples/chat/vision_completions.py +++ b/examples/chat/vision_completions.py @@ -6,7 +6,7 @@ # 1.If you authorize your endpoint using an API key, you can set your api key to environment variable "ARK_API_KEY" # or specify api key by Ark(api_key="${YOUR_API_KEY}"). client = Ark() -MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-1-6") +MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-2-1-pro-260628") # Image input: response = client.chat.completions.create( diff --git a/examples/responses/async_create.py b/examples/responses/async_create.py index b84c15c..c8f636a 100644 --- a/examples/responses/async_create.py +++ b/examples/responses/async_create.py @@ -28,7 +28,7 @@ async def main(): # ---------- 第 1 轮 ---------- # 说明:开启 caching,store=True 表示把对话存储在服务端,以便后续引用 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", input=[ { "role": "system", @@ -61,7 +61,7 @@ async def main(): # ---------- 第 2 轮 ---------- # 说明:通过 previous_response_id 关联上一轮的上下文 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", previous_response_id=response_id, input=[ {"role": "user", "content": "上一轮对话里图里的内容是"}, @@ -83,7 +83,7 @@ async def main(): # ---------- 第 1 轮 ---------- # 用户询问北京天气,模型会触发工具调用 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", input=[ {"role": "user", "content": "请问北京今天天气怎么样"}, ], @@ -126,7 +126,7 @@ async def main(): # ---------- 第 2 轮 ---------- # 把函数返回结果传回模型,让它继续生成最终回答 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", previous_response_id=response_id, input=[ { @@ -149,7 +149,7 @@ async def main(): # ========================================================== print("Example 3: Use responses API for web search") stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", input=[ {"role": "user", "content": "今天的新闻"}, ], @@ -178,7 +178,7 @@ async def main(): # ---------- 第 1 轮 ---------- # 用户询问repo信息,模型会触发mcp工具调用 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", input=[ { "role": "user", @@ -213,7 +213,7 @@ async def main(): # ---------- 第 2 轮 ---------- # 用户同意mcp工具调用,模型会继续生成最终回答 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", input=[ { "type": "mcp_approval_response", diff --git a/examples/responses/async_doubao_app.py b/examples/responses/async_doubao_app.py index 9cdbd09..d08e0e8 100644 --- a/examples/responses/async_doubao_app.py +++ b/examples/responses/async_doubao_app.py @@ -19,7 +19,7 @@ async def main(): # ---------- 第 1 轮 ---------- # 选择一种feature 测试 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", input=[ {"role": "user", "content": "你好请你介绍你自己"}, ], @@ -48,7 +48,7 @@ async def main(): # ---------- 第 2 轮 ---------- # 说明:通过 previous_response_id 关联上一轮的上下文 stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", previous_response_id=response_id, input=[ {"role": "user", "content": "上一轮对话里我们说了什么"}, diff --git a/examples/responses/async_video.py b/examples/responses/async_video.py index 6a3f910..253072e 100644 --- a/examples/responses/async_video.py +++ b/examples/responses/async_video.py @@ -61,7 +61,7 @@ async def main() -> None: # ========================================================== print("\nTurn 1: ask the model to analyze the video frame-by-frame") stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", input=[ {"role": "system", "content": "你是豆包,是由字节跳动开发的 AI 人工智能助手"}, { @@ -87,7 +87,7 @@ async def main() -> None: # ========================================================== print("\nTurn 2: follow-up referencing prior turn's response") stream = await client.responses.create( - model="doubao-seed-1-6", + model="doubao-seed-2-1-pro-260628", previous_response_id=response_id, input=[ {"role": "user", "content": "上一轮对话里视频里的内容是"}, diff --git a/examples/sessions_loop.py b/examples/sessions_loop.py index 14f0e98..9e9cb48 100644 --- a/examples/sessions_loop.py +++ b/examples/sessions_loop.py @@ -15,7 +15,7 @@ examples/sessions_loop/main.go 1:1. export ARK_API_KEY=... - export ARK_MODEL_ID=doubao-seed-2-1-pro + export ARK_MODEL_ID=doubao-seed-2-1-pro-260628 python examples/sessions_loop.py """ diff --git a/examples/tokenization.py b/examples/tokenization.py index fe17d0c..cf5c329 100644 --- a/examples/tokenization.py +++ b/examples/tokenization.py @@ -3,7 +3,7 @@ from arkruntime import Ark client = Ark() -MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-1-6") +MODEL = os.environ.get("ENDPOINT_ID", "doubao-seed-2-1-pro-260628") print("----- tokenization request -----") resp = client.tokenization.create(