mirror of
https://github.com/open-webui/open-webui
synced 2025-05-25 07:14:43 +00:00
fix: custom model
This commit is contained in:
parent
06a692282b
commit
24c3f7a664
@ -533,6 +533,9 @@ async def generate_chat_completion(
|
||||
user=Depends(get_verified_user),
|
||||
bypass_filter: Optional[bool] = False,
|
||||
):
|
||||
if BYPASS_MODEL_ACCESS_CONTROL:
|
||||
bypass_filter = True
|
||||
|
||||
idx = 0
|
||||
payload = {**form_data}
|
||||
if "metadata" in payload:
|
||||
@ -545,6 +548,7 @@ async def generate_chat_completion(
|
||||
if model_info:
|
||||
if model_info.base_model_id:
|
||||
payload["model"] = model_info.base_model_id
|
||||
model_id = model_info.base_model_id
|
||||
|
||||
params = model_info.params.model_dump()
|
||||
payload = apply_model_params_to_body_openai(params, payload)
|
||||
|
Loading…
Reference in New Issue
Block a user