mirror of
https://github.com/open-webui/open-webui
synced 2024-12-29 07:12:07 +00:00
fix
This commit is contained in:
parent
866c3dff11
commit
403262d764
@ -2037,8 +2037,7 @@ async def generate_chat_completions(
|
|||||||
# Using /ollama/api/chat endpoint
|
# Using /ollama/api/chat endpoint
|
||||||
form_data = convert_payload_openai_to_ollama(form_data)
|
form_data = convert_payload_openai_to_ollama(form_data)
|
||||||
response = await generate_ollama_chat_completion(
|
response = await generate_ollama_chat_completion(
|
||||||
request=request,
|
request=request, form_data=form_data, user=user, bypass_filter=bypass_filter
|
||||||
form_data=form_data, user=user, bypass_filter=bypass_filter
|
|
||||||
)
|
)
|
||||||
if form_data.stream:
|
if form_data.stream:
|
||||||
response.headers["content-type"] = "text/event-stream"
|
response.headers["content-type"] = "text/event-stream"
|
||||||
@ -2050,9 +2049,7 @@ async def generate_chat_completions(
|
|||||||
return convert_response_ollama_to_openai(response)
|
return convert_response_ollama_to_openai(response)
|
||||||
else:
|
else:
|
||||||
return await generate_openai_chat_completion(
|
return await generate_openai_chat_completion(
|
||||||
request=request,
|
request=request, form_data=form_data, user=user, bypass_filter=bypass_filter
|
||||||
|
|
||||||
form_data, user=user, bypass_filter=bypass_filter
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user