Skip to content

Commit

Permalink
fixed langchain embedding call for azure: langchain-ai/langchain#4575
Browse files Browse the repository at this point in the history
  • Loading branch information
someguy234 committed Oct 14, 2024
1 parent fc7b36c commit 5614ded
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ 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", "")
Expand All @@ -191,6 +192,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
Expand Down

0 comments on commit 5614ded

Please sign in to comment.