File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
api/core/rag/datasource/vdb/oceanbase Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,7 @@ def _create_collection(self) -> None:
104104 val = int (row [6 ])
105105 vals .append (val )
106106 if len (vals ) == 0 :
107- print ("ob_vector_memory_limit_percentage not found in parameters." )
108- exit (1 )
107+ raise ValueError ("ob_vector_memory_limit_percentage not found in parameters." )
109108 if any (val == 0 for val in vals ):
110109 try :
111110 self ._client .perform_raw_text_sql ("ALTER SYSTEM SET ob_vector_memory_limit_percentage = 30" )
@@ -200,10 +199,10 @@ def init_vector(
200199 return OceanBaseVector (
201200 collection_name ,
202201 OceanBaseVectorConfig (
203- host = dify_config .OCEANBASE_VECTOR_HOST ,
204- port = dify_config .OCEANBASE_VECTOR_PORT ,
205- user = dify_config .OCEANBASE_VECTOR_USER ,
202+ host = dify_config .OCEANBASE_VECTOR_HOST or "" ,
203+ port = dify_config .OCEANBASE_VECTOR_PORT or 0 ,
204+ user = dify_config .OCEANBASE_VECTOR_USER or "" ,
206205 password = (dify_config .OCEANBASE_VECTOR_PASSWORD or "" ),
207- database = dify_config .OCEANBASE_VECTOR_DATABASE ,
206+ database = dify_config .OCEANBASE_VECTOR_DATABASE or "" ,
208207 ),
209208 )
You can’t perform that action at this time.
0 commit comments