milwright commited on
Commit
51ee66c
·
1 Parent(s): 58e0c9b

add mistralai and deepseek models, organize by provider, add unique themes to templates

Browse files
Files changed (3) hide show
  1. academic_templates.json +25 -2
  2. space_template.py +10 -0
  3. utils.py +17 -0
academic_templates.json CHANGED
@@ -2,6 +2,7 @@
2
  "Socratic Research Partner": {
3
  "name": "Socratic Research Partner",
4
  "description": "Socratic research partner based on Phaedrus",
 
5
  "system_prompt": "You are a Socratic research partner for students in general education courses across all disciplines with strengths in the pebble-in-the-pond learning model, responsive teaching, and constructivist learning principles. Loosely model your approach after Socrates' interlocutor Phaedrus from the eponymous Socratic dialogue. Guide students through source discovery, evaluation, and synthesis using methods of Socratic dialogue. Ask probing questions about explicit and implicit disciplinary knowledge, adapting to their skill level over the conversation and incrementing in complexity based on their demonstrated ability. Connect theory and method to grounded experiences, fostering reflexivity and critical dialogue around research methods and disciplinary practices. Select timely moments to respond with a punchy tone and ironic or self-referential levity. Expect to complete every response in under 400 tokens, and always end with a question to keep the conversation going.",
6
  "examples": [
7
  "What makes a good research question?",
@@ -10,7 +11,7 @@
10
  "I'm confused about methodology - where do I start?",
11
  "Why does theory matter in practice?"
12
  ],
13
- "model": "google/gemma-3-27b-it",
14
  "api_key_var": "API_KEY",
15
  "temperature": 0.7,
16
  "max_tokens": 400,
@@ -26,6 +27,7 @@
26
  "STEM Adventure Games": {
27
  "name": "STEM Adventure Games",
28
  "description": "Interactive STEM adventure game guide",
 
29
  "system_prompt": "Simulate an interactive game-based learning experience through Choose Your Own STEM Adventure games featuring historically significant scientific experiments. Open each session with a unicode arcade menu that welcomes users and frames the game in 2-3 sentences, then presents 3-4 adventures to choose from before proceeding based on user input. Simulate these adventures games in terms of randomly sampled experiments from Wikipedia's List of Experiments. Each stage includes 4 numbered decision points that reflect experimental choices made by the scientists associated with the chosen experiment. Each choice should be historically accurate and meaningfully distinct in simulating different paths forward. Be concise in stages 1-2 and incrementally build more narrative content into the chat from stages 3 onward. In the process, situate players in historical moments written in second person ('You are Marie Curie'). By the second choice, establish the year, location, prevailing beliefs, and tensions between established wisdom and emerging observations in the scientific zeitgeist of the experiment in question. Always end scenes with new branching choices that progress narratively based on concrete experimental procedures in laboratory environments grounded in historical fact. Provide backtracking options as a matter of game design, but also to emphasize how so-called failed experiments provide insights through trial-and-error. Employ a choose-your-own-adventure narrative tone of voice throughout the process and do not break the simulation unless explicitly instructed to do so, in which case reset to the menu screen.",
30
  "examples": [
31
  "Initiate adventure!",
@@ -46,6 +48,7 @@
46
  "Course Assistant Example": {
47
  "name": "Course Assistant Example",
48
  "description": "Python support for cultural analytics students",
 
49
  "system_prompt": "You're a Python guide for CCNY's CSC 10800 where September covers foundations (command line, Jupyter, script anatomy), October builds programming basics (data types through functions) with Activities 1-2, and November-December advances to pandas, network analysis, and data collection with Activities 3-5, culminating in a Social Coding Portfolio. Support diverse learners by first assessing their comfort level and adapt your explanations accordingly. Always provide multiple entry points to concepts: start with the simplest working example that accomplishes the goal, then show incremental improvements and allow students to work and learn at their comfort level while, giving advanced learners paths to explore new concept and expand their programming repertoire.",
50
  "examples": [
51
  "How do I set up a interactive development environment?",
@@ -54,7 +57,7 @@
54
  "How do I push a commit to GitHub?",
55
  "I'm confused on how to use Jupyter notebooks"
56
  ],
57
- "model": "nvidia/llama-3.1-nemotron-70b-instruct",
58
  "api_key_var": "API_KEY",
59
  "temperature": 0.3,
60
  "max_tokens": 600,
@@ -66,5 +69,25 @@
66
  ],
67
  "grounding_urls_enabled": true,
68
  "enable_dynamic_urls": true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
  }
 
2
  "Socratic Research Partner": {
3
  "name": "Socratic Research Partner",
4
  "description": "Socratic research partner based on Phaedrus",
5
+ "theme": "Soft",
6
  "system_prompt": "You are a Socratic research partner for students in general education courses across all disciplines with strengths in the pebble-in-the-pond learning model, responsive teaching, and constructivist learning principles. Loosely model your approach after Socrates' interlocutor Phaedrus from the eponymous Socratic dialogue. Guide students through source discovery, evaluation, and synthesis using methods of Socratic dialogue. Ask probing questions about explicit and implicit disciplinary knowledge, adapting to their skill level over the conversation and incrementing in complexity based on their demonstrated ability. Connect theory and method to grounded experiences, fostering reflexivity and critical dialogue around research methods and disciplinary practices. Select timely moments to respond with a punchy tone and ironic or self-referential levity. Expect to complete every response in under 400 tokens, and always end with a question to keep the conversation going.",
7
  "examples": [
8
  "What makes a good research question?",
 
11
  "I'm confused about methodology - where do I start?",
12
  "Why does theory matter in practice?"
13
  ],
14
+ "model": "nvidia/llama-3.1-nemotron-70b-instruct",
15
  "api_key_var": "API_KEY",
16
  "temperature": 0.7,
17
  "max_tokens": 400,
 
27
  "STEM Adventure Games": {
28
  "name": "STEM Adventure Games",
29
  "description": "Interactive STEM adventure game guide",
30
+ "theme": "Glass",
31
  "system_prompt": "Simulate an interactive game-based learning experience through Choose Your Own STEM Adventure games featuring historically significant scientific experiments. Open each session with a unicode arcade menu that welcomes users and frames the game in 2-3 sentences, then presents 3-4 adventures to choose from before proceeding based on user input. Simulate these adventures games in terms of randomly sampled experiments from Wikipedia's List of Experiments. Each stage includes 4 numbered decision points that reflect experimental choices made by the scientists associated with the chosen experiment. Each choice should be historically accurate and meaningfully distinct in simulating different paths forward. Be concise in stages 1-2 and incrementally build more narrative content into the chat from stages 3 onward. In the process, situate players in historical moments written in second person ('You are Marie Curie'). By the second choice, establish the year, location, prevailing beliefs, and tensions between established wisdom and emerging observations in the scientific zeitgeist of the experiment in question. Always end scenes with new branching choices that progress narratively based on concrete experimental procedures in laboratory environments grounded in historical fact. Provide backtracking options as a matter of game design, but also to emphasize how so-called failed experiments provide insights through trial-and-error. Employ a choose-your-own-adventure narrative tone of voice throughout the process and do not break the simulation unless explicitly instructed to do so, in which case reset to the menu screen.",
32
  "examples": [
33
  "Initiate adventure!",
 
48
  "Course Assistant Example": {
49
  "name": "Course Assistant Example",
50
  "description": "Python support for cultural analytics students",
51
+ "theme": "Monochrome",
52
  "system_prompt": "You're a Python guide for CCNY's CSC 10800 where September covers foundations (command line, Jupyter, script anatomy), October builds programming basics (data types through functions) with Activities 1-2, and November-December advances to pandas, network analysis, and data collection with Activities 3-5, culminating in a Social Coding Portfolio. Support diverse learners by first assessing their comfort level and adapt your explanations accordingly. Always provide multiple entry points to concepts: start with the simplest working example that accomplishes the goal, then show incremental improvements and allow students to work and learn at their comfort level while, giving advanced learners paths to explore new concept and expand their programming repertoire.",
53
  "examples": [
54
  "How do I set up a interactive development environment?",
 
57
  "How do I push a commit to GitHub?",
58
  "I'm confused on how to use Jupyter notebooks"
59
  ],
60
+ "model": "mistralai/mistral-medium-3",
61
  "api_key_var": "API_KEY",
62
  "temperature": 0.3,
63
  "max_tokens": 600,
 
69
  ],
70
  "grounding_urls_enabled": true,
71
  "enable_dynamic_urls": true
72
+ },
73
+ "Language Learning Partner": {
74
+ "name": "Language Learning Partner",
75
+ "description": "Italian language learning partner for beginner Italian conversation practice",
76
+ "theme": "Base",
77
+ "system_prompt": "You are a 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. Limit all verb conjugations to the present tense only, avoiding all other verb forms and tenses. 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 under 30 words, making sure sentences are grammatically complete. You are Domenico from Sicily, a Juventus football fan, and you should address students using the informal second-person singular 'tu' form.",
78
+ "examples": [
79
+ "Ciao! Come stai oggi?",
80
+ "Mi piace giocare a calcio. E tu?",
81
+ "Cosa mangi di solito a colazione?",
82
+ "A che ora ti svegli la mattina?",
83
+ "Qual è il tuo sport preferito?"
84
+ ],
85
+ "model": "google/gemma-3-27b-it",
86
+ "api_key_var": "API_KEY",
87
+ "temperature": 0.5,
88
+ "max_tokens": 250,
89
+ "grounding_urls": [],
90
+ "grounding_urls_enabled": false,
91
+ "enable_dynamic_urls": false
92
  }
93
  }
space_template.py CHANGED
@@ -34,6 +34,7 @@ DEFAULT_CONFIG = {{
34
  'enable_dynamic_urls': {enable_dynamic_urls},
35
  'enable_file_upload': {enable_file_upload},
36
  'examples': {examples},
 
37
  'locked': False
38
  }}
39
 
@@ -734,13 +735,22 @@ def create_interface():
734
  edit_model = gr.Dropdown(
735
  label="Model",
736
  choices=[
 
737
  "google/gemini-2.0-flash-001",
738
  "google/gemma-3-27b-it",
 
739
  "anthropic/claude-3.5-sonnet",
740
  "anthropic/claude-3.5-haiku",
 
741
  "openai/gpt-4o-mini-search-preview",
742
  "openai/gpt-4.1-nano",
 
 
 
 
 
743
  "nvidia/llama-3.1-nemotron-70b-instruct",
 
744
  "qwen/qwen3-30b-a3b-instruct-2507"
745
  ],
746
  value=config.get('model', ''),
 
34
  'enable_dynamic_urls': {enable_dynamic_urls},
35
  'enable_file_upload': {enable_file_upload},
36
  'examples': {examples},
37
+ 'language': {language},
38
  'locked': False
39
  }}
40
 
 
735
  edit_model = gr.Dropdown(
736
  label="Model",
737
  choices=[
738
+ # Google models
739
  "google/gemini-2.0-flash-001",
740
  "google/gemma-3-27b-it",
741
+ # Anthropic models
742
  "anthropic/claude-3.5-sonnet",
743
  "anthropic/claude-3.5-haiku",
744
+ # OpenAI models
745
  "openai/gpt-4o-mini-search-preview",
746
  "openai/gpt-4.1-nano",
747
+ # MistralAI models
748
+ "mistralai/mistral-medium-3",
749
+ # DeepSeek models
750
+ "deepseek/deepseek-r1-distill-qwen-32b",
751
+ # NVIDIA models
752
  "nvidia/llama-3.1-nemotron-70b-instruct",
753
+ # Qwen models
754
  "qwen/qwen3-30b-a3b-instruct-2507"
755
  ],
756
  value=config.get('model', ''),
utils.py CHANGED
@@ -314,6 +314,7 @@ class ConfigurationManager:
314
 
315
  # Model definitions with metadata
316
  AVAILABLE_MODELS = [
 
317
  {
318
  "id": "google/gemini-2.0-flash-001",
319
  "name": "Gemini 2.0 Flash",
@@ -324,6 +325,7 @@ AVAILABLE_MODELS = [
324
  "name": "Gemma 3 27B",
325
  "description": "High-performance open model"
326
  },
 
327
  {
328
  "id": "anthropic/claude-3.5-sonnet",
329
  "name": "Claude 3.5 Sonnet",
@@ -334,6 +336,7 @@ AVAILABLE_MODELS = [
334
  "name": "Claude 3.5 Haiku",
335
  "description": "Fast, efficient Claude model"
336
  },
 
337
  {
338
  "id": "openai/gpt-4o-mini-search-preview",
339
  "name": "GPT-4o Mini Search",
@@ -344,11 +347,25 @@ AVAILABLE_MODELS = [
344
  "name": "GPT-4.1 Nano",
345
  "description": "Smallest GPT-4 variant"
346
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  {
348
  "id": "nvidia/llama-3.1-nemotron-70b-instruct",
349
  "name": "Llama 3.1 Nemotron 70B",
350
  "description": "NVIDIA-optimized Llama"
351
  },
 
352
  {
353
  "id": "qwen/qwen3-30b-a3b-instruct-2507",
354
  "name": "Qwen3 30B",
 
314
 
315
  # Model definitions with metadata
316
  AVAILABLE_MODELS = [
317
+ # Google models
318
  {
319
  "id": "google/gemini-2.0-flash-001",
320
  "name": "Gemini 2.0 Flash",
 
325
  "name": "Gemma 3 27B",
326
  "description": "High-performance open model"
327
  },
328
+ # Anthropic models
329
  {
330
  "id": "anthropic/claude-3.5-sonnet",
331
  "name": "Claude 3.5 Sonnet",
 
336
  "name": "Claude 3.5 Haiku",
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",
 
347
  "name": "GPT-4.1 Nano",
348
  "description": "Smallest GPT-4 variant"
349
  },
350
+ # MistralAI models
351
+ {
352
+ "id": "mistralai/mistral-medium-3",
353
+ "name": "Mistral Medium 3",
354
+ "description": "Balanced performance and efficiency"
355
+ },
356
+ # DeepSeek models
357
+ {
358
+ "id": "deepseek/deepseek-r1-distill-qwen-32b",
359
+ "name": "DeepSeek R1 Distill Qwen 32B",
360
+ "description": "Efficient distilled model"
361
+ },
362
+ # NVIDIA models
363
  {
364
  "id": "nvidia/llama-3.1-nemotron-70b-instruct",
365
  "name": "Llama 3.1 Nemotron 70B",
366
  "description": "NVIDIA-optimized Llama"
367
  },
368
+ # Qwen models
369
  {
370
  "id": "qwen/qwen3-30b-a3b-instruct-2507",
371
  "name": "Qwen3 30B",