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
fix:delete empty table bug (#15517)
huangzhuo1949695a7400a907
diff --git a/api/core/rag/datasource/vdb/pgvector/pgvector.py b/api/core/rag/datasource/vdb/pgvector/pgvector.pyindex 06083af9ca8..13c214bfd77 100644--- a/api/core/rag/datasource/vdb/pgvector/pgvector.py+++ b/api/core/rag/datasource/vdb/pgvector/pgvector.py@@ -1,8 +1,10 @@import json+import loggingimport uuidfrom contextlib import contextmanagerfrom typing import Any+import psycopg2.errorsimport psycopg2.extras # type: ignoreimport psycopg2.pool # type: ignorefrom pydantic import BaseModel, model_validator@@ -147,7 +149,14 @@ class PGVector(BaseVector):if not ids:returnwith self._get_cursor() as cur:- cur.execute(f"DELETE FROM {self.table_name} WHERE id IN %s", (tuple(ids),))+ try:+ cur.execute(f"DELETE FROM {self.table_name} WHERE id IN %s", (tuple(ids),))+ except psycopg2.errors.UndefinedTable:+ # table not exists+ logging.warning(f"Table {self.table_name} not found, skipping delete operation.")+ return+ except Exception as e:+ raise edef delete_by_metadata_field(self, key: str, value: str) -> None:with self._get_cursor() as cur: