Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 902 |
-
|
| 903 |
-
|
| 904 |
-
|
| 905 |
-
|
| 906 |
-
|
| 907 |
-
|
| 908 |
-
|
| 909 |
-
|
| 910 |
-
|
| 911 |
-
|
| 912 |
-
).bind_tools(self.tools, tool_choice="auto")
|
| 913 |
-
print("✅ LLM initialized
|
| 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}")
|