diff --git a/backend/modules/brain/entity/integration_brain.py b/backend/modules/brain/entity/integration_brain.py index a1df9b9f6..0af7e2a0b 100644 --- a/backend/modules/brain/entity/integration_brain.py +++ b/backend/modules/brain/entity/integration_brain.py @@ -8,6 +8,7 @@ from pydantic import BaseModel class IntegrationType(str, Enum): CUSTOM = "custom" SYNC = "sync" + DOC = "doc" class IntegrationDescriptionEntity(BaseModel): diff --git a/backend/modules/chat/controller/chat/brainful_chat.py b/backend/modules/chat/controller/chat/brainful_chat.py index 70c0b3b3c..d35608ea7 100644 --- a/backend/modules/chat/controller/chat/brainful_chat.py +++ b/backend/modules/chat/controller/chat/brainful_chat.py @@ -40,6 +40,7 @@ integration_list = { "gpt4": GPT4Brain, "sql": SQLBrain, "big": BigBrain, + "doc": KnowledgeBrainQA, } brain_service = BrainService() diff --git a/supabase/migrations/20240304223646_integrations-all.sql b/supabase/migrations/20240304223646_integrations-all.sql new file mode 100644 index 000000000..872fce44c --- /dev/null +++ b/supabase/migrations/20240304223646_integrations-all.sql @@ -0,0 +1,13 @@ +alter table "public"."integrations" alter column "integration_type" drop default; + +alter type "public"."integration_type" rename to "integration_type__old_version_to_be_dropped"; + +create type "public"."integration_type" as enum ('custom', 'sync', 'doc'); + +alter table "public"."integrations" alter column integration_type type "public"."integration_type" using integration_type::text::"public"."integration_type"; + +alter table "public"."integrations" alter column "integration_type" set default 'custom'::integration_type; + +drop type "public"."integration_type__old_version_to_be_dropped"; + +