mirror of
https://github.com/hoshikawa2/openclaw-oci.git
synced 2026-03-06 10:11:06 +00:00
adjustments
This commit is contained in:
@@ -269,7 +269,12 @@ async def chat_completions(request: Request):
|
||||
if body.get("stream"):
|
||||
return StreamingResponse(
|
||||
fake_stream(text, body["model"]),
|
||||
media_type="text/event-stream"
|
||||
media_type="text/event-stream",
|
||||
headers={
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"X-Accel-Buffering": "no"
|
||||
}
|
||||
)
|
||||
|
||||
return build_openai_response(body["model"], text)
|
||||
@@ -309,7 +314,12 @@ async def responses_passthrough(request: Request):
|
||||
if body.get("stream"):
|
||||
return StreamingResponse(
|
||||
fake_stream(text, body["model"]),
|
||||
media_type="text/event-stream"
|
||||
media_type="text/event-stream",
|
||||
headers={
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"X-Accel-Buffering": "no"
|
||||
}
|
||||
)
|
||||
|
||||
return build_openai_response(body["model"], text)
|
||||
|
||||
Reference in New Issue
Block a user