wishwakankanamg commited on
Commit
ae3e5fb
·
1 Parent(s): ad73b35

generate lang graph

Browse files
Files changed (2) hide show
  1. __pycache__/agent.cpython-310.pyc +0 -0
  2. agent.py +9 -0
__pycache__/agent.cpython-310.pyc CHANGED
Binary files a/__pycache__/agent.cpython-310.pyc and b/__pycache__/agent.cpython-310.pyc differ
 
agent.py CHANGED
@@ -16,6 +16,9 @@ from langchain_groq import ChatGroq
16
  from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint, HuggingFaceEmbeddings, HuggingFacePipeline
17
  from langchain_anthropic import ChatAnthropic
18
 
 
 
 
19
 
20
  load_dotenv()
21
 
@@ -185,4 +188,10 @@ def build_graph(provider: str = "huggingface"):
185
  # Compile graph
186
  compiled_graph = builder.compile() # This line should already be there or be the next line
187
 
 
 
 
 
 
 
188
  return compiled_graph
 
16
  from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint, HuggingFaceEmbeddings, HuggingFacePipeline
17
  from langchain_anthropic import ChatAnthropic
18
 
19
+ ##!other libraries
20
+ from IPython.display import Image, display
21
+
22
 
23
  load_dotenv()
24
 
 
188
  # Compile graph
189
  compiled_graph = builder.compile() # This line should already be there or be the next line
190
 
191
+ try:
192
+ display(Image(graph.get_graph().draw_mermaid_png()))
193
+ except Exception:
194
+ # This requires some extra dependencies and is optional
195
+ pass
196
+
197
  return compiled_graph