feat: Update ChatLiteLLM model and add RLS optimization for notifications (#2591)

This pull request updates the ChatLiteLLM model to "gpt-4o" and adds a
row-level security (RLS) optimization for notifications. It also
includes a new SQL script to drop and create a policy for allowing user
access to all notifications.
This commit is contained in:
Stan Girard 2024-05-14 10:43:01 +02:00 committed by GitHub
parent 59124ba0d4
commit 1b60f59ad7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class SummaryAssistant(ITO):
data = loader.load()
llm = ChatLiteLLM(model="gpt-3.5-turbo", max_tokens=2000)
llm = ChatLiteLLM(model="gpt-4o", max_tokens=2000)
map_template = """The following is a document that has been divided into multiple sections:
{docs}

View File

@ -0,0 +1,11 @@
drop policy "allow_user_all_notifications" on "public"."notifications";
create policy "allow_user_all_notifications"
on "public"."notifications"
as permissive
for all
to public
using ((user_id = ( SELECT auth.uid() AS uid)));