Spaces:
Build error
Build error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -164,8 +164,11 @@ def build_graph(provider: str = "huggingface"):
|
|
| 164 |
# TODO: Add huggingface endpoint
|
| 165 |
llm = ChatHuggingFace(
|
| 166 |
llm=HuggingFaceEndpoint(
|
| 167 |
-
|
| 168 |
-
|
|
|
|
|
|
|
|
|
|
| 169 |
),
|
| 170 |
)
|
| 171 |
else:
|
|
|
|
| 164 |
# TODO: Add huggingface endpoint
|
| 165 |
llm = ChatHuggingFace(
|
| 166 |
llm=HuggingFaceEndpoint(
|
| 167 |
+
repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1", # Valid Hugging Face model
|
| 168 |
+
huggingfacehub_api_token=os.environ.get("HUGGINGFACEHUB_API_TOKEN"),
|
| 169 |
+
temperature=0.1, # Low temperature for deterministic output
|
| 170 |
+
max_new_tokens=512, # Adjust based on your needs
|
| 171 |
+
timeout=60 # Set appropriate timeout for API calls
|
| 172 |
),
|
| 173 |
)
|
| 174 |
else:
|