Spaces:
Build error
Build error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -148,22 +148,9 @@ tools = [
|
|
| 148 |
]
|
| 149 |
|
| 150 |
# Build graph function
|
| 151 |
-
def build_graph(
|
| 152 |
"""Build the graph"""
|
| 153 |
-
|
| 154 |
-
if provider == "groq":
|
| 155 |
-
# Groq https://console.groq.com/docs/models
|
| 156 |
-
llm = ChatGroq(model="qwen-qwq-32b", temperature=0) # optional : qwen-qwq-32b gemma2-9b-it
|
| 157 |
-
elif provider == "huggingface":
|
| 158 |
-
# TODO: Add huggingface endpoint
|
| 159 |
-
llm = ChatHuggingFace(
|
| 160 |
-
llm=HuggingFaceEndpoint(
|
| 161 |
-
url="https://api-inference.huggingface.co/models/Meta-DeepLearning/llama-2-7b-chat-hf",
|
| 162 |
-
temperature=0,
|
| 163 |
-
),
|
| 164 |
-
)
|
| 165 |
-
else:
|
| 166 |
-
raise ValueError("Invalid provider. Choose, 'groq' or 'huggingface'.")
|
| 167 |
# Bind tools to LLM
|
| 168 |
llm_with_tools = llm.bind_tools(tools)
|
| 169 |
|
|
|
|
| 148 |
]
|
| 149 |
|
| 150 |
# Build graph function
|
| 151 |
+
def build_graph():
|
| 152 |
"""Build the graph"""
|
| 153 |
+
llm = ChatGroq(model="qwen-qwq-32b", temperature=0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
# Bind tools to LLM
|
| 155 |
llm_with_tools = llm.bind_tools(tools)
|
| 156 |
|