diff --git a/appbuilder/core/components/retriever/baidu_vdb/baiduvdb_retriever.py b/appbuilder/core/components/retriever/baidu_vdb/baiduvdb_retriever.py index d716f05f..eb35ce42 100644 --- a/appbuilder/core/components/retriever/baidu_vdb/baiduvdb_retriever.py +++ b/appbuilder/core/components/retriever/baidu_vdb/baiduvdb_retriever.py @@ -136,11 +136,13 @@ def _init_client(self, instance_id, account, api_key): from pymochow.auth.bce_credentials import AppBuilderCredentials gateway = os.getenv("GATEWAY_URL") if os.getenv("GATEWAY_URL") else GATEWAY_URL - + appbuilder_token = os.getenv("APPBUILDER_TOKEN") + uri_prefix=self.vdb_uri_prefix + instance_id.encode('utf-8') + config = Configuration( credentials=AppBuilderCredentials(account, api_key, appbuilder_token), endpoint=gateway, - uri_perfix=self.vdb_uri_prefix, + uri_prefix=uri_prefix, connection_timeout_in_mills=DEFAULT_TIMEOUT_IN_MILLS, ) self.vdb_client = pymochow.MochowClient(config) @@ -195,7 +197,10 @@ def _create_table_in_db( fields.append(Field(FIELD_TEXT, FieldType.STRING)) fields.append( Field( - FIELD_VECTOR, FieldType.FLOAT_VECTOR, dimension=table_params.dimension + FIELD_VECTOR, + FieldType.FLOAT_VECTOR, + dimension=table_params.dimension, + not_null=True, ) )