Configuration

This module contains functionality related to the the configuration module for embedding.embedding_models.voyage.

Configuration

VoyageEmbeddingModelConfiguration

Bases: EmbeddingModelConfiguration

Configuration for Voyage embedding models.

This class represents the configuration needed for using Voyage AI embedding models, including authentication credentials and model settings.

Source code in src/embedding/embedding_models/voyage/configuration.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
class VoyageEmbeddingModelConfiguration(EmbeddingModelConfiguration):
    """Configuration for Voyage embedding models.

    This class represents the configuration needed for using Voyage AI embedding models,
    including authentication credentials and model settings.
    """

    class Secrets(BaseSecrets):
        """Secrets for Voyage embedding model authentication.

        Contains API key and other sensitive information required to authenticate
        with the Voyage AI API for embedding generation.
        """

        model_config = ConfigDict(
            env_file_encoding="utf-8",
            env_prefix="RAGKB__EMBEDDING_MODELS__VOYAGE__",
            env_nested_delimiter="__",
            extra="ignore",
        )

        api_key: SecretStr = Field(..., description="API key for the model")

    provider: Literal[EmbeddingModelProviderName.VOYAGE] = Field(
        ..., description="The provider of the embedding model."
    )
    secrets: Secrets = Field(
        None, description="The secrets for the language model."
    )

Secrets

Bases: BaseSecrets

Secrets for Voyage embedding model authentication.

Contains API key and other sensitive information required to authenticate with the Voyage AI API for embedding generation.

Source code in src/embedding/embedding_models/voyage/configuration.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class Secrets(BaseSecrets):
    """Secrets for Voyage embedding model authentication.

    Contains API key and other sensitive information required to authenticate
    with the Voyage AI API for embedding generation.
    """

    model_config = ConfigDict(
        env_file_encoding="utf-8",
        env_prefix="RAGKB__EMBEDDING_MODELS__VOYAGE__",
        env_nested_delimiter="__",
        extra="ignore",
    )

    api_key: SecretStr = Field(..., description="API key for the model")