Spaces:
Sleeping
Sleeping
Killian Mahé
commited on
Commit
·
c5b142b
1
Parent(s):
0e7305c
Fix IO error
Browse files
agent.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
import os
|
| 2 |
from typing import TypedDict, Annotated
|
| 3 |
|
| 4 |
from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint, HuggingFaceEmbeddings
|
|
@@ -13,7 +12,7 @@ from tools import multiply, divide, add, substract
|
|
| 13 |
|
| 14 |
available_tools = [multiply, divide, add, substract, DuckDuckGoSearchRun(output_format="list", max_results=5)]
|
| 15 |
|
| 16 |
-
with
|
| 17 |
sys_prompt = SystemMessage(content=file.read())
|
| 18 |
|
| 19 |
class AgentState(TypedDict):
|
|
|
|
|
|
|
| 1 |
from typing import TypedDict, Annotated
|
| 2 |
|
| 3 |
from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint, HuggingFaceEmbeddings
|
|
|
|
| 12 |
|
| 13 |
available_tools = [multiply, divide, add, substract, DuckDuckGoSearchRun(output_format="list", max_results=5)]
|
| 14 |
|
| 15 |
+
with open("system_prompt.txt", "r") as file:
|
| 16 |
sys_prompt = SystemMessage(content=file.read())
|
| 17 |
|
| 18 |
class AgentState(TypedDict):
|