Update agent.py
Browse files
agent.py
CHANGED
|
@@ -9,7 +9,7 @@ from langgraph.graph import START, StateGraph
|
|
| 9 |
from langgraph.prebuilt import tools_condition
|
| 10 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 11 |
from langfuse.callback import CallbackHandler
|
| 12 |
-
from tools import ExtractTextFromImage, DescribeImage, TranscribeAudio, read_excel, read_python, wiki_search, web_search, arxiv_search
|
| 13 |
|
| 14 |
|
| 15 |
class AgentState(TypedDict):
|
|
@@ -24,7 +24,7 @@ class BasicAgent():
|
|
| 24 |
describe_image = tool(DescribeImage(self.multimodal_model).__call__)
|
| 25 |
transcribe_audio = tool(TranscribeAudio(self.multimodal_model).__call__)
|
| 26 |
|
| 27 |
-
self.tools = [extract_text_from_image, describe_image, transcribe_audio, read_excel, read_python, wiki_search, web_search, arxiv_search
|
| 28 |
self.chat_with_tools = chat.bind_tools(self.tools)
|
| 29 |
self._initialize_graph()
|
| 30 |
self._initialize_telemetry()
|
|
|
|
| 9 |
from langgraph.prebuilt import tools_condition
|
| 10 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 11 |
from langfuse.callback import CallbackHandler
|
| 12 |
+
from tools import ExtractTextFromImage, DescribeImage, TranscribeAudio, read_excel, read_python, wiki_search, web_search, arxiv_search
|
| 13 |
|
| 14 |
|
| 15 |
class AgentState(TypedDict):
|
|
|
|
| 24 |
describe_image = tool(DescribeImage(self.multimodal_model).__call__)
|
| 25 |
transcribe_audio = tool(TranscribeAudio(self.multimodal_model).__call__)
|
| 26 |
|
| 27 |
+
self.tools = [extract_text_from_image, describe_image, transcribe_audio, read_excel, read_python, wiki_search, web_search, arxiv_search]
|
| 28 |
self.chat_with_tools = chat.bind_tools(self.tools)
|
| 29 |
self._initialize_graph()
|
| 30 |
self._initialize_telemetry()
|