You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm starting out with Chainlit, learning how to create a langchain Agent with it. After setting up the login part, using the example implementation from the documentation (SQLAlchemyDataLayer with BaseStorageClient, using it with docker image postres:latest),
To Reproduce
Steps to reproduce the behavior:
Implement database saving with SQLAlchemyDataLayer and BaseStorageClient. Using any user and pass, as it will be just for saving conversations.
Define a LangChain agent (from langchain.agents import Tool, initialize_agent), with DuckDuckFoSearchRun (from langchain_community.tools import DuckDuckGoSearchRun)
Try a complex query, which will force the platform to create more than one step.
Expected behavior
The platform working smootly, without issues and returning a relevant result.
Screenshots
Not applicable. Log entries below.
Desktop (please complete the following information):
OS: Windows 11
Browser: Firefox (although not relevant, as problem is in the backend
Version [e.g. 22]
Smartphone (please complete the following information):
025-02-17 14:46:11 - SQLAlchemy: create_step, step_id=fd6923c1-efb9-449a-a57a-e8a70ac83c53
Thought: The prompt asks for use for a 3D printer in my home. It also provides a format for the output, including an execution plan and rest of needed information. I need to create an execution plan to find the most creative use for a 3D printer and then provide any additional information.
Action:
{
"action": "Web Search",
"action_input": "uses for 3D printer at home"
}
```2025-02-17 14:46:11 - SQLAlchemy: create_step, step_id=bc940f63-791b-44b9-8166-c2982952db472025-02-1714:46:11 - SQLAlchemy: create_step, step_id=260c53bc-bcdd-45a0-bea8-db23ce7b32a22025-02-1714:46:11 - An unexpected error occurred: Task <Task pending name='Task-918' coro=<SQLAlchemyDataLayer.create_step() running at D:\Projects\researcher\.venv\Lib\site-packages\chainlit\data\utils.py:25>> got Future <Future pending cb=[BaseProtocol._on_waiter_completed()]> attached to a different loop2025-02-1714:46:12 - HTTP Request: POST https://lite.duckduckgo.com/lite/ "HTTP/2 200 OK"2025-02-1714:46:12 - SQLAlchemy: update_step, step_id=260c53bc-bcdd-45a0-bea8-db23ce7b32a22025-02-1714:46:12 - SQLAlchemy: create_step, step_id=260c53bc-bcdd-45a0-bea8-db23ce7b32a22025-02-1714:46:12 - An unexpected error occurred: Task <Task pending name='Task-937' coro=<SQLAlchemyDataLayer.update_step() running at D:\Projects\researcher\.venv\Lib\site-packages\chainlit\data\utils.py:25>> got Future <Future pending cb=[BaseProtocol._on_waiter_completed()]> attached to a different loop2025-02-1714:46:12 - SQLAlchemy: update_step, step_id=bc940f63-791b-44b9-8166-c2982952db47further down...2025-02-1714:46:19 - SQLAlchemy: create_step, step_id=0953c1ba-0c8a-441a-b6cb-ef976ba55ebf2025-02-1714:46:20 - An error occurred: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.DeadlockDetectedError'>: deadlock detectedDETAIL: Process 1364 waits for ShareLock on transaction 1131; blocked by process 1361.Process 1361 waits for ShareLock on transaction 1136; blocked by process 1364.HINT: See server log for query details.
[SQL:INSERT INTO steps ("name", "type", "id", "threadId", "parentId", "streaming", "metadata", "input", "isError", "output", "createdAt", "start", "end", "defaultOpen", "showInput", "generation")VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)ON CONFLICT (id) DO UPDATESET "name" = $1, "type" = $2, "threadId" = $4, "parentId" = $5, "streaming" = $6, "metadata" = $7, "input" = $8, "isError" = $9, "output" = $10, "createdAt" = $11, "start" = $12, "end" = $13, "defaultOpen" = $14, "showInput" = $15, "generation" = $16;
]
[parameters: ('LLMChain', 'undefined', '5fcd21be-b8fc-4b04-a67a-3e3d2b4a3d1f', '7c8b7eb2-018f-4493-a07f-6e4fd975148e', 'ea756a5d-5c88-443e-ae14-5b92a1c4997e', False, '{"language": "json"}', '{\'input\': StringPromptValue(text="Prepare plan for task execution. (e.g. retrieve current date to find weather forecast)\n\n Tools to use: wikip ... (7443 characters truncated) ... With rising demand, customizable tools offer personalized solutions, merging function with unique design.\nThought:\', \'stop\': [\'Observation:\']}', False, '```json\n{\n "action": "Web Search",\n "action_input": "innovative 3D printed home solutions"\n}\n```', '2025-02-17T12:46:18.436626Z', '2025-02-17T12:46:18.436626Z', '2025-02-17T12:46:19.096666Z', False, 'json', 'null')](Background on this error at: https://sqlalche.me/e/20/dbapi)
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm starting out with Chainlit, learning how to create a langchain Agent with it. After setting up the login part, using the example implementation from the documentation (SQLAlchemyDataLayer with BaseStorageClient, using it with docker image postres:latest),
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The platform working smootly, without issues and returning a relevant result.
Screenshots
Not applicable. Log entries below.
Desktop (please complete the following information):
Smartphone (please complete the following information):
"asyncpg>=0.30.0",
"chainlit>=2.2.1",
"greenlet>=3.1.1",
"langchain-google-genai>=2.0.9",
"langchain>=0.3.18",
"sqlalchemy>=2.0.38",
"langchain-community>=0.3.17",
"wikipedia>=1.4.0",
"duckduckgo-search>=7.4.2",
"numexpr>=2.10.2",
Additional context
Error logs extract:
025-02-17 14:46:11 - SQLAlchemy: create_step, step_id=fd6923c1-efb9-449a-a57a-e8a70ac83c53
Thought: The prompt asks for use for a 3D printer in my home. It also provides a format for the output, including an execution plan and rest of needed information. I need to create an execution plan to find the most creative use for a 3D printer and then provide any additional information.
Action:
The text was updated successfully, but these errors were encountered: