mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
fix: fail to get ai api model name
This commit is contained in:
@@ -54,7 +54,7 @@ func (i *imlAPIController) Create(ctx *gin.Context, serviceId string, input *ai_
|
||||
}
|
||||
plugins["ai_formatter"] = api.PluginSetting{
|
||||
Config: plugin_model.ConfigType{
|
||||
"model": input.AiModel.Id,
|
||||
"model": input.AiModel.Name,
|
||||
"provider": provider,
|
||||
"config": input.AiModel.Config,
|
||||
},
|
||||
@@ -113,7 +113,7 @@ func (i *imlAPIController) Edit(ctx *gin.Context, serviceId string, apiId string
|
||||
}
|
||||
proxy.Plugins["ai_formatter"] = api.PluginSetting{
|
||||
Config: plugin_model.ConfigType{
|
||||
"model": input.AiModel.Id,
|
||||
"model": input.AiModel.Name,
|
||||
"provider": provider,
|
||||
"config": input.AiModel.Config,
|
||||
},
|
||||
|
||||
@@ -279,7 +279,7 @@ func (i *imlBalanceModule) getLocalBalances(ctx context.Context, v string) ([]*g
|
||||
if !has {
|
||||
continue
|
||||
}
|
||||
base = fmt.Sprintf("%s://%s", p.URI().Scheme(), p.URI().Host())
|
||||
base = fmt.Sprintf("%s://%s%s", p.URI().Scheme(), p.URI().Host(), p.URI().Path())
|
||||
}
|
||||
releases = append(releases, newRelease(item, base))
|
||||
}
|
||||
|
||||
+1
-1
@@ -673,7 +673,7 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string,
|
||||
cfg["provider"] = info.Id
|
||||
cfg["model"] = model.Name()
|
||||
cfg["model_config"] = model.DefaultConfig()
|
||||
cfg["base"] = fmt.Sprintf("%s://%s", p.URI().Scheme(), p.URI().Host())
|
||||
cfg["base"] = fmt.Sprintf("%s://%s%s", p.URI().Scheme(), p.URI().Host(), p.URI().Path())
|
||||
return i.syncGateway(ctx, cluster.DefaultClusterID, []*gateway.DynamicRelease{
|
||||
{
|
||||
BasicItem: &gateway.BasicItem{
|
||||
|
||||
Reference in New Issue
Block a user