@freehour/supabase-langchain 1.3.9 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "displayName": "Supabase-Langchain",
5
5
  "description": "Integration package for using LangChain with Supabase",
6
- "version": "1.3.9",
6
+ "version": "1.3.10",
7
7
  "type": "module",
8
8
  "repository": {
9
9
  "type": "git",
@@ -33,8 +33,8 @@ CREATE OR REPLACE FUNCTION langchain.embeddings_apply_metadata()
33
33
  SET search_path TO ''
34
34
  AS $function$
35
35
  BEGIN
36
- IF NEW.metadata ? 'fileId' THEN
37
- NEW.file_id := NEW.metadata ->> 'fileId';
36
+ IF NEW.metadata ? 'id' THEN
37
+ NEW.file_id := NEW.metadata ->> 'id';
38
38
  END IF;
39
39
  RETURN NEW;
40
40
  END;
@@ -37,7 +37,7 @@ END;
37
37
  $$ LANGUAGE plpgsql;
38
38
 
39
39
 
40
- -- Function extracts the 'fileId' from metadata and assigns it to reference file_id.
40
+ -- Function extracts the 'id' from metadata and assigns it to reference file_id.
41
41
  -- LangChain inserts embeddings automatically with a user defined metadata;
42
42
  -- this function is triggered before insert to populate the file_id column from the metadata.
43
43
  CREATE OR REPLACE FUNCTION langchain.embeddings_apply_metadata()
@@ -45,8 +45,8 @@ RETURNS trigger
45
45
  SET search_path = ''
46
46
  AS $$
47
47
  BEGIN
48
- IF NEW.metadata ? 'fileId' THEN
49
- NEW.file_id := NEW.metadata ->> 'fileId';
48
+ IF NEW.metadata ? 'id' THEN
49
+ NEW.file_id := NEW.metadata ->> 'id';
50
50
  END IF;
51
51
  RETURN NEW;
52
52
  END;