Skip to content

Commit 5baf795

Browse files
committed
Update AWS vectorizer configs
1 parent 1cc541d commit 5baf795

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

test/collection/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2005,7 +2005,7 @@ def test_config_with_named_vectors(
20052005
),
20062006
(
20072007
[
2008-
Configure.Vectors.multi2vec_aws(
2008+
Configure.Vectors.multi2vec_aws_bedrock(
20092009
name="test",
20102010
dimensions=512,
20112011
model="model",

weaviate/collections/classes/config_named_vectors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ def text2vec_aws(
477477
region=region,
478478
service=service,
479479
vectorizeClassName=vectorize_collection_name,
480+
targetModel=None,
481+
targetVariant=None,
480482
),
481483
vector_index_config=vector_index_config,
482484
)

weaviate/collections/classes/config_vectorizers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ class _Text2VecAWSConfig(_VectorizerConfigCreate):
204204
endpoint: Optional[str]
205205
region: str
206206
service: str
207+
targetModel: Optional[str]
208+
targetVariant: Optional[str]
207209
vectorizeClassName: bool
208210

209211
@field_validator("region")
@@ -744,6 +746,8 @@ def text2vec_aws(
744746
vectorizeClassName=vectorize_collection_name,
745747
service=service,
746748
endpoint=endpoint,
749+
targetModel=None,
750+
targetVariant=None,
747751
)
748752

749753
@staticmethod

weaviate/collections/classes/config_vectors.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,8 @@ def text2vec_aws(
732732
region=region,
733733
service=service,
734734
vectorizeClassName=vectorize_collection_name,
735+
targetModel=None,
736+
targetVariant=None,
735737
),
736738
vector_index_config=_IndexWrappers.single(vector_index_config, quantizer),
737739
)
@@ -770,6 +772,8 @@ def text2vec_aws_bedrock(
770772
region=region,
771773
service="bedrock",
772774
vectorizeClassName=vectorize_collection_name,
775+
targetModel=None,
776+
targetVariant=None,
773777
),
774778
vector_index_config=_IndexWrappers.single(vector_index_config, quantizer),
775779
)
@@ -780,6 +784,8 @@ def text2vec_aws_sagemaker(
780784
name: Optional[str] = None,
781785
endpoint: str,
782786
region: str,
787+
target_model: Optional[str] = None,
788+
target_variant: Optional[str] = None,
783789
quantizer: Optional[_QuantizerConfigCreate] = None,
784790
source_properties: Optional[List[str]] = None,
785791
vector_index_config: Optional[_VectorIndexConfigCreate] = None,
@@ -794,6 +800,8 @@ def text2vec_aws_sagemaker(
794800
name: The name of the vector.
795801
endpoint: The endpoint to use, REQUIRED.
796802
region: The AWS region to run the model from, REQUIRED.
803+
target_model: The target model to use. Defaults to `None`, which uses the server-defined default.
804+
target_variant: The target variant to use. Defaults to `None`, which uses the server-defined default.
797805
quantizer: The quantizer to use for the vector index. If not provided, no quantization will be applied.
798806
source_properties: Which properties should be included when vectorizing. By default all text properties are included.
799807
vector_index_config: The configuration for Weaviate's vector index. Use `wvc.config.Configure.VectorIndex` to create a vector index configuration. None by default
@@ -806,6 +814,8 @@ def text2vec_aws_sagemaker(
806814
model=None,
807815
endpoint=endpoint,
808816
region=region,
817+
targetModel=target_model,
818+
targetVariant=target_variant,
809819
service="sagemaker",
810820
vectorizeClassName=vectorize_collection_name,
811821
),

0 commit comments

Comments
 (0)