Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Update white space errorrs
Browse files Browse the repository at this point in the history
  • Loading branch information
savini98 committed Jul 29, 2024
1 parent 15a621b commit aee55bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/canonirag/final_impl/app.jac
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ walker save_data {

can main {
:g: state ;

:g: RagEngine ;

gui.page_build();
if state == PR_states.init_PR {
# Import the data from JSON file
Expand Down
6 changes: 3 additions & 3 deletions examples/canonirag/final_impl/rag.jac
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ obj rag_engine {
can add_chunk_id(chunks: str) {
last_page_id = None;
current_chunk_index = 0;

for chunk in chunks {
source = chunk.metadata.get('source');
page = chunk.metadata.get('page');
Expand All @@ -70,11 +70,11 @@ obj rag_engine {
embedding_function=self.get_embedding_function()
);
chunks_with_ids = self.add_chunk_id(chunks);#Chunk ID Calculation

#Adding and Updating the documents
existing_items = db.get(include=[]);
existing_ids = set(existing_items['ids']);

#Only adding new documents that does not exist in the database
new_chunks = [];
for chunk in chunks_with_ids {
Expand Down

0 comments on commit aee55bc

Please sign in to comment.