finish fake ai

This commit is contained in:
Liujian
2024-10-24 23:30:25 +08:00
parent 8b3667ec9b
commit 888eabe154
14 changed files with 144 additions and 13 deletions
+5 -1
View File
@@ -147,7 +147,11 @@ func (i *imlProviderModule) Provider(ctx context.Context, id string) (*ai_dto.Pr
}
defaultLLM, has := p.GetModel(info.DefaultLLM)
if !has {
return nil, fmt.Errorf("ai provider llm not found")
model, has := p.DefaultModel(model_runtime.ModelTypeLLM)
if !has {
return nil, fmt.Errorf("ai provider llm not found")
}
defaultLLM = model
}
return &ai_dto.Provider{
Id: info.Id,