mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-28 01:31:28 +00:00
Update main.py
Co-authored-by: Parker Wahle <52430642+regulad@users.noreply.github.com>
This commit is contained in:
parent
4b9443b3f3
commit
93186ba02c
1 changed files with 4 additions and 1 deletions
|
|
@ -1954,7 +1954,10 @@ async def generate_messages(
|
|||
# Convert Anthropic payload to OpenAI format
|
||||
requested_model = form_data.get('model', '')
|
||||
|
||||
openai_payload = convert_anthropic_to_openai_payload(form_data)
|
||||
try:
|
||||
openai_payload = convert_anthropic_to_openai_payload(form_data)
|
||||
except (ValueError, NotImplementedError) as e:
|
||||
raise HTTPException(status_code=400, detail=str(e))
|
||||
|
||||
# Route through the existing chat_completion handler
|
||||
response = await chat_completion(request, openai_payload, user)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue