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
2025-02-17 15:24:21 -08:00
committed by GitHub
5 changed files with 7 additions and 7 deletions

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