gabejavitt commited on
Commit
15a2a2e
·
verified ·
1 Parent(s): fa9dd3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -897,20 +897,20 @@ REMEMBER: One tool per turn. No reasoning without tools. Exact answer format.
897
  print("Initializing Groq LLM...")
898
  try:
899
  #. Initialize the LLM ()
900
- self.llm_with_tools = HuggingFaceEndpoint(
901
- repo_id="HuggingFaceH4/zephyr-7b-beta", # Changed model
902
- huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
903
- max_new_tokens=2048, # Increased token limit for potentially longer reasoning/tool use
904
- temperature=0.01, # Keep temperature low for factual tasks
905
- # Use tool_choice="any" to FORCE tool usage
906
- # self.llm_with_tools = ChatGroq(
907
- # temperature=0,
908
- # groq_api_key=GROQ_API_KEY,
909
- # model_name="llama-3.3-70b-versatile",
910
- # max_tokens=4096,
911
- #timeout=60
912
- ).bind_tools(self.tools, tool_choice="auto") # FORCE tool calls
913
- print("✅ LLM initialized with FORCED tool usage.")
914
 
915
  except Exception as e:
916
  print(f"❌ Error initializing HuggingFace: {e}")
 
897
  print("Initializing Groq LLM...")
898
  try:
899
  #. Initialize the LLM ()
900
+ #self.llm_with_tools = HuggingFaceEndpoint(
901
+ # repo_id="HuggingFaceH4/zephyr-7b-beta", # Changed model
902
+ # huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
903
+ # max_new_tokens=2048, # Increased token limit for potentially longer reasoning/tool use
904
+ # temperature=0.01, # Keep temperature low for factual tasks
905
+ Use tool_choice="any" to FORCE tool usage
906
+ self.llm_with_tools = ChatGroq(
907
+ temperature=0,
908
+ groq_api_key=GROQ_API_KEY,
909
+ model_name="llama-3.3-70b-versatile",
910
+ max_tokens=4096,
911
+ timeout=60
912
+ ).bind_tools(self.tools, tool_choice="auto")
913
+ print("✅ LLM initialized without FORCED tool usage.")
914
 
915
  except Exception as e:
916
  print(f"❌ Error initializing HuggingFace: {e}")