bugfix: Handle BYO Embeddings (#4387)
This commit is contained in:
parent
d261077e9f
commit
9d4d41c5f5
1 changed files with 3 additions and 1 deletions
|
|
@ -290,6 +290,8 @@ class AstraVectorStoreComponent(LCVectorStoreComponent):
|
||||||
"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html):\n\n"
|
"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html):\n\n"
|
||||||
f"{', '.join(model_options)}",
|
f"{', '.join(model_options)}",
|
||||||
options=model_options,
|
options=model_options,
|
||||||
|
placeholder="Select a model",
|
||||||
|
value=model_options[0],
|
||||||
required=True,
|
required=True,
|
||||||
).to_dict()
|
).to_dict()
|
||||||
|
|
||||||
|
|
@ -403,8 +405,8 @@ class AstraVectorStoreComponent(LCVectorStoreComponent):
|
||||||
"collection_vector_service_options": CollectionVectorServiceOptions.from_dict(
|
"collection_vector_service_options": CollectionVectorServiceOptions.from_dict(
|
||||||
dict_options.get("collection_vector_service_options", {})
|
dict_options.get("collection_vector_service_options", {})
|
||||||
),
|
),
|
||||||
|
"collection_embedding_api_key": dict_options.get("collection_embedding_api_key"),
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
vector_store = AstraDBVectorStore(
|
vector_store = AstraDBVectorStore(
|
||||||
collection_name=self.collection_name,
|
collection_name=self.collection_name,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue