Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix baiduvdb retriever #193

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
)
)

Expand Down
Loading