Skip to content

Commit

Permalink
clea up
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmoffet committed Oct 30, 2024
1 parent 18122a0 commit c4c70c4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 275 deletions.
29 changes: 0 additions & 29 deletions backend/apps/rag/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,6 @@
log.setLevel(SRC_LOG_LEVELS["RAG"])


# async def query_doc(
# collection_name: str,
# query: str,
# embedding_function,
# k: int,
# ):
# try:
# collection = CHROMA_CLIENT.get_collection(name=collection_name)
# query_embeddings = await embedding_function(query)

# result = collection.query(
# query_embeddings=[query_embeddings],
# n_results=k,
# )

# log.info(f"query_doc:result {result}")
# return result
# except Exception as e:
# raise e


async def query_doc(
collection_name: str,
query: str,
Expand All @@ -68,10 +47,6 @@ async def query_doc(
n_results=k,
)

# for doc in result:
# log.debug(f"query_doc result")
# log.debug(f"id {doc['id']}")
# log.debug(f"document {doc['document']}")
return result
except Exception as e:
raise e
Expand Down Expand Up @@ -454,10 +429,6 @@ async def get_rag_context(
log.exception(e)

context_string = context_string.strip()
log.info(f"Final context string length: {len(context_string)}")
log.info(f"Number of citations gathered: {len(citations)}")
# log.debug(f"Final context string: {context_string[:200]}...")
# log.debug(f"Citations: {citations}")

return context_string, citations

Expand Down
243 changes: 0 additions & 243 deletions installed.txt

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,5 @@
"engines": {
"node": ">=18.13.0 <=21.x.x",
"npm": ">=6.0.0"
},
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
}
}
}

0 comments on commit c4c70c4

Please sign in to comment.