🐛 (chat.py): Call 'initialize_run()' method on the 'graph' object after retrieving it from cache to ensure proper initialization
This commit is contained in:
parent
d20efe4bba
commit
2cac7b472f
1 changed files with 3 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ from langflow.api.v1.schemas import (
|
||||||
VerticesOrderResponse,
|
VerticesOrderResponse,
|
||||||
)
|
)
|
||||||
from langflow.exceptions.component import ComponentBuildException
|
from langflow.exceptions.component import ComponentBuildException
|
||||||
|
from langflow.graph.graph.base import Graph
|
||||||
from langflow.schema.schema import OutputLog
|
from langflow.schema.schema import OutputLog
|
||||||
from langflow.services.auth.utils import get_current_active_user
|
from langflow.services.auth.utils import get_current_active_user
|
||||||
from langflow.services.chat.service import ChatService
|
from langflow.services.chat.service import ChatService
|
||||||
|
|
@ -161,7 +162,8 @@ async def build_vertex(
|
||||||
flow_id=flow_id_str, session=next(get_session()), chat_service=chat_service
|
flow_id=flow_id_str, session=next(get_session()), chat_service=chat_service
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
graph = cache.get("result")
|
graph: "Graph" = cache.get("result")
|
||||||
|
await graph.initialize_run()
|
||||||
vertex = graph.get_vertex(vertex_id)
|
vertex = graph.get_vertex(vertex_id)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue