Lhumpal commited on
Commit
c59b8a2
·
verified ·
1 Parent(s): 9ae1a5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from huggingface_hub import login
9
  from typing import List, Dict, Any
10
  from langchain.text_splitter import RecursiveCharacterTextSplitter
11
  from langchain.embeddings import HuggingFaceEmbeddings
12
- from langchain.vectorstores import FAISS
13
 
14
  app = FastAPI()
15
 
@@ -110,7 +110,7 @@ async def chat(request: ChatRequest):
110
  # put back the unformatted user message
111
  request.chat_history.append({"role": "user", "parts": [{"text": request.message}]})
112
 
113
- return {"response": response.text, "dataset_str": concise_text_string[:75], "history": request.chat_history, "RAG_prompt": rag_prompt_template}
114
 
115
  if request.model_choice == "HF":
116
  if hf_token:
 
9
  from typing import List, Dict, Any
10
  from langchain.text_splitter import RecursiveCharacterTextSplitter
11
  from langchain.embeddings import HuggingFaceEmbeddings
12
+ from langchain_community.vectorstores import FAISS
13
 
14
  app = FastAPI()
15
 
 
110
  # put back the unformatted user message
111
  request.chat_history.append({"role": "user", "parts": [{"text": request.message}]})
112
 
113
+ return {"response": response.text, "dataset_str": concise_text_string[:75], "history": request.chat_history, "RAG_prompt": rag_prompt}
114
 
115
  if request.model_choice == "HF":
116
  if hf_token: