Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,8 @@ import fireworks.client
|
|
21 |
import chainlit as cl
|
22 |
|
23 |
setup_langsmith_config()
|
24 |
-
|
|
|
25 |
FIREWORKS_API_KEY = os.getenv("FIREWORKS_API_KEY")
|
26 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
|
27 |
|
@@ -79,7 +80,7 @@ async def on_chat_start():
|
|
79 |
metadatas = [{"source": f"{i}-pl"} for i in range(len(texts))]
|
80 |
|
81 |
# Create a Chroma vector store
|
82 |
-
embeddings = CohereEmbeddings(cohere_api_key=
|
83 |
|
84 |
docsearch = await cl.make_async(Chroma.from_texts)(
|
85 |
texts, embeddings, metadatas=metadatas
|
|
|
21 |
import chainlit as cl
|
22 |
|
23 |
setup_langsmith_config()
|
24 |
+
COHERE_API_KEY = os.getenv("COHERE_API_KEY")
|
25 |
+
cohere_api_key = os.getenv("COHERE_API_KEY")
|
26 |
FIREWORKS_API_KEY = os.getenv("FIREWORKS_API_KEY")
|
27 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
|
28 |
|
|
|
80 |
metadatas = [{"source": f"{i}-pl"} for i in range(len(texts))]
|
81 |
|
82 |
# Create a Chroma vector store
|
83 |
+
embeddings = CohereEmbeddings(cohere_api_key=COHERE_API_KEY)
|
84 |
|
85 |
docsearch = await cl.make_async(Chroma.from_texts)(
|
86 |
texts, embeddings, metadatas=metadatas
|