mirror of
https://github.com/open-webui/open-webui
synced 2025-06-13 18:02:50 +00:00
refac: use selected model for merge response
This commit is contained in:
parent
7a1e10f3a7
commit
959995c715
@ -653,17 +653,6 @@ async def generate_moa_response(
|
|||||||
detail="Model not found",
|
detail="Model not found",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check if the user has a custom task model
|
|
||||||
# If the user has a custom task model, use that model
|
|
||||||
task_model_id = get_task_model_id(
|
|
||||||
model_id,
|
|
||||||
request.app.state.config.TASK_MODEL,
|
|
||||||
request.app.state.config.TASK_MODEL_EXTERNAL,
|
|
||||||
models,
|
|
||||||
)
|
|
||||||
|
|
||||||
log.debug(f"generating MOA model {task_model_id} for user {user.email} ")
|
|
||||||
|
|
||||||
template = DEFAULT_MOA_GENERATION_PROMPT_TEMPLATE
|
template = DEFAULT_MOA_GENERATION_PROMPT_TEMPLATE
|
||||||
|
|
||||||
content = moa_response_generation_template(
|
content = moa_response_generation_template(
|
||||||
@ -673,7 +662,7 @@ async def generate_moa_response(
|
|||||||
)
|
)
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
"model": task_model_id,
|
"model": model_id,
|
||||||
"messages": [{"role": "user", "content": content}],
|
"messages": [{"role": "user", "content": content}],
|
||||||
"stream": form_data.get("stream", False),
|
"stream": form_data.get("stream", False),
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
Loading…
Reference in New Issue
Block a user