fix: fail to get ai api model name

This commit is contained in:
Liujian
2025-03-11 17:16:42 +08:00
parent 6bb818b9a1
commit 9fc48341f7
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
View File
@@ -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{