Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -906,23 +906,22 @@ REMEMBER: One tool per turn. No reasoning without tools. Exact answer format.
|
|
| 906 |
# huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
|
| 907 |
# max_new_tokens=2048, # Increased token limit for potentially longer reasoning/tool use
|
| 908 |
# temperature=0.01, # Keep temperature low for factual tasks
|
| 909 |
-
#Use tool_choice="any" to FORCE tool usage
|
| 910 |
-
""
|
| 911 |
-
|
| 912 |
-
|
| 913 |
-
|
| 914 |
-
|
| 915 |
-
|
| 916 |
-
|
| 917 |
-
|
| 918 |
-
|
| 919 |
-
|
| 920 |
-
|
| 921 |
-
|
| 922 |
-
|
| 923 |
-
|
| 924 |
-
|
| 925 |
-
"""
|
| 926 |
print("Initializing Google Gemini LLM...")
|
| 927 |
try:
|
| 928 |
self.llm_with_tools = ChatGoogleGenerativeAI(
|
|
|
|
| 906 |
# huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
|
| 907 |
# max_new_tokens=2048, # Increased token limit for potentially longer reasoning/tool use
|
| 908 |
# temperature=0.01, # Keep temperature low for factual tasks
|
| 909 |
+
# Use tool_choice="any" to FORCE tool usage
|
| 910 |
+
# print("Initializing Groq LLM...")
|
| 911 |
+
# try:
|
| 912 |
+
# self.llm_with_tools = ChatGroq(
|
| 913 |
+
# temperature=0,
|
| 914 |
+
# groq_api_key=GROQ_API_KEY,
|
| 915 |
+
# model_name="qwen/qwen3-32b",
|
| 916 |
+
# max_tokens=4096,
|
| 917 |
+
# timeout=60
|
| 918 |
+
# ).bind_tools(self.tools, tool_choice="auto")
|
| 919 |
+
# print("✅ LLM initialized without FORCED tool usage.")
|
| 920 |
+
#
|
| 921 |
+
# except Exception as e:
|
| 922 |
+
# print(f"❌ Error initializing HuggingFace: {e}")
|
| 923 |
+
# raise
|
| 924 |
+
#
|
|
|
|
| 925 |
print("Initializing Google Gemini LLM...")
|
| 926 |
try:
|
| 927 |
self.llm_with_tools = ChatGoogleGenerativeAI(
|