nanhsin commited on
Commit
c89a297
·
verified ·
1 Parent(s): 452c55f

Remove openai_api_base

Browse files

Remove openai_api_base="https://openai.vocareum.com/v1"

Files changed (1) hide show
  1. app_function.py +1 -4
app_function.py CHANGED
@@ -39,9 +39,7 @@ def get_vectorstore(text_chunks):
39
  Returns:
40
  - FAISS: A FAISS vector store containing the embeddings of the text chunks.
41
  """
42
- embeddings = OpenAIEmbeddings(
43
- openai_api_base="https://openai.vocareum.com/v1",
44
- )
45
  vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
46
  return vectorstore
47
 
@@ -59,7 +57,6 @@ def get_conversation_chain(vectorstore):
59
  """
60
  llm = ChatOpenAI(
61
  model_name="gpt-4-1106-preview",
62
- openai_api_base="https://openai.vocareum.com/v1",
63
  )
64
 
65
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
 
39
  Returns:
40
  - FAISS: A FAISS vector store containing the embeddings of the text chunks.
41
  """
42
+ embeddings = OpenAIEmbeddings()
 
 
43
  vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
44
  return vectorstore
45
 
 
57
  """
58
  llm = ChatOpenAI(
59
  model_name="gpt-4-1106-preview",
 
60
  )
61
 
62
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)