Fehler beim Befehl „langgraph dev“: langgraph_api.utils.errors.GraphLoadError: Fehler beim Laden des DiagrammsPython

Python-Programme
Anonymous
 Fehler beim Befehl „langgraph dev“: langgraph_api.utils.errors.GraphLoadError: Fehler beim Laden des Diagramms

Post by Anonymous »

1, ich teste meinen Code (es ist eine einfache Agenten-Demo) erfolgreich und führe „pip install -e“ aus. erfolgreich.
2, Dann möchte ich meinen Agenten als LangGraph-Server bereitstellen, also führe ich „langgraph dev“ aus, es gibt mir die Fehlermeldung: langgraph_api.utils.errors.GraphLoadError: Fehler beim Laden des Diagramms „Graph with Memory“ aus src/agent/graph.py: Kein Modul namens „agent“
3, hier ist meine Projektstruktur :
Projektstrukturbild
und langgraph.json-Code:

Code: Select all

{
"$schema": "https://langgra.ph/schema.json",
"dependencies": ["."],
"graphs": {
"Graph with Memory": "src/agent/graph.py:graph"
},
"env": ".env",
"image_distro": "wolfi",
"store": {
"index": {
"embed": "src/agent/llm/models.py:get_embeddings",
"dimensions": 1024,
"fields": ["content.memory_fragments[*].content", "content.memory_fragments[*].scene"]
}
}
}
und das ist die graph.py :

Code: Select all

...
graph = workflow.compile(name="Graph with Memory", checkpointer=my_checkpointer, store=my_store)

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post