gabejavitt commited on
Commit
368e45d
·
verified ·
1 Parent(s): 33fcec5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -92,11 +92,12 @@ class CodeInput(BaseModel):
92
  def code_interpreter(code: str) -> str:
93
  """
94
  Executes a string of Python code and returns its stdout, stderr, and any error.
95
- Use for calculations, data manipulation (pandas), logic puzzles, file processing.
96
  CRITICAL RULES:
97
  1. ALWAYS use print() to output your final answer.
98
  2. Write simple, focused code. One task per execution.
99
  3. Add comments (#) to explain your logic.
 
100
  Available: pandas as pd, basic Python libraries.
101
  """
102
  if not isinstance(code, str):
@@ -772,11 +773,11 @@ Your goal: Provide the EXACT answer in the EXACT format requested.
772
  self.llm_with_tools = ChatGroq(
773
  temperature=0,
774
  groq_api_key=GROQ_API_KEY,
775
- model_name="openai/gpt-oss-120b", # <-- Use the powerful model
776
  max_tokens=4096,
777
  timeout=60
778
  ).bind_tools(self.tools)
779
- print("✅ Main LLM (openai/gpt-oss-120b with tools) initialized.")
780
 
781
  except Exception as e:
782
  print(f"❌ Error initializing Groq: {e}")
 
92
  def code_interpreter(code: str) -> str:
93
  """
94
  Executes a string of Python code and returns its stdout, stderr, and any error.
95
+ ...
96
  CRITICAL RULES:
97
  1. ALWAYS use print() to output your final answer.
98
  2. Write simple, focused code. One task per execution.
99
  3. Add comments (#) to explain your logic.
100
+ 4. SCOPE RULE: Import all necessary libraries (e.g., 'from collections import Counter') *inside* any function you define.
101
  Available: pandas as pd, basic Python libraries.
102
  """
103
  if not isinstance(code, str):
 
773
  self.llm_with_tools = ChatGroq(
774
  temperature=0,
775
  groq_api_key=GROQ_API_KEY,
776
+ model_name="llama-3.3-70b-versatile", # <-- Use the powerful model
777
  max_tokens=4096,
778
  timeout=60
779
  ).bind_tools(self.tools)
780
+ print("✅ Main LLM (llama-3.3-70b-versatile with tools) initialized.")
781
 
782
  except Exception as e:
783
  print(f"❌ Error initializing Groq: {e}")