Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
an example of sessionmaker (#24246)
Asuka Minatoc5614d04d20c
diff --git a/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py b/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.pyindex e8afe6aa4a3..cda14463999 100644--- a/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py+++ b/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Any, Optional, castfrom sqlalchemy import Float, and_, func, or_, textfrom sqlalchemy import cast as sqlalchemy_cast-from sqlalchemy.orm import Session+from sqlalchemy.orm import sessionmakerfrom core.app.app_config.entities import DatasetRetrieveConfigEntityfrom core.app.entities.app_invoke_entities import ModelConfigWithCredentialsEntity@@ -175,7 +175,7 @@ class KnowledgeRetrievalNode(BaseNode):redis_client.zremrangebyscore(key, 0, current_time - 60000)request_count = redis_client.zcard(key)if request_count > knowledge_rate_limit.limit:- with Session(db.engine) as session:+ with sessionmaker(db.engine).begin() as session:# add ratelimit recordrate_limit_log = RateLimitLog(tenant_id=self.tenant_id,@@ -183,7 +183,6 @@ class KnowledgeRetrievalNode(BaseNode):operation="knowledge",)session.add(rate_limit_log)- session.commit()return NodeRunResult(status=WorkflowNodeExecutionStatus.FAILED,inputs=variables,