Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add ai enabled field (#15614)
Danny Xu85bfbaa0517f
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 5b9375f327..aff1310499 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -568,8 +568,8 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Updateif err := convertProtoToProto(request.Setting.Value.GetAiSetting(), aiSetting); err != nil {return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value for %s with error: %v", apiSettingName, err)}- if aiSetting.ApiKey == "" || aiSetting.Endpoint == "" || aiSetting.Model == "" {- return nil, status.Errorf(codes.InvalidArgument, "both api key, endpoint and model are required")+ if aiSetting.Enabled && (aiSetting.ApiKey == "" || aiSetting.Endpoint == "" || aiSetting.Model == "") {+ return nil, status.Errorf(codes.InvalidArgument, "api key, endpoint and model are required")}bytes, err := protojson.Marshal(aiSetting)if err != nil {diff --git a/backend/migrator/migration/3.5/0016##ai.sql b/backend/migrator/migration/3.5/0016##ai.sqlindex f7f971a682..25386a84e7 100644--- a/backend/migrator/migration/3.5/0016##ai.sql+++ b/backend/migrator/migration/3.5/0016##ai.sql@@ -1,5 +1,6 @@INSERT INTO setting (name, value) VALUES ('bb.ai',json_build_object(+ 'enabled', true,'provider', 'OPEN_AI','apiKey', (SELECT COALESCE(value, '') FROM setting WHERE name = 'bb.plugin.openai.key'),'endpoint', (diff --git a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vueindex cae6021877..6abb71ac4f 100644--- a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue+++ b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue@@ -13,38 +13,46 @@</div><div class="flex-1 lg:px-4"><div class="mt-4 lg:mt-0">- <p class="mb-2 textinfolabel">+ <div class="flex items-center gap-x-2">+ <Switch+ v-model:value="state.enabled"+ :text="true"+ :disabled="!allowEdit || !hasAIFeature"+ @update:value="toggleAIEnabled"+ />+ <p class="textinfolabel">{{ $t("settings.general.workspace.ai-assistant.description") }}<LearnMoreLinkurl="https://www.bytebase.com/docs/ai-assistant?source=console"class="ml-1 text-sm"/>- </p>-- <label class="flex items-center gap-x-2">- <span class="font-medium">{{- $t("settings.general.workspace.ai-assistant.openai-key.self")- }}</span>- </label>- <div class="mb-3 text-sm text-gray-400">- <i18n-t- keypath="settings.general.workspace.ai-assistant.openai-key.description"- >- <template #viewDoc>- <a- href="https://platform.openai.com/account/api-keys"- class="normal-link"- target="_blank"- >{{- $t(- "settings.general.workspace.ai-assistant.openai-key.find-my-key"- )- }}</a- >- </template>- </i18n-t>+ </p></div>- <NTooltip placement="top-start" :disabled="allowEdit">+ <template v-if="state.enabled">+ <label class="flex items-center gap-x-2">+ <span class="font-medium">{{+ $t("settings.general.workspace.ai-assistant.openai-key.self")+ }}</span>+ </label>+ <div class="mb-3 text-sm text-gray-400">+ <i18n-t+ keypath="settings.general.workspace.ai-assistant.openai-key.description"+ >+ <template #viewDoc>+ <a+ href="https://platform.openai.com/account/api-keys"+ class="normal-link"+ target="_blank"+ >{{+ $t(+ "settings.general.workspace.ai-assistant.openai-key.find-my-key"+ )+ }}+ </a>+ </template>+ </i18n-t>+ </div>+ <NTooltip placement="top-start" :disabled="allowEdit"><template #trigger><BBTextFieldv-model:value="state.openAIKey"@@ -61,9 +69,8 @@<span class="text-sm text-gray-400 -translate-y-2">{{ $t("settings.general.workspace.only-admin-can-edit") }}</span>- </NTooltip>+ </NTooltip>- <template v-if="isDev()"><label class="flex items-center gap-x-2"><span class="font-medium">{{$t("settings.general.workspace.ai-assistant.openai-endpoint.self")@@ -122,21 +129,22 @@</template><script lang="ts" setup>-import { NTooltip } from "naive-ui";-import scrollIntoView from "scroll-into-view-if-needed";-import { computed, onMounted, reactive, ref, watchEffect } from "vue";import { BBTextField } from "@/bbkit";import LearnMoreLink from "@/components/LearnMoreLink.vue";+import { Switch } from "@/components/v2";import { hasFeature } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";import {AISetting,AISetting_Provider,} from "@/types/proto/v1/setting_service";-import { isDev } from "@/utils";+import { NTooltip } from "naive-ui";+import scrollIntoView from "scroll-into-view-if-needed";+import { computed, onMounted, reactive, ref, watchEffect } from "vue";import { FeatureBadge } from "../FeatureGuard";interface LocalState {+ enabled: boolean;openAIKey: string;openAIEndpoint: string;openAIModel: string;@@ -151,6 +159,7 @@ const settingV1Store = useSettingV1Store();const containerRef = ref<HTMLDivElement>();const state = reactive<LocalState>({+ enabled: false,openAIKey: "",openAIEndpoint: "",openAIModel: "",@@ -164,6 +173,7 @@ const hasAIFeature = computed(() => hasFeature("bb.feature.ai-assistant"));const getInitialState = (): LocalState => {return {+ enabled: aiSetting.value?.enabled ?? false,openAIKey: maskKey(aiSetting.value?.apiKey),openAIEndpoint: aiSetting.value?.endpoint ?? "",openAIModel: aiSetting.value?.model ?? "",@@ -176,31 +186,49 @@ watchEffect(() => {const allowSave = computed((): boolean => {const initValue = getInitialState();+ const enabledUpdated = state.enabled !== initValue.enabled;const openAIKeyUpdated =state.openAIKey !== initValue.openAIKey ||(state.openAIKey && !state.openAIKey.includes("***"));const openAIEndpointUpdated =state.openAIEndpoint !== initValue.openAIEndpoint;const openAIModelUpdated = state.openAIModel !== initValue.openAIModel;- return openAIKeyUpdated || openAIEndpointUpdated || openAIModelUpdated;+ return enabledUpdated || openAIKeyUpdated || openAIEndpointUpdated || openAIModelUpdated;});function maskKey(key: string | undefined): string {return key ? key.slice(0, 3) + "***" + key.slice(-4) : "";}-const updateOpenAIKeyEndpoint = async () => {+const toggleAIEnabled = (on: boolean) => {+ if (!on) {+ return;+ }+ if (state.openAIEndpoint === "") {+ state.openAIEndpoint = "https://api.openai.com/v1/chat/completions";+ }+ if (state.openAIModel === "") {+ state.openAIModel = "gpt-3.5-turbo";+ }+};++const updateAISetting = async () => {+ let setting = AISetting.fromPartial({});+ if (state.enabled) {+ setting = AISetting.fromPartial({+ ...(aiSetting.value ?? {}),+ enabled: state.enabled,+ apiKey: state.openAIKey,+ endpoint: state.openAIEndpoint,+ model: state.openAIModel,+ // TODO(ed): support change provider.+ provider: AISetting_Provider.OPEN_AI,+ });+ }await settingV1Store.upsertSetting({name: "bb.ai",value: {- aiSetting: AISetting.fromPartial({- ...(aiSetting.value ?? {}),- apiKey: state.openAIKey,- endpoint: state.openAIEndpoint,- model: state.openAIModel,- // TODO(ed): support change provider.- provider: AISetting_Provider.OPEN_AI,- }),+ aiSetting: setting,},});@@ -220,7 +248,7 @@ onMounted(() => {defineExpose({isDirty: allowSave,title: props.title,- update: updateOpenAIKeyEndpoint,+ update: updateAISetting,revert: () => {Object.assign(state, getInitialState());},diff --git a/frontend/src/types/proto/store/setting.ts b/frontend/src/types/proto/store/setting.tsindex 08b7df5bfa..dda2a9328d 100644--- a/frontend/src/types/proto/store/setting.ts+++ b/frontend/src/types/proto/store/setting.ts@@ -602,6 +602,7 @@ export interface PasswordRestrictionSetting {}export interface AISetting {+ enabled: boolean;provider: AISetting_Provider;endpoint: string;apiKey: string;@@ -4039,25 +4040,35 @@ export const PasswordRestrictionSetting: MessageFns<PasswordRestrictionSetting>};function createBaseAISetting(): AISetting {- return { provider: AISetting_Provider.PROVIDER_UNSPECIFIED, endpoint: "", apiKey: "", model: "", version: "" };+ return {+ enabled: false,+ provider: AISetting_Provider.PROVIDER_UNSPECIFIED,+ endpoint: "",+ apiKey: "",+ model: "",+ version: "",+ };}export const AISetting: MessageFns<AISetting> = {encode(message: AISetting, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.enabled !== false) {+ writer.uint32(8).bool(message.enabled);+ }if (message.provider !== AISetting_Provider.PROVIDER_UNSPECIFIED) {- writer.uint32(8).int32(aISetting_ProviderToNumber(message.provider));+ writer.uint32(16).int32(aISetting_ProviderToNumber(message.provider));}if (message.endpoint !== "") {- writer.uint32(18).string(message.endpoint);+ writer.uint32(26).string(message.endpoint);}if (message.apiKey !== "") {- writer.uint32(26).string(message.apiKey);+ writer.uint32(34).string(message.apiKey);}if (message.model !== "") {- writer.uint32(34).string(message.model);+ writer.uint32(42).string(message.model);}if (message.version !== "") {- writer.uint32(42).string(message.version);+ writer.uint32(50).string(message.version);}return writer;},@@ -4074,15 +4085,15 @@ export const AISetting: MessageFns<AISetting> = {break;}- message.provider = aISetting_ProviderFromJSON(reader.int32());+ message.enabled = reader.bool();continue;}case 2: {- if (tag !== 18) {+ if (tag !== 16) {break;}- message.endpoint = reader.string();+ message.provider = aISetting_ProviderFromJSON(reader.int32());continue;}case 3: {@@ -4090,7 +4101,7 @@ export const AISetting: MessageFns<AISetting> = {break;}- message.apiKey = reader.string();+ message.endpoint = reader.string();continue;}case 4: {@@ -4098,7 +4109,7 @@ export const AISetting: MessageFns<AISetting> = {break;}- message.model = reader.string();+ message.apiKey = reader.string();continue;}case 5: {@@ -4106,6 +4117,14 @@ export const AISetting: MessageFns<AISetting> = {break;}+ message.model = reader.string();+ continue;+ }+ case 6: {+ if (tag !== 50) {+ break;+ }+message.version = reader.string();continue;}@@ -4120,6 +4139,7 @@ export const AISetting: MessageFns<AISetting> = {fromJSON(object: any): AISetting {return {+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,provider: isSet(object.provider)? aISetting_ProviderFromJSON(object.provider): AISetting_Provider.PROVIDER_UNSPECIFIED,@@ -4132,6 +4152,9 @@ export const AISetting: MessageFns<AISetting> = {toJSON(message: AISetting): unknown {const obj: any = {};+ if (message.enabled !== false) {+ obj.enabled = message.enabled;+ }if (message.provider !== AISetting_Provider.PROVIDER_UNSPECIFIED) {obj.provider = aISetting_ProviderToJSON(message.provider);}@@ -4155,6 +4178,7 @@ export const AISetting: MessageFns<AISetting> = {},fromPartial(object: DeepPartial<AISetting>): AISetting {const message = createBaseAISetting();+ message.enabled = object.enabled ?? false;message.provider = object.provider ?? AISetting_Provider.PROVIDER_UNSPECIFIED;message.endpoint = object.endpoint ?? "";message.apiKey = object.apiKey ?? "";diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.tsindex 13c9902dc8..9ca1d5ed63 100644--- a/frontend/src/types/proto/v1/setting_service.ts+++ b/frontend/src/types/proto/v1/setting_service.ts@@ -711,6 +711,7 @@ export interface PasswordRestrictionSetting {}export interface AISetting {+ enabled: boolean;provider: AISetting_Provider;endpoint: string;apiKey: string;@@ -5094,25 +5095,35 @@ export const PasswordRestrictionSetting: MessageFns<PasswordRestrictionSetting>};function createBaseAISetting(): AISetting {- return { provider: AISetting_Provider.PROVIDER_UNSPECIFIED, endpoint: "", apiKey: "", model: "", version: "" };+ return {+ enabled: false,+ provider: AISetting_Provider.PROVIDER_UNSPECIFIED,+ endpoint: "",+ apiKey: "",+ model: "",+ version: "",+ };}export const AISetting: MessageFns<AISetting> = {encode(message: AISetting, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.enabled !== false) {+ writer.uint32(8).bool(message.enabled);+ }if (message.provider !== AISetting_Provider.PROVIDER_UNSPECIFIED) {- writer.uint32(8).int32(aISetting_ProviderToNumber(message.provider));+ writer.uint32(16).int32(aISetting_ProviderToNumber(message.provider));}if (message.endpoint !== "") {- writer.uint32(18).string(message.endpoint);+ writer.uint32(26).string(message.endpoint);}if (message.apiKey !== "") {- writer.uint32(26).string(message.apiKey);+ writer.uint32(34).string(message.apiKey);}if (message.model !== "") {- writer.uint32(34).string(message.model);+ writer.uint32(42).string(message.model);}if (message.version !== "") {- writer.uint32(42).string(message.version);+ writer.uint32(50).string(message.version);}return writer;},@@ -5129,15 +5140,15 @@ export const AISetting: MessageFns<AISetting> = {break;}- message.provider = aISetting_ProviderFromJSON(reader.int32());+ message.enabled = reader.bool();continue;}case 2: {- if (tag !== 18) {+ if (tag !== 16) {break;}- message.endpoint = reader.string();+ message.provider = aISetting_ProviderFromJSON(reader.int32());continue;}case 3: {@@ -5145,7 +5156,7 @@ export const AISetting: MessageFns<AISetting> = {break;}- message.apiKey = reader.string();+ message.endpoint = reader.string();continue;}case 4: {@@ -5153,7 +5164,7 @@ export const AISetting: MessageFns<AISetting> = {break;}- message.model = reader.string();+ message.apiKey = reader.string();continue;}case 5: {@@ -5161,6 +5172,14 @@ export const AISetting: MessageFns<AISetting> = {break;}+ message.model = reader.string();+ continue;+ }+ case 6: {+ if (tag !== 50) {+ break;+ }+message.version = reader.string();continue;}@@ -5175,6 +5194,7 @@ export const AISetting: MessageFns<AISetting> = {fromJSON(object: any): AISetting {return {+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,provider: isSet(object.provider)? aISetting_ProviderFromJSON(object.provider): AISetting_Provider.PROVIDER_UNSPECIFIED,@@ -5187,6 +5207,9 @@ export const AISetting: MessageFns<AISetting> = {toJSON(message: AISetting): unknown {const obj: any = {};+ if (message.enabled !== false) {+ obj.enabled = message.enabled;+ }if (message.provider !== AISetting_Provider.PROVIDER_UNSPECIFIED) {obj.provider = aISetting_ProviderToJSON(message.provider);}@@ -5210,6 +5233,7 @@ export const AISetting: MessageFns<AISetting> = {},fromPartial(object: DeepPartial<AISetting>): AISetting {const message = createBaseAISetting();+ message.enabled = object.enabled ?? false;message.provider = object.provider ?? AISetting_Provider.PROVIDER_UNSPECIFIED;message.endpoint = object.endpoint ?? "";message.apiKey = object.apiKey ?? "";diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 9f7dd639cc..cd5fae31d2 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -7714,6 +7714,8 @@ components:AISetting:type: objectproperties:+ enabled:+ type: booleanprovider:enum:- PROVIDER_UNSPECIFIEDdiff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 4e655c1f34..e2f4874a0d 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -3894,6 +3894,7 @@ RestrictIssueCreationForSQLReviewPolicy is the policy configuration for restrict| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |+| enabled | [bool](#bool) | | || provider | [AISetting.Provider](#bytebase-store-AISetting-Provider) | | || endpoint | [string](#string) | | || api_key | [string](#string) | | |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 3d536f7f76..c321b08417 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -10109,6 +10109,13 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu</thead><tbody>+ <tr>+ <td>enabled</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+<tr><td>provider</td><td><a href="#bytebase.store.AISetting.Provider">AISetting.Provider</a></td>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 22cc181092..6d2b7baed4 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -4118,6 +4118,7 @@ ANY means approving any node will proceed.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |+| enabled | [bool](#bool) | | || provider | [AISetting.Provider](#bytebase-v1-AISetting-Provider) | | || endpoint | [string](#string) | | || api_key | [string](#string) | | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex cf027ca044..3e510dbd44 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -12270,6 +12270,13 @@ The access is based on approval flow.</p></td></thead><tbody>+ <tr>+ <td>enabled</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+<tr><td>provider</td><td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>diff --git a/proto/generated-go/store/setting.pb.go b/proto/generated-go/store/setting.pb.goindex 2502aaad78..101c37da86 100644--- a/proto/generated-go/store/setting.pb.go+++ b/proto/generated-go/store/setting.pb.go@@ -1286,11 +1286,12 @@ func (x *PasswordRestrictionSetting) GetPasswordRotation() *durationpb.Durationtype AISetting struct {state protoimpl.MessageState `protogen:"open.v1"`- Provider AISetting_Provider `protobuf:"varint,1,opt,name=provider,proto3,enum=bytebase.store.AISetting_Provider" json:"provider,omitempty"`- Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`- ApiKey string `protobuf:"bytes,3,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`- Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`- Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`+ Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`+ Provider AISetting_Provider `protobuf:"varint,2,opt,name=provider,proto3,enum=bytebase.store.AISetting_Provider" json:"provider,omitempty"`+ Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`+ ApiKey string `protobuf:"bytes,4,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`+ Model string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"`+ Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1325,6 +1326,13 @@ func (*AISetting) Descriptor() ([]byte, []int) {return file_store_setting_proto_rawDescGZIP(), []int{13}}+func (x *AISetting) GetEnabled() bool {+ if x != nil {+ return x.Enabled+ }+ return false+}+func (x *AISetting) GetProvider() AISetting_Provider {if x != nil {return x.Provider@@ -2877,30 +2885,31 @@ var file_store_setting_proto_rawDesc = string([]byte{0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,0x6e, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x74, 0x61, 0x74,- 0x69, 0x6f, 0x6e, 0x22, 0xfb, 0x01, 0x0a, 0x09, 0x41, 0x49, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,- 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,- 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,- 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x49, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,- 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x17, 0x0a,- 0x07, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,- 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,- 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07,- 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76,- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x55,- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07,- 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x41, 0x49, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x41,- 0x55, 0x44, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x45, 0x4d, 0x49, 0x4e, 0x49, 0x10,- 0x03, 0x2a, 0x54, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61,- 0x6e, 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x41, 0x54, 0x41, 0x42,- 0x41, 0x53, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f,- 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a,- 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45,- 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72,- 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,- 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x69, 0x6f, 0x6e, 0x22, 0x95, 0x02, 0x0a, 0x09, 0x41, 0x49, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,+ 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x08, 0x70,+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41,+ 0x49, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,+ 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x65,+ 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65,+ 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x5f, 0x6b,+ 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79,+ 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,+ 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,+ 0x22, 0x49, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x14,+ 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x41,+ 0x49, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x41, 0x55, 0x44, 0x45, 0x10, 0x02, 0x12,+ 0x0a, 0x0a, 0x06, 0x47, 0x45, 0x4d, 0x49, 0x4e, 0x49, 0x10, 0x03, 0x2a, 0x54, 0x0a, 0x12, 0x44,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x6f, 0x64,+ 0x65, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x48,+ 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,+ 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c,+ 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10,+ 0x02, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67,+ 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,})var (diff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.goindex f8979b031b..dee895c065 100644--- a/proto/generated-go/v1/setting_service.pb.go+++ b/proto/generated-go/v1/setting_service.pb.go@@ -1999,11 +1999,12 @@ func (x *PasswordRestrictionSetting) GetPasswordRotation() *durationpb.Durationtype AISetting struct {state protoimpl.MessageState `protogen:"open.v1"`- Provider AISetting_Provider `protobuf:"varint,1,opt,name=provider,proto3,enum=bytebase.v1.AISetting_Provider" json:"provider,omitempty"`- Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`- ApiKey string `protobuf:"bytes,3,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`- Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`- Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`+ Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`+ Provider AISetting_Provider `protobuf:"varint,2,opt,name=provider,proto3,enum=bytebase.v1.AISetting_Provider" json:"provider,omitempty"`+ Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`+ ApiKey string `protobuf:"bytes,4,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`+ Model string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"`+ Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -2038,6 +2039,13 @@ func (*AISetting) Descriptor() ([]byte, []int) {return file_v1_setting_service_proto_rawDescGZIP(), []int{21}}+func (x *AISetting) GetEnabled() bool {+ if x != nil {+ return x.Enabled+ }+ return false+}+func (x *AISetting) GetProvider() AISetting_Provider {if x != nil {return x.Provider@@ -3738,57 +3746,59 @@ var file_v1_setting_service_proto_rawDesc = string([]byte{0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77,- 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf8, 0x01, 0x0a, 0x09,- 0x41, 0x49, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x6f,- 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x49, 0x53, 0x65, 0x74, 0x74,- 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72,- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69,- 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69,- 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6d,- 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65,- 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x08, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x56, 0x49,- 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,- 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x41, 0x49, 0x10, 0x01, 0x12, 0x0a,- 0x0a, 0x06, 0x43, 0x4c, 0x41, 0x55, 0x44, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x45,- 0x4d, 0x49, 0x4e, 0x49, 0x10, 0x03, 0x2a, 0x54, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,- 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x20,- 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f,- 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,- 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01,- 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xae, 0x03, 0x0a,- 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,- 0x84, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,- 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,- 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62,- 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x90, 0xea,- 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65,- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x7f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74,- 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0xda, 0x41, 0x04, 0x6e,- 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,- 0x67, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17,- 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74,- 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61,- 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65,- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69,- 0x6e, 0x67, 0x22, 0x49, 0x8a, 0xea, 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69,- 0x6e, 0x67, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82,- 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x1d,- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d,- 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a,- 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31,- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x02, 0x0a, 0x09,+ 0x41, 0x49, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61,+ 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62,+ 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18,+ 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x49, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x72,+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,+ 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07,+ 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61,+ 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x76,+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65,+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,+ 0x72, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e,+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f,+ 0x50, 0x45, 0x4e, 0x5f, 0x41, 0x49, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x41, 0x55,+ 0x44, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x45, 0x4d, 0x49, 0x4e, 0x49, 0x10, 0x03,+ 0x2a, 0x54, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e,+ 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,+ 0x53, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55,+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,+ 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x44,+ 0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xae, 0x03, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69,+ 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x0c, 0x4c, 0x69,+ 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74,+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,+ 0x2f, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69,+ 0x6e, 0x67, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,+ 0x12, 0x7f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74,+ 0x74, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30,+ 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x67, 0x65, 0x74,+ 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a,+ 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x8a, 0xea,+ 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x73, 0x65,+ 0x74, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a,+ 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72,+ 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x33,})var (diff --git a/proto/store/setting.proto b/proto/store/setting.protoindex 1242837db6..9304586b11 100644--- a/proto/store/setting.proto+++ b/proto/store/setting.proto@@ -335,15 +335,16 @@ message PasswordRestrictionSetting {}message AISetting {+ bool enabled = 1;enum Provider {PROVIDER_UNSPECIFIED = 0;OPEN_AI = 1;CLAUDE = 2;GEMINI = 3;}- Provider provider = 1;- string endpoint = 2;- string api_key = 3;- string model = 4;- string version = 5;+ Provider provider = 2;+ string endpoint = 3;+ string api_key = 4;+ string model = 5;+ string version = 6;}diff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.protoindex 98b8473900..320388028b 100644--- a/proto/v1/setting_service.proto+++ b/proto/v1/setting_service.proto@@ -479,15 +479,16 @@ message PasswordRestrictionSetting {}message AISetting {+ bool enabled = 1;enum Provider {PROVIDER_UNSPECIFIED = 0;OPEN_AI = 1;CLAUDE = 2;GEMINI = 3;}- Provider provider = 1;- string endpoint = 2;- string api_key = 3;- string model = 4;- string version = 5;+ Provider provider = 2;+ string endpoint = 3;+ string api_key = 4;+ string model = 5;+ string version = 6;}