Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,10 @@ def rag_retriever(message, history, system_prompt, num_sources=4, temperature=0)
|
|
11 |
chat = ChatGroq(temperature=temperature, model_name="llama3-70b-8192", api_key=os.getenv("GROQ_API_KEY"))
|
12 |
|
13 |
embeddings = HuggingFaceEmbeddings(model_name="avsolatorio/GIST-large-Embedding-v0")
|
14 |
-
|
|
|
|
|
|
|
15 |
|
16 |
prompt_template = ChatPromptTemplate.from_messages([
|
17 |
("system", system_prompt+"""
|
|
|
11 |
chat = ChatGroq(temperature=temperature, model_name="llama3-70b-8192", api_key=os.getenv("GROQ_API_KEY"))
|
12 |
|
13 |
embeddings = HuggingFaceEmbeddings(model_name="avsolatorio/GIST-large-Embedding-v0")
|
14 |
+
|
15 |
+
base_dir = os.path.dirname(os.path.abspath(__file__))
|
16 |
+
db_path = os.path.join(base_dir, 'chroma.sqlite3')
|
17 |
+
store = Chroma(persist_directory=db_path, embedding_function=embeddings, collection_name='ai_act')
|
18 |
|
19 |
prompt_template = ChatPromptTemplate.from_messages([
|
20 |
("system", system_prompt+"""
|