Spaces:
Running
Running
milwright
commited on
Commit
·
bd13718
1
Parent(s):
5a8d72d
add another model; improve link grounding
Browse files- space_template.py +2 -1
- utils.py +5 -0
space_template.py
CHANGED
@@ -428,7 +428,7 @@ Get your API key at: https://openrouter.ai/keys"""
|
|
428 |
system_content += f"\\n\\nIMPORTANT: You must respond EXCLUSIVELY in {{LANGUAGE}}. All your responses should be written entirely in {{LANGUAGE}}, even when user input is in a different language, particularly English."
|
429 |
|
430 |
if grounding_context:
|
431 |
-
system_content += "\\n\\nIMPORTANT: When providing information from the reference sources below, please cite the specific URL(s) where the information can be found."
|
432 |
system_content = f"{{system_content}}\\n\\n{{grounding_context}}"
|
433 |
if file_context:
|
434 |
system_content = f"{{system_content}}\\n\\n{{file_context}}"
|
@@ -767,6 +767,7 @@ def create_interface():
|
|
767 |
"anthropic/claude-3.5-sonnet",
|
768 |
"anthropic/claude-3.5-haiku",
|
769 |
# OpenAI models
|
|
|
770 |
"openai/gpt-4o-mini-search-preview",
|
771 |
"openai/gpt-oss-120b",
|
772 |
# MistralAI models
|
|
|
428 |
system_content += f"\\n\\nIMPORTANT: You must respond EXCLUSIVELY in {{LANGUAGE}}. All your responses should be written entirely in {{LANGUAGE}}, even when user input is in a different language, particularly English."
|
429 |
|
430 |
if grounding_context:
|
431 |
+
system_content += "\\n\\nIMPORTANT: When providing information from the reference sources below, please cite the specific URL(s) where the information can be found. Format citations as plain URLs without brackets, or use markdown link format like [text](url). Never use hard brackets like 【url】 as they break the links."
|
432 |
system_content = f"{{system_content}}\\n\\n{{grounding_context}}"
|
433 |
if file_context:
|
434 |
system_content = f"{{system_content}}\\n\\n{{file_context}}"
|
|
|
767 |
"anthropic/claude-3.5-sonnet",
|
768 |
"anthropic/claude-3.5-haiku",
|
769 |
# OpenAI models
|
770 |
+
"openai/gpt-4o-mini",
|
771 |
"openai/gpt-4o-mini-search-preview",
|
772 |
"openai/gpt-oss-120b",
|
773 |
# MistralAI models
|
utils.py
CHANGED
@@ -337,6 +337,11 @@ AVAILABLE_MODELS = [
|
|
337 |
"description": "Fast, efficient Claude model"
|
338 |
},
|
339 |
# OpenAI models
|
|
|
|
|
|
|
|
|
|
|
340 |
{
|
341 |
"id": "openai/gpt-4o-mini-search-preview",
|
342 |
"name": "GPT-4o Mini Search",
|
|
|
337 |
"description": "Fast, efficient Claude model"
|
338 |
},
|
339 |
# OpenAI models
|
340 |
+
{
|
341 |
+
"id": "openai/gpt-4o-mini",
|
342 |
+
"name": "GPT-4o Mini",
|
343 |
+
"description": "Fast, cost-effective GPT-4o variant"
|
344 |
+
},
|
345 |
{
|
346 |
"id": "openai/gpt-4o-mini-search-preview",
|
347 |
"name": "GPT-4o Mini Search",
|