7ee9944ab5
- Updated deno.lock and package.json to include @toon-format/toon@^2.1.0. - Modified background-openai.ipynb to handle error responses and adjust execution counts. - Enhanced definitions-openai.ipynb to include additional metadata for perishables and origen schemas. - Refactored embeddings-openai.ipynb to improve error handling and output formatting. - Updated create-chat-conversation function to append messages and responses to conversations. - Added SQL functions for appending conversation data to the database.
23 lines
760 B
SQL
23 lines
760 B
SQL
alter table "public"."conversaciones_plan" add column "nombre" text default ('Chat '::text || CURRENT_DATE);
|
|
|
|
alter table "public"."conversaciones_plan" alter column "conversacion_json" set default '[]'::jsonb;
|
|
|
|
CREATE OR REPLACE FUNCTION public.append_conversacion_asignatura(p_id uuid, p_append jsonb)
|
|
RETURNS void
|
|
LANGUAGE sql
|
|
AS $function$
|
|
update conversaciones_asignatura
|
|
set conversacion_json = coalesce(conversacion_json, '[]'::jsonb) || p_append
|
|
where id = p_id;
|
|
$function$
|
|
;
|
|
|
|
CREATE OR REPLACE FUNCTION public.append_conversacion_plan(p_id uuid, p_append jsonb)
|
|
RETURNS void
|
|
LANGUAGE sql
|
|
AS $function$
|
|
update conversaciones_plan
|
|
set conversacion_json = coalesce(conversacion_json, '[]'::jsonb) || p_append
|
|
where id = p_id;
|
|
$function$
|
|
; |