From 90f3df0db7bbd5301cce0f9e7867623629aac354 Mon Sep 17 00:00:00 2001 From: hanlily666 Date: Wed, 18 Dec 2024 15:23:15 -0800 Subject: [PATCH 1/3] add urls to docs_in_progress table --- ai_ta_backend/beam/ingest.py | 13 +++++++++++++ package-lock.json | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 package-lock.json diff --git a/ai_ta_backend/beam/ingest.py b/ai_ta_backend/beam/ingest.py index 374685f8..e8067291 100644 --- a/ai_ta_backend/beam/ingest.py +++ b/ai_ta_backend/beam/ingest.py @@ -200,6 +200,19 @@ def ingest(context, **inputs: Dict[str | List[str], Any]): ingester = Ingest(qdrant_client, vectorstore, s3_client, supabase_client, posthog) + # Insert into 'documents_in_progress' table + responseBody = context.response_body + result = supabase_client.table('documents_in_progress').insert({ + 'course_name': course_name, + 's3_path': s3_paths, + 'base_url': base_url, + 'url': url, + 'readable_filename': readable_filename, + 'beam_task_id': responseBody.task_id, + }).execute() + if result.error: + print(f"Error inserting into documents_in_progress: {result.error}") + def run_ingest(course_name, s3_paths, base_url, url, readable_filename, content, groups): if content: return ingester.ingest_single_web_text(course_name, base_url, url, content, readable_filename, groups=groups) diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..dc130221 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "ai-ta-backend", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} From 9693186b8ecd626b730431cb1bbb7b838a64886f Mon Sep 17 00:00:00 2001 From: hanlily666 Date: Wed, 18 Dec 2024 16:17:53 -0800 Subject: [PATCH 2/3] add url to docs_in_progress table --- ai_ta_backend/beam/ingest.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ai_ta_backend/beam/ingest.py b/ai_ta_backend/beam/ingest.py index e8067291..51656408 100644 --- a/ai_ta_backend/beam/ingest.py +++ b/ai_ta_backend/beam/ingest.py @@ -201,18 +201,14 @@ def ingest(context, **inputs: Dict[str | List[str], Any]): ingester = Ingest(qdrant_client, vectorstore, s3_client, supabase_client, posthog) # Insert into 'documents_in_progress' table - responseBody = context.response_body - result = supabase_client.table('documents_in_progress').insert({ + supabase_client.table('documents_in_progress').insert({ 'course_name': course_name, 's3_path': s3_paths, 'base_url': base_url, 'url': url, 'readable_filename': readable_filename, - 'beam_task_id': responseBody.task_id, }).execute() - if result.error: - print(f"Error inserting into documents_in_progress: {result.error}") - + def run_ingest(course_name, s3_paths, base_url, url, readable_filename, content, groups): if content: return ingester.ingest_single_web_text(course_name, base_url, url, content, readable_filename, groups=groups) From 653db62ca57017218982faaf12e55d8fdc22f29b Mon Sep 17 00:00:00 2001 From: "Center for AI Innovation, NCSA" <160160242+CAII-NCSA@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:15:25 -0800 Subject: [PATCH 3/3] Delete package-lock.json --- package-lock.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index dc130221..00000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "ai-ta-backend", - "lockfileVersion": 3, - "requires": true, - "packages": {} -}