Spaces:
Sleeping
Sleeping
Update API key config
Browse files
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(
|
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 |
-
|
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 |
)
|