Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
3026571
feat: add role
Oct 15, 2025
50a4e39
feat: add route permission verification
Oct 15, 2025
af99a7e
chore: add permissions to home
Oct 15, 2025
d6977c4
chore: add permissions to ai assistant
Oct 15, 2025
351af19
chore: add permissions to mcp
Oct 15, 2025
1722881
chore: add permissions to model
Oct 15, 2025
d2a58ff
chore: add permissions to datasource
Oct 15, 2025
84998c6
chore: add permissions to api token
Oct 16, 2025
8267e6e
chore: add permissions to integration
Oct 16, 2025
e884498
chore: add permissions to security
Oct 16, 2025
613b8b4
chore: add permissions to settings
Oct 16, 2025
c71f55a
chore: update permissions
Oct 20, 2025
5d1511f
feat: add auth page
RainyNight9 Oct 22, 2025
7a2e976
Merge branch 'main' into feat-security
RainyNight9 Oct 22, 2025
e48a208
chore: role api
RainyNight9 Oct 23, 2025
deb6754
merge: merge main
RainyNight9 Oct 23, 2025
ee3f4af
feat: auth api
RainyNight9 Oct 26, 2025
3b4d3a9
feat: auth api
RainyNight9 Oct 26, 2025
475d356
chore: add shares to data source
Oct 26, 2025
4a809a1
Merge branch 'feat-security' of https://github.com/infinilabs/coco-se…
Oct 26, 2025
29e6645
chore: adjust api in authorization
Oct 26, 2025
604cd80
chore: adjust share api in datasource
Oct 27, 2025
2198689
chore: adjust locales
Oct 27, 2025
ddffb24
chore: add user to security
Oct 28, 2025
2352dc5
chore: add permissions to api token
Oct 28, 2025
b3b1ee2
chore: adjust menu's permissions
Oct 29, 2025
69ff18a
chore: adjust datasource's shares
Oct 30, 2025
7f6d8d1
chore: adjust shares of datasource detail
Oct 30, 2025
f23e61c
chore: adjust permission of settings
Oct 30, 2025
3710ebc
refactor: refactoring security
medcl Oct 30, 2025
fff5c81
chore: adjust avatar label
Oct 30, 2025
8148a9e
chore: adjust permissions
Oct 30, 2025
a23036b
chore: add validation to role name
Oct 30, 2025
9fca1cc
chore: add permissions to datasource shares
Oct 30, 2025
c302629
chore: adjust add shares
Oct 30, 2025
dc85bf3
chore: add filter to permissions in api token
Oct 31, 2025
9215c46
chore: adjust shares' resource in datasource detail
Oct 31, 2025
aa1398d
chore: adjust shares' resource in datasource
Oct 31, 2025
27c42a0
chore: adjust shares permission
Oct 31, 2025
9eeff53
chore: add share icon to name if current user is not owner in datasou…
Oct 31, 2025
827a6d2
chore: add validation to Add Shares in datasource
Oct 31, 2025
e7e535b
chore: default sort by created
medcl Nov 1, 2025
b51bc6e
chore: fix sharing feature
medcl Nov 1, 2025
6765eb7
refactor: refactoring security features
medcl Nov 1, 2025
d887003
chore: add view to document management
Nov 2, 2025
95c6bea
chore: adjust permissions in datasource detail
Nov 2, 2025
8926890
chore: adjust permissions in datasource
Nov 2, 2025
2fd389b
fix: some issue of shares
Nov 2, 2025
49e01e4
chore: hide Add Shares if has no permissions
Nov 2, 2025
ad08cd1
fix: lose editor's share permission in datasource
Nov 2, 2025
84aa38a
chore: adjust shares' permissions
Nov 3, 2025
66af776
fix: form values not updated when opening the modal in api token
Nov 3, 2025
98b4e79
chore: add inherit validation to editor in shares
Nov 3, 2025
284b1e5
chore: add shares to ai assistant
Nov 3, 2025
5fed192
chore: add shares to mcp server
Nov 3, 2025
dfa7603
chore: add shares to integration
Nov 3, 2025
1a75b35
chore: add shares to Connector
Nov 3, 2025
0ba54c5
fix: lose editor if permission is none in shares
Nov 4, 2025
cad8beb
chore: adjust permission options in shares
Nov 4, 2025
fbc9adf
chore: add shares to model provider
Nov 4, 2025
52e2f01
chore: adjust shares' styles
Nov 5, 2025
70ed28d
fix: invalid page value
Nov 5, 2025
81cf8fa
chore: commit some dirty work
medcl Nov 5, 2025
848a0e1
chore: add confirmation password to user form
Nov 5, 2025
d9243e4
Merge branch 'feat-security' of https://github.com/infinilabs/coco-se…
Nov 5, 2025
6bea810
style: avarar group box styles
RainyNight9 Nov 6, 2025
1342ba8
chore: adjust shares' update
Nov 6, 2025
242c039
feat: change access control
ayangweb Nov 6, 2025
70875ec
Merge branch 'feat-security' of https://github.com/infinilabs/coco-se…
Nov 6, 2025
a1133dc
chore: adjust connector type
Nov 6, 2025
f65d59e
chore: adjust principal selector
Nov 6, 2025
9ed8bdf
chore: adjust connector oauth redirect
Nov 6, 2025
2f62aef
feat: add webhooks ui page (#558)
RainyNight9 Nov 7, 2025
270b87c
refactor: refactoring for integration
medcl Nov 7, 2025
e1ec2ff
feat: gitlab merge events webhook processor
medcl Nov 7, 2025
12305f2
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
medcl Nov 7, 2025
34b15e8
chore: adjust locales
Nov 7, 2025
4df7aa0
chore: adjust integration
Nov 7, 2025
8ee5695
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
medcl Nov 7, 2025
82f3c14
chore: adjust styles
Nov 7, 2025
0360ad8
chore: i18n
RainyNight9 Nov 7, 2025
d04325a
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
RainyNight9 Nov 7, 2025
187121e
chore: adjust integration's styles
Nov 7, 2025
c2b01bb
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
medcl Nov 7, 2025
fc2d076
refactor: refactoring domains
medcl Nov 7, 2025
afb889c
refactor: remove token from integration
medcl Nov 7, 2025
8331d3d
chore: remove token in integration
Nov 7, 2025
e33c3e8
chore: add icon to user and role
Nov 7, 2025
bf6e7f3
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
medcl Nov 7, 2025
f869814
chore: disable shares if path_hierarchy is true in datasource
Nov 7, 2025
4ee96d7
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
medcl Nov 7, 2025
f8613ff
chore: skip coco ai assistant for integration calls
medcl Nov 7, 2025
e289110
chore: upgrade searchbox
Nov 7, 2025
d710161
Merge branch 'main' of https://github.com/infinilabs/coco-server into…
Nov 7, 2025
9520090
Merge branch 'main' of https://github.com/infinilabs/coco-server into…
Nov 7, 2025
2e5afc9
chore: adjust integrated store
Nov 7, 2025
7ca1e4e
chore: merge code
medcl Nov 7, 2025
924e90d
chore: resolve conflicts
Nov 7, 2025
f28f5c8
chore: resolve conflicts
Nov 7, 2025
f98279a
fix: repeated rendering after config refresh
Nov 7, 2025
14537ea
chore: add language to integration
Nov 7, 2025
4feda77
chore: upgrade searchbox
Nov 7, 2025
444d78d
chore: resolve conflicts
Nov 7, 2025
a29e9a9
chore: adjust integration language selector
Nov 7, 2025
4da409a
chore: adjust integration's type and datasource
Nov 8, 2025
9c91783
chore: fix build
medcl Nov 8, 2025
c1a7c8f
chore: remove installing datasource from store
silenceqi Nov 8, 2025
2bbeecb
fix: reset search keyword after extension type changed
silenceqi Nov 8, 2025
9167c58
fix: adjust fullscreen
Nov 8, 2025
107373a
feat: add support for editing connector processor configuration
silenceqi Nov 8, 2025
e0d6c7d
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
silenceqi Nov 8, 2025
640b545
feat: add support for editing datasource webhook and enrichment_pipel…
silenceqi Nov 8, 2025
bc470f4
fix: i18n
RainyNight9 Nov 8, 2025
5bc4798
feat: support pagination
ayangweb Nov 8, 2025
3bf2ddf
fix: logic of new datasource
silenceqi Nov 8, 2025
b00be25
Merge branch 'feat-security' of github.com:infinilabs/coco-server int…
silenceqi Nov 8, 2025
24f3852
chore: hide integrated store after clicking "New Datasource" button
silenceqi Nov 9, 2025
8cafda0
chore: adjust datasource document
Nov 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion coco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ pipeline:
processor:
- indexing_merge:
input_queue: "indexing_documents"
# input_queue: "enriched_documents"
idle_timeout_in_seconds: 1
elasticsearch: "prod"
index_name: "coco_document-v2"
Expand Down
1 change: 0 additions & 1 deletion config/widget/fullscreen/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export async function fullscreen(options) {
container: wrapper,
id: "$[[ID]]",
server: "$[[ENDPOINT]]",
token: "$[[TOKEN]]",
linkHref
};

Expand Down
1 change: 0 additions & 1 deletion config/widget/searchbox/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export async function searchbox(options) {
container: wrapper,
id: "$[[ID]]",
server: "$[[ENDPOINT]]",
token: "$[[TOKEN]]",
linkHref
};

Expand Down
141 changes: 141 additions & 0 deletions core/assistant.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/* Copyright © INFINI LTD. All rights reserved.
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package core

type Assistant struct {
CombinedFullText
Name string `json:"name" elastic_mapping:"name:{type:keyword,copy_to:combined_fulltext}"`
Description string `json:"description" elastic_mapping:"description:{type:text,copy_to:combined_fulltext}"`
Icon string `json:"icon" elastic_mapping:"icon:{enabled:false}"`
Type string `json:"type" elastic_mapping:"type:{type:keyword}"` // assistant type, default value: "simple", possible values: "simple", "deep_think", "external_workflow"
Category string `json:"category,omitempty" elastic_mapping:"category:{type:keyword}"`
Tags []string `json:"tags,omitempty" elastic_mapping:"tags:{type:keyword}"`
Config interface{} `json:"config,omitempty" elastic_mapping:"config:{enabled:false}"` // Assistant-specific configuration settings with type
AnsweringModel ModelConfig `json:"answering_model" elastic_mapping:"answering_model:{type:object,enabled:false}"`
Datasource DatasourceConfig `json:"datasource" elastic_mapping:"datasource:{type:object,enabled:false}"`
ToolsConfig ToolsConfig `json:"tools,omitempty" elastic_mapping:"tools:{type:object,enabled:false}"`
MCPConfig MCPConfig `json:"mcp_servers,omitempty" elastic_mapping:"mcp_servers:{type:object,enabled:false}"`
UploadConfig UploadConfig `json:"upload,omitempty" elastic_mapping:"upload:{type:object,enabled:false}"`
Keepalive string `json:"keepalive" elastic_mapping:"keepalive:{type:keyword}"`
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"`
ChatSettings ChatSettings `json:"chat_settings" elastic_mapping:"chat_settings:{type:object,enabled:false}"`
Builtin bool `json:"builtin" elastic_mapping:"builtin:{type:keyword}"` // Whether the model provider is builtin
RolePrompt string `json:"role_prompt" elastic_mapping:"role_prompt:{enabled:false}"` // Role prompt for the assistant

DeepThinkConfig *DeepThinkConfig `json:"-"`
}

type DeepThinkConfig struct {
IntentAnalysisModel ModelConfig `json:"intent_analysis_model"`
PickingDocModel ModelConfig `json:"picking_doc_model"`

PickDatasource bool `json:"pick_datasource"`
PickTools bool `json:"pick_tools"`
ToolsPromisedResultSize int `json:"tools_promised_result_size"`

Visible bool `json:"visible"` // Whether the deep think mode is visible to the user
}

type WorkflowConfig struct {
}

type UploadConfig struct {
Enabled bool `json:"enabled"`
AllowedFileExtensions []string `json:"allowed_file_extensions"`
MaxFileSizeInBytes int `json:"max_file_size_in_bytes"`
MaxFileCount int `json:"max_file_count"`
}

type DatasourceConfig struct {
Enabled bool `json:"enabled"`

IDs []string `json:"ids,omitempty"`
parsedIDs []string `json:"-"`

Visible bool `json:"visible"` // Whether the deep datasource is visible to the user
Filter interface{} `json:"filter,omitempty"` // Filter for the datasource
EnabledByDefault bool `json:"enabled_by_default"` // Whether the datasource is enabled by default
}

type MCPConfig struct {
Enabled bool `json:"enabled"`

IDs []string `json:"ids,omitempty"`
parsedIDs []string `json:"-"`

Visible bool `json:"visible"` // Whether the deep datasource is visible to the user
Model *ModelConfig `json:"model"` //if not specified, use the answering model
MaxIterations int `json:"max_iterations"`
EnabledByDefault bool `json:"enabled_by_default"` // Whether the MCP server is enabled by default
}

type ToolsConfig struct {
Enabled bool `json:"enabled"`
BuiltinTools BuiltinToolsConfig `json:"builtin,omitempty" elastic_mapping:"builtin:{enabled:false}"`
}
type BuiltinToolsConfig struct {
Calculator bool `json:"calculator"`
Wikipedia bool `json:"wikipedia"`
Duckduckgo bool `json:"duckduckgo"`
Scraper bool `json:"scraper"`
}

type ModelConfig struct {
ProviderID string `json:"provider_id,omitempty"`
Name string `json:"name"`
Settings ModelSettings `json:"settings"`
PromptConfig *PromptConfig `json:"prompt,omitempty"`
}

type PromptConfig struct {
PromptTemplate string `json:"template"`
InputVars []string `json:"input_vars"`
}

type ModelSettings struct {
Reasoning bool `json:"reasoning"`
Temperature float64 `json:"temperature"`
TopP float64 `json:"top_p"`
PresencePenalty float64 `json:"presence_penalty"`
FrequencyPenalty float64 `json:"frequency_penalty"`
MaxTokens int `json:"max_tokens"`
MaxLength int `json:"max_length"`
}

type ChatSettings struct {
GreetingMessage string `json:"greeting_message"`
Suggested struct {
Enabled bool `json:"enabled"`
Questions []string `json:"questions"`
} `json:"suggested"`
InputPreprocessTemplate string `json:"input_preprocess_tpl"`
PlaceHolder string `json:"placeholder"`
HistoryMessage struct {
Number int `json:"number"`
CompressionThreshold int `json:"compression_threshold"`
Summary bool `json:"summary"`
} `json:"history_message"`
}

func (cfg *DatasourceConfig) SetIDs(ids []string) {
cfg.parsedIDs = ids
}

func (cfg *DatasourceConfig) GetIDs() []string {
if cfg.parsedIDs != nil {
return cfg.parsedIDs
}
return cfg.IDs
}

func (cfg *MCPConfig) SetIDs(ids []string) {
cfg.parsedIDs = ids
}
func (cfg *MCPConfig) GetIDs() []string {
if cfg.parsedIDs != nil {
return cfg.parsedIDs
}
return cfg.IDs
}
2 changes: 1 addition & 1 deletion modules/common/attachment.go → core/attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package common
package core

import "infini.sh/framework/core/orm"

Expand Down
15 changes: 15 additions & 0 deletions core/chat_settings.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* Copyright © INFINI LTD. All rights reserved.
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package core

type ChatStartPageConfig struct {
Enabled bool `json:"enabled"`
Logo struct {
Light string `json:"light"`
Dark string `json:"dark"`
} `json:"logo"`
Introduction string `json:"introduction"`
DisplayAssistants []string `json:"display_assistants"`
}
25 changes: 0 additions & 25 deletions core/config.go

This file was deleted.

2 changes: 1 addition & 1 deletion modules/common/connector.go → core/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package common
package core

// registered connectors
type Connector struct {
Expand Down
36 changes: 36 additions & 0 deletions core/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Copyright © INFINI LTD. All rights reserved.
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package core

import "infini.sh/framework/core/param"

var DefaultSettingBucketKey = "default_setting_bucket"

// var DefaultUserProfileKey = "default_user_profile" //TODO to be removed
var UserProfileBucketKey = "user_profile"
var DefaultUserPasswordKey = "default_user_password"
var DefaultServerConfigKey = "default_server_config"
var DefaultAppSettingsKey = "default_app_settings"
var DefaultSearchSettingsKey = "default_search_settings"

var WidgetRole = "widget"

var PipelineContextConnector param.ParaKey = "__connector"
var PipelineContextDatasource param.ParaKey = "__datasource"
var PipelineContextDocuments param.ParaKey = "messages"

// re-export
const FeatureMaskSensitiveField = "feature_sensitive_fields"
const FeatureRemoveSensitiveField = "feature_sensitive_fields_remove_sensitive_field"
const SensitiveFields = "feature_sensitive_fields_extra_keys"

const FeatureCORS = "feature_cors"
const FeatureNotAllowCredentials = "feature_not_allow_credentials"
const FeatureByPassCORSCheck = "feature_bypass_cors_check"

const FeatureFingerprintThrottle = "fingerprint_throttle"

const DefaultSimpleAuthBackend = "default_simple_auth_backend"
const DefaultSimpleAuthUserLogin = "coco-default-user"
53 changes: 53 additions & 0 deletions core/datasource.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* Copyright © INFINI LTD. All rights reserved.
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package core

import "infini.sh/framework/core/pipeline"

type DataSource struct {
CombinedFullText

Type string `json:"type,omitempty" elastic_mapping:"type:{type:keyword,copy_to:combined_fulltext}"` // Type of the datasource, eg: connector
Name string `json:"name,omitempty" elastic_mapping:"name:{type:keyword,copy_to:combined_fulltext}"` // Display name of this datasource
Description string `json:"description,omitempty" elastic_mapping:"description:{type:text,copy_to:combined_fulltext}"`
Icon string `json:"icon,omitempty" elastic_mapping:"icon:{enabled:false}"` // Display name of this datasource

Category string `json:"category,omitempty" elastic_mapping:"category:{type:keyword}"`
Tags []string `json:"tags,omitempty" elastic_mapping:"tags:{type:keyword}"`

Connector ConnectorConfig `json:"connector,omitempty" elastic_mapping:"connector:{type:object}"` // Connector configuration

// Whether synchronization is allowed
SyncConfig SyncConfig `json:"sync" elastic_mapping:"sync:{type:object}"`
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"`

// Enrichment pipeline
EnrichmentPipeline *pipeline.PipelineConfigV2 `json:"enrichment_pipeline" elastic_mapping:"enrichment_pipeline:{type:object}"` //if the pipeline is enabled, pass each batch messages to this pipeline for enrichment

WebhookConfig WebhookConfig `json:"webhook,omitempty" elastic_mapping:"webhook:{type:object}"`

//OAuthConfig OAuthConfig `json:"oauth_config,omitempty" elastic_mapping:"oauth_config:{type:object}"`
}

type WebhookConfig struct {
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"`
}

type OAuthConfig struct {
Enabled bool `json:"enabled,omitempty" elastic_mapping:"enabled:{type:keyword}"`
Expired bool `json:"expired" elastic_mapping:"expired:{type:object}"`
}

type SyncConfig struct {
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"`
Strategy string `json:"strategy" elastic_mapping:"strategy:{type:keyword}"`
Interval string `json:"interval" elastic_mapping:"interval:{type:keyword}"`
PageSize int `json:"page_size" config:"page_size"`
}

type ConnectorConfig struct {
ConnectorID string `json:"id,omitempty" elastic_mapping:"id:{type:keyword}"` // Connector ID for the datasource
Config interface{} `json:"config,omitempty" elastic_mapping:"config:{enabled:false}"` // Configs for this Connector, also pass to connector's processor
}
2 changes: 1 addition & 1 deletion modules/common/document.go → core/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package common
package core

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion modules/common/fulltext.go → core/fulltext.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package common
package core

import "infini.sh/framework/core/orm"

Expand Down
59 changes: 59 additions & 0 deletions core/integration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* Copyright © INFINI LTD. All rights reserved.
* Web: https://infinilabs.com
* Email: hello#infini.ltd */

package core

type Integration struct {
CombinedFullText

Type string `json:"type,omitempty" elastic_mapping:"type:{type:keyword,copy_to:combined_fulltext}"` // Type of the Integeration, eg: embedded, floating
Options interface{} `json:"options,omitempty" elastic_mapping:"options:{type:object,enabled:false}"` // Type specific options
Hotkey string `json:"hotkey,omitempty" elastic_mapping:"hotkey:{type:keyword}"` // Hotkey for the integration
Name string `json:"name,omitempty" elastic_mapping:"name:{type:keyword,copy_to:combined_fulltext}"` // Display name of this embedding

EnabledModule ModuleConfig `json:"enabled_module,omitempty" elastic_mapping:"enabled_module:{type:object}"` // Enabled module configuration
AccessControl AccessControlConfig `json:"access_control,omitempty" elastic_mapping:"access_control:{type:object}"` // Access control configuration
Appearance AppearanceConfig `json:"appearance,omitempty" elastic_mapping:"appearance:{type:object}"` // Appearance configuration
Cors CorsConfig `json:"cors,omitempty" elastic_mapping:"cors:{type:object}"` // CORS configuration
Guest GuestAccessConfig `json:"guest,omitempty" elastic_mapping:"guest:{type:object}"` // Guest configuration
//Token string `json:"token,omitempty" elastic_mapping:"token:{type:keyword}"` // Token for authentication
Description string `json:"description,omitempty" elastic_mapping:"description:{type:keyword,copy_to:combined_fulltext}"` // Description of the embedding
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"` // Whether the embedding is enabled
}

type GuestAccessConfig struct {
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"`
RunAs string `json:"run_as,omitempty" elastic_mapping:"run_as:{type:keyword}"`
}

type CorsConfig struct {
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"` // Whether CORS is enabled
AllowedOrigins []string `json:"allowed_origins,omitempty" elastic_mapping:"allowed_origins:{type:keyword}"` // Allowed origins
}

type AppearanceConfig struct {
Theme string `json:"theme,omitempty" elastic_mapping:"theme:{type:keyword}"` // Theme of the embedding
}
type AccessControlConfig struct {
Authentication bool `json:"authentication" elastic_mapping:"authentication:{type:keyword}"` // Whether authentication is required
ChatHistory bool `json:"chat_history" elastic_mapping:"chat_history:{type:keyword}"` // Whether chat history is enabled
}

type ModuleConfig struct {
Search SearchModuleConfig `json:"search,omitempty" elastic_mapping:"search:{type:object}"` // Search configuration
AIChat AIChatModuleConfig `json:"ai_chat,omitempty" elastic_mapping:"ai_chat:{type:object}"` // AI Chat configuration
Features []string `json:"features,omitempty" elastic_mapping:"features:{type:keyword}"` // Features enabled
}

type SearchModuleConfig struct {
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"`
Placeholder string `json:"placeholder,omitempty" elastic_mapping:"placeholder:{type:keyword}"` // Placeholder text for search input
}

type AIChatModuleConfig struct {
Enabled bool `json:"enabled" elastic_mapping:"enabled:{type:keyword}"`
Placeholder string `json:"placeholder,omitempty" elastic_mapping:"placeholder:{type:keyword}"` // Placeholder text for search input
Assistants []string `json:"assistants,omitempty" elastic_mapping:"assistants:{type:keyword}"` // Assistant ID
StartPageSettings ChatStartPageConfig `json:"start_page_config,omitempty" elastic_mapping:"start_page_config:{type:object, enabled:false}"` // Start page settings
}
Loading
Loading