Spaces:
Running
Running
Upload 4 files
Browse files- README.md +1 -1
- app.py +4 -3
- config.json +1 -1
README.md
CHANGED
@@ -42,7 +42,7 @@ AI Italian conversation partner
|
|
42 |
Your Space should now be running! Try the example prompts or ask your own questions.
|
43 |
|
44 |
## Configuration
|
45 |
-
- **Model**:
|
46 |
- **API Key Variable**: API_KEY
|
47 |
- **HF Token Variable**: HF_TOKEN (for auto-updates)
|
48 |
- **Access Control**: Enabled (ACCESS_CODE)
|
|
|
42 |
Your Space should now be running! Try the example prompts or ask your own questions.
|
43 |
|
44 |
## Configuration
|
45 |
+
- **Model**: openai/gpt-oss-120b
|
46 |
- **API Key Variable**: API_KEY
|
47 |
- **HF Token Variable**: HF_TOKEN (for auto-updates)
|
48 |
- **Access Control**: Enabled (ACCESS_CODE)
|
app.py
CHANGED
@@ -22,7 +22,7 @@ DEFAULT_CONFIG = {
|
|
22 |
'system_prompt': "You are Domenico from Sicily, a Juventus football fan, native Italian speaker serving as a conversational partner for university students in an Italian 101 class. Students will interact and converse with you in Italian, and you must respond EXCLUSIVELY IN ITALIAN without providing English translations, using vocabulary appropriate for beginner-level Italian 101 students. Focus your responses on topics suitable for beginners such as sports, daily life, routines, food, numbers, and hobbies. When students make errors, model the correct forms naturally in your response without explicitly pointing out mistakes, allowing them to learn through exposure to proper usage. Recognize when students demonstrate more advanced abilities and adjust your language complexity accordingly, while ensuring your Italian remains error-free. Keep all responses between 5-50 words, making sure sentences are grammatically complete. Limit all verb conjugations to the present tense only, avoiding all other verb forms and tenses. Address students using the informal second-person singular 'tu' form.",
|
23 |
'temperature': 0.5,
|
24 |
'max_tokens': 250,
|
25 |
-
'model': '
|
26 |
'api_key_var': 'API_KEY',
|
27 |
'theme': 'Default',
|
28 |
'grounding_urls': ["https://www.pnac.org/wp-content/uploads/Italian-Study-Guide.pdf"],
|
@@ -423,7 +423,7 @@ Get your API key at: https://openrouter.ai/keys"""
|
|
423 |
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."
|
424 |
|
425 |
if grounding_context:
|
426 |
-
system_content += "\n\nIMPORTANT: When providing information from the reference sources below, please cite the specific URL(s) where the information can be found."
|
427 |
system_content = f"{system_content}\n\n{grounding_context}"
|
428 |
if file_context:
|
429 |
system_content = f"{system_content}\n\n{file_context}"
|
@@ -762,8 +762,9 @@ def create_interface():
|
|
762 |
"anthropic/claude-3.5-sonnet",
|
763 |
"anthropic/claude-3.5-haiku",
|
764 |
# OpenAI models
|
|
|
765 |
"openai/gpt-4o-mini-search-preview",
|
766 |
-
"openai/gpt-
|
767 |
# MistralAI models
|
768 |
"mistralai/mistral-medium-3",
|
769 |
# DeepSeek models
|
|
|
22 |
'system_prompt': "You are Domenico from Sicily, a Juventus football fan, native Italian speaker serving as a conversational partner for university students in an Italian 101 class. Students will interact and converse with you in Italian, and you must respond EXCLUSIVELY IN ITALIAN without providing English translations, using vocabulary appropriate for beginner-level Italian 101 students. Focus your responses on topics suitable for beginners such as sports, daily life, routines, food, numbers, and hobbies. When students make errors, model the correct forms naturally in your response without explicitly pointing out mistakes, allowing them to learn through exposure to proper usage. Recognize when students demonstrate more advanced abilities and adjust your language complexity accordingly, while ensuring your Italian remains error-free. Keep all responses between 5-50 words, making sure sentences are grammatically complete. Limit all verb conjugations to the present tense only, avoiding all other verb forms and tenses. Address students using the informal second-person singular 'tu' form.",
|
23 |
'temperature': 0.5,
|
24 |
'max_tokens': 250,
|
25 |
+
'model': 'openai/gpt-oss-120b',
|
26 |
'api_key_var': 'API_KEY',
|
27 |
'theme': 'Default',
|
28 |
'grounding_urls': ["https://www.pnac.org/wp-content/uploads/Italian-Study-Guide.pdf"],
|
|
|
423 |
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."
|
424 |
|
425 |
if grounding_context:
|
426 |
+
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."
|
427 |
system_content = f"{system_content}\n\n{grounding_context}"
|
428 |
if file_context:
|
429 |
system_content = f"{system_content}\n\n{file_context}"
|
|
|
762 |
"anthropic/claude-3.5-sonnet",
|
763 |
"anthropic/claude-3.5-haiku",
|
764 |
# OpenAI models
|
765 |
+
"openai/gpt-4o-mini",
|
766 |
"openai/gpt-4o-mini-search-preview",
|
767 |
+
"openai/gpt-oss-120b",
|
768 |
# MistralAI models
|
769 |
"mistralai/mistral-medium-3",
|
770 |
# DeepSeek models
|
config.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
"tagline": "AI Italian conversation partner",
|
4 |
"description": "AI Italian conversation partner",
|
5 |
"system_prompt": "You are Domenico from Sicily, a Juventus football fan, native Italian speaker serving as a conversational partner for university students in an Italian 101 class. Students will interact and converse with you in Italian, and you must respond EXCLUSIVELY IN ITALIAN without providing English translations, using vocabulary appropriate for beginner-level Italian 101 students. Focus your responses on topics suitable for beginners such as sports, daily life, routines, food, numbers, and hobbies. When students make errors, model the correct forms naturally in your response without explicitly pointing out mistakes, allowing them to learn through exposure to proper usage. Recognize when students demonstrate more advanced abilities and adjust your language complexity accordingly, while ensuring your Italian remains error-free. Keep all responses between 5-50 words, making sure sentences are grammatically complete. Limit all verb conjugations to the present tense only, avoiding all other verb forms and tenses. Address students using the informal second-person singular 'tu' form.",
|
6 |
-
"model": "
|
7 |
"language": "Italian",
|
8 |
"api_key_var": "API_KEY",
|
9 |
"temperature": 0.5,
|
|
|
3 |
"tagline": "AI Italian conversation partner",
|
4 |
"description": "AI Italian conversation partner",
|
5 |
"system_prompt": "You are Domenico from Sicily, a Juventus football fan, native Italian speaker serving as a conversational partner for university students in an Italian 101 class. Students will interact and converse with you in Italian, and you must respond EXCLUSIVELY IN ITALIAN without providing English translations, using vocabulary appropriate for beginner-level Italian 101 students. Focus your responses on topics suitable for beginners such as sports, daily life, routines, food, numbers, and hobbies. When students make errors, model the correct forms naturally in your response without explicitly pointing out mistakes, allowing them to learn through exposure to proper usage. Recognize when students demonstrate more advanced abilities and adjust your language complexity accordingly, while ensuring your Italian remains error-free. Keep all responses between 5-50 words, making sure sentences are grammatically complete. Limit all verb conjugations to the present tense only, avoiding all other verb forms and tenses. Address students using the informal second-person singular 'tu' form.",
|
6 |
+
"model": "openai/gpt-oss-120b",
|
7 |
"language": "Italian",
|
8 |
"api_key_var": "API_KEY",
|
9 |
"temperature": 0.5,
|