Skip to content

Settings

Settings

Bases: BaseConfig

Application settings, including configurations for vector databases, LLMs, embeddings, and chat models.

vector_db = Field(description='Configuration for the vector database.') class-attribute instance-attribute

llm = Field(description='Configuration for the language model.') class-attribute instance-attribute

embedding = Field(description='Configuration for the embedding model.') class-attribute instance-attribute

chat = Field(description='Configuration for the chat model.') class-attribute instance-attribute

validate_vector_db(value) classmethod

Validate and instantiate the vector_db field.

Parameters:

  • value (Dict[str, Any]) –

    The input configuration for the vector database.

Returns:

Raises:

  • ValueError

    If the type of vector database is unknown.

validate_llm(value) classmethod

Validate and instantiate the llm field.

Parameters:

  • value (Dict[str, Any]) –

    The input configuration for the language model.

Returns:

  • BaseLLMConfig ( BaseLLMConfig ) –

    The instantiated configuration.

Raises:

  • ValueError

    If the type of language model is unknown.

validate_embedding(value) classmethod

Validate and instantiate the embedding field.

Parameters:

  • value (Dict[str, Any]) –

    The input configuration for the embedding model.

Returns:

Raises:

  • ValueError

    If the type of embedding model is unknown.

validate_chat(value) classmethod

Validate and instantiate the chat field.

Parameters:

  • value (Dict[str, Any]) –

    The input configuration for the chat model.

Returns:

  • BaseChatConfig ( BaseChatConfig ) –

    The instantiated configuration.

Raises:

  • ValueError

    If the type of chat model is unknown.