Skip to content

Commit 843e891

Browse files
committed
fix model for prediction
1 parent b7a52c2 commit 843e891

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

oneping/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class GenerateRequest(BaseModel):
4141
model: str | None = None
4242
system: str | None = None
4343
prefill: str | None = None
44-
prediction: str | None = None
44+
prediction: dict[str, str] | None = None
4545
max_tokens: int | None = None
4646
history: list[dict[str, str]] | None = None
4747

@@ -60,7 +60,7 @@ class GenerateRequest(BaseModel):
6060
async def chat(genreq: GenerateRequest):
6161
data = genreq.model_dump(exclude_none=True)
6262
patch = patch_payload(data)
63-
if genreq.stream:
63+
if patch.get('stream', False):
6464
ret = stream_api(**kwargs, **patch)
6565
return StreamingResponse(ret, media_type='text/plain')
6666
else:

0 commit comments

Comments
 (0)