Spaces:
Sleeping
Sleeping
Key changes
Browse files- app.py +7 -1
- requirements.txt +1 -0
app.py
CHANGED
@@ -10,8 +10,14 @@ from langchain_core.output_parsers import StrOutputParser
|
|
10 |
from langchain_core.runnables import RunnablePassthrough
|
11 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
12 |
from langchain_cohere import CohereEmbeddings
|
|
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
15 |
prompt = hub.pull("rlm/rag-prompt")
|
16 |
|
17 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
|
|
|
10 |
from langchain_core.runnables import RunnablePassthrough
|
11 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
12 |
from langchain_cohere import CohereEmbeddings
|
13 |
+
import os
|
14 |
+
import os
|
15 |
|
16 |
+
|
17 |
+
COHERE_API_KEY = os.environ.get("COHERE_API_KEY")
|
18 |
+
|
19 |
+
|
20 |
+
llm = ChatCohere(model="command-r",cohere_api_key=COHERE_API_KEY)
|
21 |
prompt = hub.pull("rlm/rag-prompt")
|
22 |
|
23 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
|
requirements.txt
CHANGED
@@ -5,4 +5,5 @@ langchain-chroma
|
|
5 |
langchain-community
|
6 |
langchain-core
|
7 |
langchain-text-splitters
|
|
|
8 |
bs4
|
|
|
5 |
langchain-community
|
6 |
langchain-core
|
7 |
langchain-text-splitters
|
8 |
+
langchainhub
|
9 |
bs4
|