Skip to content

Commit

Permalink
added rebuild_maps()
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Mar 12, 2024
1 parent d6976fe commit 7dc8236
Show file tree
Hide file tree
Showing 2 changed files with 769 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ai_ta_backend/beam/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from langchain.schema import Document
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.vectorstores import Qdrant
from OpenaiEmbeddings import OpenAIAPIProcessor
from ai_ta_backend.beam.OpenaiEmbeddings import OpenAIAPIProcessor
from PIL import Image
from posthog import Posthog
from pydub import AudioSegment
Expand All @@ -49,6 +49,7 @@
from ai_ta_backend.beam.nomic_logging import (
delete_from_document_map,
log_to_document_map,
rebuild_map
)

# from langchain.schema.output_parser import StrOutputParser
Expand Down Expand Up @@ -177,6 +178,9 @@ def ingest(**inputs: Dict[str, Any]):
base_url=base_url,
url=url)
print("Final success_fail_dict: ", success_fail_dict)

# rebuild nomic document map after all ingests are done
rebuild_status = rebuild_map(course_name, map_type='document', supabase_client)
return success_fail_dict


Expand Down
Loading

0 comments on commit 7dc8236

Please sign in to comment.