vinhnx90 commited on
Commit
1334178
1 Parent(s): ffc1b97

Update API key config

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,7 +51,7 @@ def load_and_process_file(file_data):
51
  chunk_overlap=200,
52
  )
53
  chunks = text_splitter.split_documents(documents)
54
- embeddings = OpenAIEmbeddings(openai_api_key=st.session_state.api_key)
55
  vector_store = Chroma.from_documents(chunks, embeddings)
56
  return vector_store
57
 
@@ -92,7 +92,7 @@ def main():
92
  )
93
 
94
  llm = ChatOpenAI(
95
- openai_api_key=st.session_state.api_key,
96
  temperature=0.0,
97
  model_name="gpt-3.5-turbo",
98
  )
 
51
  chunk_overlap=200,
52
  )
53
  chunks = text_splitter.split_documents(documents)
54
+ embeddings = OpenAIEmbeddings(api_key=st.session_state.api_key)
55
  vector_store = Chroma.from_documents(chunks, embeddings)
56
  return vector_store
57
 
 
92
  )
93
 
94
  llm = ChatOpenAI(
95
+ api_key=st.session_state.api_key,
96
  temperature=0.0,
97
  model_name="gpt-3.5-turbo",
98
  )