Merge pull request #10209 from i-infra/iinf/fix-for-openrouter

[fix] no unambiguous indexing on "owned_by" - fix OpenRouter.ai
This commit is contained in:
Timothy Jaeryang Baek authored and GitHub committed 2025-02-17 15:24:21 -08:00
commit a5fa1cd835
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -800,7 +800,7 @@ async def process_chat_payload(request, form_data, metadata, user, model):
# Workaround for Ollama 2.0+ system prompt issue
# TODO: replace with add_or_update_system_message
if model["owned_by"] == "ollama":
if model.get("owned_by") == "ollama":
form_data["messages"] = prepend_to_first_user_message_content(
rag_template(
request.app.state.config.RAG_TEMPLATE, context_string, prompt