podcast_llm.utils.embeddings

Utility functions for working with embeddings models.

This module provides functionality for loading and managing embeddings models, which are used to convert text into vector representations. Currently supports OpenAI embeddings with potential to expand to other providers.

Functions:

get_embeddings_model: Returns an initialized embeddings model based on config.

podcast_llm.utils.embeddings.get_embeddings_model(config: PodcastConfig)[source]

Get the configured embeddings model instance.

Parameters:

config (PodcastConfig) – Configuration object containing embeddings settings

Returns:

Initialized embeddings model instance based on config.embeddings_model.

Currently supports ‘openai’ which returns OpenAIEmbeddings. Defaults to OpenAIEmbeddings if model type not recognized.

Return type:

BaseEmbeddings