diff --git a/config.py b/config.py index 00fb6ab..9f51882 100644 --- a/config.py +++ b/config.py @@ -171,10 +171,12 @@ async def dispatch(self, request, call_next): RAG_AZURE_OPENAI_ENDPOINT = get_env_variable( "RAG_AZURE_OPENAI_ENDPOINT", AZURE_OPENAI_ENDPOINT ).rstrip("/") +RAG_AZURE_CHUNK_SIZE = int(get_env_variable("RAG_AZURE_CHUNK_SIZE", "1")) HF_TOKEN = get_env_variable("HF_TOKEN", "") OLLAMA_BASE_URL = get_env_variable("OLLAMA_BASE_URL", "http://ollama:11434") AWS_ACCESS_KEY_ID = get_env_variable("AWS_ACCESS_KEY_ID", "") AWS_SECRET_ACCESS_KEY = get_env_variable("AWS_SECRET_ACCESS_KEY", "") +RAG_AZURE_CHUNK_SIZE = int(get_env_variable("RAG_AZURE_CHUNK_SIZE", "1")) ## Embeddings @@ -197,6 +199,7 @@ def init_embeddings(provider, model): api_key=RAG_AZURE_OPENAI_API_KEY, azure_endpoint=RAG_AZURE_OPENAI_ENDPOINT, api_version=RAG_AZURE_OPENAI_API_VERSION, + chunk_size=RAG_AZURE_CHUNK_SIZE ) elif provider == EmbeddingsProvider.HUGGINGFACE: from langchain_huggingface import HuggingFaceEmbeddings