|
59 | 59 | _Text2VecCohereConfig, |
60 | 60 | _Text2VecContextionaryConfig, |
61 | 61 | _Text2VecDatabricksConfig, |
| 62 | + _Text2VecDigitalOceanConfig, |
62 | 63 | _Text2VecGoogleConfig, |
63 | 64 | _Text2VecGPT4AllConfig, |
64 | 65 | _Text2VecHuggingFaceConfig, |
@@ -620,6 +621,42 @@ def text2vec_mistral( |
620 | 621 | vector_index_config=_IndexWrappers.single(vector_index_config, quantizer), |
621 | 622 | ) |
622 | 623 |
|
| 624 | + @staticmethod |
| 625 | + def text2vec_digitalocean( |
| 626 | + *, |
| 627 | + name: Optional[str] = None, |
| 628 | + quantizer: Optional[_QuantizerConfigCreate] = None, |
| 629 | + base_url: Optional[AnyHttpUrl] = None, |
| 630 | + model: str, |
| 631 | + source_properties: Optional[List[str]] = None, |
| 632 | + vector_index_config: Optional[_VectorIndexConfigCreate] = None, |
| 633 | + vectorize_collection_name: bool = True, |
| 634 | + ) -> _VectorConfigCreate: |
| 635 | + """Create a vector using the `text2vec-digitalocean` module. |
| 636 | +
|
| 637 | + See the [documentation](https://weaviate.io/developers/weaviate/model-providers/digitalocean/embeddings) |
| 638 | + for detailed usage. |
| 639 | +
|
| 640 | + Args: |
| 641 | + name: The name of the vector. |
| 642 | + quantizer: The quantizer to use for the vector index. If not provided, no quantization will be applied. |
| 643 | + base_url: The base URL to use where API requests should go. Defaults to `None`, which uses the server-defined default of `https://inference.do-ai.run`. |
| 644 | + model: The model to use, e.g. `qwen3-embedding-0.6b`. This is a required field on the server. |
| 645 | + source_properties: Which properties should be included when vectorizing. By default all text properties are included. |
| 646 | + vector_index_config: The configuration for Weaviate's vector index. Use `wvc.config.Configure.VectorIndex` to create a vector index configuration. None by default |
| 647 | + vectorize_collection_name: Whether to vectorize the collection name. Defaults to `True`. |
| 648 | + """ |
| 649 | + return _VectorConfigCreate( |
| 650 | + name=name, |
| 651 | + source_properties=source_properties, |
| 652 | + vectorizer=_Text2VecDigitalOceanConfig( |
| 653 | + baseURL=base_url, |
| 654 | + model=model, |
| 655 | + vectorizeClassName=vectorize_collection_name, |
| 656 | + ), |
| 657 | + vector_index_config=_IndexWrappers.single(vector_index_config, quantizer), |
| 658 | + ) |
| 659 | + |
623 | 660 | @staticmethod |
624 | 661 | def text2vec_morph( |
625 | 662 | *, |
|
0 commit comments