mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Merge branch 'feature/sunanzhi/1.6' into 'main'
feat: add provider type field See merge request apipark/APIPark!250
This commit is contained in:
@@ -202,7 +202,6 @@ type Provider struct {
|
||||
sort int
|
||||
recommend bool
|
||||
modelConfig ModelConfig
|
||||
mu sync.Mutex
|
||||
IConfig
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ type Provider struct {
|
||||
DefaultLLM string `json:"default_llm"`
|
||||
DefaultLLMConfig string `json:"-"`
|
||||
//Priority int `json:"priority"`
|
||||
Type int `json:"type"`
|
||||
Status ProviderStatus `json:"status"`
|
||||
Configured bool `json:"configured"`
|
||||
ModelConfig ModelConfig `json:"model_config"`
|
||||
|
||||
@@ -467,6 +467,7 @@ func (i *imlProviderModule) Provider(ctx context.Context, id string) (*ai_dto.Pr
|
||||
DefaultLLMConfig: defaultLLM.Logo(),
|
||||
Status: ai_dto.ProviderDisabled,
|
||||
//Priority: maxPriority,
|
||||
Type: 0,
|
||||
ModelConfig: ai_dto.ModelConfig{
|
||||
AccessConfigurationStatus: providerModelConfig.AccessConfigurationStatus,
|
||||
AccessConfigurationDemo: providerModelConfig.AccessConfigurationDemo,
|
||||
@@ -491,6 +492,7 @@ func (i *imlProviderModule) Provider(ctx context.Context, id string) (*ai_dto.Pr
|
||||
//Priority: info.Priority,
|
||||
Status: ai_dto.ToProviderStatus(info.Status),
|
||||
Configured: true,
|
||||
Type: info.Type,
|
||||
ModelConfig: ai_dto.ModelConfig{
|
||||
AccessConfigurationStatus: false,
|
||||
AccessConfigurationDemo: "",
|
||||
|
||||
Reference in New Issue
Block a user