feat: doc as integration (#2297)

This pull request updates the integration types and classes in the
codebase. It includes the following commits:

- Update logo_url field in brain entity and integration_brain entity

- Update integration references in BrainsUsers and IntegrationBrain
classes

- Revert "Update integration references in BrainsUsers and
IntegrationBrain classes"

- Revert "Update logo_url field in brain entity and integration_brain
entity"

- Add 'doc' integration type and KnowledgeBrainQA class

Please review and merge these changes.
This commit is contained in:
Stan Girard 2024-03-04 16:10:56 -08:00 committed by GitHub
parent 2d07e78922
commit edcabdbcdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 0 deletions

View File

@ -8,6 +8,7 @@ from pydantic import BaseModel
class IntegrationType(str, Enum):
CUSTOM = "custom"
SYNC = "sync"
DOC = "doc"
class IntegrationDescriptionEntity(BaseModel):

View File

@ -40,6 +40,7 @@ integration_list = {
"gpt4": GPT4Brain,
"sql": SQLBrain,
"big": BigBrain,
"doc": KnowledgeBrainQA,
}
brain_service = BrainService()

View File

@ -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";