Skip to content

Commit 01bec90

Browse files
committed
currently stream output is not avail
1 parent 78ec41d commit 01bec90

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ajet/tuner_lib/weight_tuner/experimental/as_oai_model_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ async def chat_completions(request: Request, authorization: str = Header(None)):
237237
# Parse request body
238238
body = await request.json()
239239
new_req = ChatCompletionRequest.model_validate(body)
240-
240+
if new_req.stream:
241+
raise HTTPException(status_code=400, detail="Streaming responses not supported in current AgentJet version, please set `stream=false` for now.")
241242
# Create timeline UUID
242243
timeline_uuid = uuid.uuid4().hex
243244

docs/en/support_agentscope.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ This article introduce the way to convert different types of ways to convert you
4545
model_name="whatever",
4646
client_args={"base_url": base_url},
4747
api_key=api_key,
48+
stream=False,
4849
)
4950
self.agent = ReActAgent(
5051
name="math_react_agent", sys_prompt=system_prompt,
@@ -201,6 +202,7 @@ This article introduce the way to convert different types of ways to convert you
201202
model_name="whatever",
202203
client_args={"base_url": base_url},
203204
api_key=api_key,
205+
stream=False,
204206
)
205207
self.agent = ReActAgent(
206208
name="math_react_agent", sys_prompt=system_prompt,

0 commit comments

Comments
 (0)