Skip to content

Commit

Permalink
fix: llamacpp
Browse files Browse the repository at this point in the history
  • Loading branch information
dartpain committed Nov 13, 2024
1 parent bed4939 commit 9bbe756
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions application/api/answer/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ def complete_stream(
yield f"data: {data}\n\n"
except Exception as e:
print("\033[91merr", str(e), file=sys.stderr)
traceback.print_exc()
data = json.dumps(
{
"type": "error",
Expand Down
3 changes: 0 additions & 3 deletions application/retriever/classic_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def _get_data(self):
settings.VECTOR_STORE, self.vectorstore, settings.EMBEDDINGS_KEY
)
docs_temp = docsearch.search(self.question, k=self.chunks)
print(docs_temp)
docs = [
{
"title": i.metadata.get(
Expand All @@ -60,8 +59,6 @@ def _get_data(self):
}
for i in docs_temp
]
if settings.LLM_NAME == "llama.cpp":
docs = [docs[0]]

return docs

Expand Down

0 comments on commit 9bbe756

Please sign in to comment.