Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -179,7 +179,7 @@ def build_graph(provider: str = "openai"):
|
|
| 179 |
from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint
|
| 180 |
llm = ChatHuggingFace(
|
| 181 |
llm=HuggingFaceEndpoint(
|
| 182 |
-
endpoint_url="https://api-inference.huggingface.co/models/meta-llama/
|
| 183 |
temperature=0,
|
| 184 |
)
|
| 185 |
)
|
|
@@ -366,15 +366,15 @@ def build_graph(provider: str = "openai"):
|
|
| 366 |
#)
|
| 367 |
#builder.add_edge("tools", "assistant")
|
| 368 |
|
| 369 |
-
builder = StateGraph(MessagesState)
|
| 370 |
-
builder.add_node("retriever", retriever)
|
| 371 |
|
| 372 |
-
# Retriever ist Start und Endpunkt
|
| 373 |
-
builder.set_entry_point("retriever")
|
| 374 |
-
builder.set_finish_point("retriever")
|
| 375 |
|
| 376 |
-
# Compile graph
|
| 377 |
-
return builder.compile()
|
| 378 |
# def build_graph(provider: str = "openai"):
|
| 379 |
# """Build the graph using OpenAI or Hugging Face"""
|
| 380 |
|
|
|
|
| 179 |
from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint
|
| 180 |
llm = ChatHuggingFace(
|
| 181 |
llm=HuggingFaceEndpoint(
|
| 182 |
+
endpoint_url="https://api-inference.huggingface.co/models/meta-llama/Llama-3.1-8B-Instruct",
|
| 183 |
temperature=0,
|
| 184 |
)
|
| 185 |
)
|
|
|
|
| 366 |
#)
|
| 367 |
#builder.add_edge("tools", "assistant")
|
| 368 |
|
| 369 |
+
# builder = StateGraph(MessagesState)
|
| 370 |
+
# builder.add_node("retriever", retriever)
|
| 371 |
|
| 372 |
+
# # Retriever ist Start und Endpunkt
|
| 373 |
+
# builder.set_entry_point("retriever")
|
| 374 |
+
# builder.set_finish_point("retriever")
|
| 375 |
|
| 376 |
+
# # Compile graph
|
| 377 |
+
# return builder.compile()
|
| 378 |
# def build_graph(provider: str = "openai"):
|
| 379 |
# """Build the graph using OpenAI or Hugging Face"""
|
| 380 |
|