72 lines
2.3 KiB
Plaintext
72 lines
2.3 KiB
Plaintext
|
|
syntax = "v1"
|
||
|
|
|
||
|
|
type (
|
||
|
|
AiSettingsData {
|
||
|
|
Provider string `json:"provider"`
|
||
|
|
Model string `json:"model"`
|
||
|
|
ResearchProvider string `json:"research_provider"`
|
||
|
|
ResearchModel string `json:"research_model"`
|
||
|
|
ApiKeyConfigured bool `json:"api_key_configured"`
|
||
|
|
ResearchApiKeyConfigured bool `json:"research_api_key_configured"`
|
||
|
|
PlatformKeyAvailable bool `json:"platform_key_available"`
|
||
|
|
}
|
||
|
|
|
||
|
|
SaveAiReq {
|
||
|
|
Provider string `json:"provider,optional"`
|
||
|
|
Model string `json:"model,optional"`
|
||
|
|
ResearchProvider string `json:"research_provider,optional"`
|
||
|
|
ResearchModel string `json:"research_model,optional"`
|
||
|
|
ApiKey string `json:"api_key,optional"`
|
||
|
|
ResearchApiKey string `json:"research_api_key,optional"`
|
||
|
|
ApiKeyConfigured *bool `json:"api_key_configured,optional"`
|
||
|
|
ResearchApiKeyConfigured *bool `json:"research_api_key_configured,optional"`
|
||
|
|
}
|
||
|
|
|
||
|
|
PlacementSettingsData {
|
||
|
|
WebSearchProvider string `json:"web_search_provider"`
|
||
|
|
ExpandStrategy string `json:"expand_strategy"`
|
||
|
|
BraveApiKeyConfigured bool `json:"brave_api_key_configured"`
|
||
|
|
ExaApiKeyConfigured bool `json:"exa_api_key_configured"`
|
||
|
|
DevModeEnabled bool `json:"dev_mode_enabled"`
|
||
|
|
PlatformKeyAvailable bool `json:"platform_key_available"`
|
||
|
|
}
|
||
|
|
|
||
|
|
SavePlacementReq {
|
||
|
|
ExpandStrategy string `json:"expand_strategy,optional"`
|
||
|
|
DevModeEnabled *bool `json:"dev_mode_enabled,optional"`
|
||
|
|
ExaApiKey string `json:"exa_api_key,optional"`
|
||
|
|
ExaApiKeyConfigured *bool `json:"exa_api_key_configured,optional"`
|
||
|
|
}
|
||
|
|
|
||
|
|
ListModelsReq {
|
||
|
|
Provider string `form:"provider,optional"`
|
||
|
|
}
|
||
|
|
|
||
|
|
ListModelsData {
|
||
|
|
List []string `json:"list"`
|
||
|
|
Provider string `json:"provider"`
|
||
|
|
}
|
||
|
|
)
|
||
|
|
|
||
|
|
@server (
|
||
|
|
group: settings
|
||
|
|
prefix: /api/v1/settings
|
||
|
|
middleware: AuthJWT
|
||
|
|
)
|
||
|
|
service gateway {
|
||
|
|
@handler GetAi
|
||
|
|
get /ai returns (AiSettingsData)
|
||
|
|
|
||
|
|
@handler SaveAi
|
||
|
|
put /ai (SaveAiReq) returns (AiSettingsData)
|
||
|
|
|
||
|
|
@handler GetPlacement
|
||
|
|
get /placement returns (PlacementSettingsData)
|
||
|
|
|
||
|
|
@handler SavePlacement
|
||
|
|
put /placement (SavePlacementReq) returns (PlacementSettingsData)
|
||
|
|
|
||
|
|
@handler ListModels
|
||
|
|
get /models (ListModelsReq) returns (ListModelsData)
|
||
|
|
}
|