Skip to content

Commit

Permalink
Updated Function DocArrayInMemorySearch
Browse files Browse the repository at this point in the history
  • Loading branch information
Odeyiany2 committed Oct 21, 2024
1 parent 6fe0df8 commit a5999f3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from src.speech_io import transcribe_audio, synthesize_speech
from src.rag_functions import (allowed_files, file_check_num,
extract_contents_from_doc, chunk_document, logger)
from langchain.embeddings import OpenAIEmbeddings, AzureOpenAIEmbeddings
from langchain.embeddings import OpenAIEmbeddings
from langchain_community.vectorstores import DocArrayInMemorySearch
from langchain.schema import Document
from langchain.chat_models import ChatOpenAI
Expand Down Expand Up @@ -66,10 +66,8 @@ def create_vector_store(extracted_file_paths):
"""
try:
#OpenAI Embedding settings
openai_embeddings = AzureOpenAIEmbeddings(
openai_embeddings = OpenAIEmbeddings(
openai_api_version=os.getenv("OPENAI_API_VERSION"),
chunk_size= 1024,
validate_base_url=True, # Explicitly provide validate_base_url
openai_api_key=os.getenv("API_KEY"),
openai_api_base=os.getenv("ENDPOINT"),
openai_api_type="azure",
Expand Down

0 comments on commit a5999f3

Please sign in to comment.