Spaces:
Sleeping
Sleeping
UPDATE: QDRANT
Browse files- app.py +1 -1
- functions.py +2 -2
app.py
CHANGED
|
@@ -49,7 +49,7 @@ async def addText(vectorstore: str, text: str):
|
|
| 49 |
|
| 50 |
@app.post("/answerQuery")
|
| 51 |
async def answerQuestion(query: str, vectorstore: str, llmModel: str = "llama3-70b-8192"):
|
| 52 |
-
return answerQuery(query=
|
| 53 |
|
| 54 |
|
| 55 |
@app.post("/deleteChatbot")
|
|
|
|
| 49 |
|
| 50 |
@app.post("/answerQuery")
|
| 51 |
async def answerQuestion(query: str, vectorstore: str, llmModel: str = "llama3-70b-8192"):
|
| 52 |
+
return answerQuery(query=query, vectorstore=vectorstore, llmModel=llmModel)
|
| 53 |
|
| 54 |
|
| 55 |
@app.post("/deleteChatbot")
|
functions.py
CHANGED
|
@@ -141,7 +141,7 @@ def answerQuery(query: str, vectorstore: str, llmModel: str = "llama3-70b-8192")
|
|
| 141 |
)
|
| 142 |
retriever = vectorstore.as_retriever()
|
| 143 |
chain = (
|
| 144 |
-
{"context": retriever | RunnableLambda(format_docs), "question": RunnablePassthrough(
|
| 145 |
| prompt
|
| 146 |
| ChatGroq(model = llmModel, temperature = 0.3, max_tokens = 512)
|
| 147 |
| StrOutputParser()
|
|
@@ -168,7 +168,7 @@ def listTables(username: str):
|
|
| 168 |
global qdrantClient
|
| 169 |
qdrantCollections = qdrantClient.get_collections()
|
| 170 |
return {
|
| 171 |
-
"output":
|
| 172 |
}
|
| 173 |
except Exception as e:
|
| 174 |
return {
|
|
|
|
| 141 |
)
|
| 142 |
retriever = vectorstore.as_retriever()
|
| 143 |
chain = (
|
| 144 |
+
{"context": retriever | RunnableLambda(format_docs), "question": RunnablePassthrough()}
|
| 145 |
| prompt
|
| 146 |
| ChatGroq(model = llmModel, temperature = 0.3, max_tokens = 512)
|
| 147 |
| StrOutputParser()
|
|
|
|
| 168 |
global qdrantClient
|
| 169 |
qdrantCollections = qdrantClient.get_collections()
|
| 170 |
return {
|
| 171 |
+
"output": list(filter(lambda x: True if x.split("-")[1] == username else False, [qdrantCollections.collections[0].name for x in qdrantCollections]))
|
| 172 |
}
|
| 173 |
except Exception as e:
|
| 174 |
return {
|