mirror of
https://github.com/mudler/LocalAI.git
synced 2026-04-03 22:51:38 -04:00
chore(ci): do not select models if we have only 1 result
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
5
.github/gallery-agent/agent.go
vendored
5
.github/gallery-agent/agent.go
vendored
@@ -151,6 +151,11 @@ func getRealReadme(ctx context.Context, repository string) (string, error) {
|
||||
}
|
||||
|
||||
func selectMostInterestingModels(ctx context.Context, searchResult *SearchResult) ([]ProcessedModel, error) {
|
||||
|
||||
if len(searchResult.Models) == 1 {
|
||||
return searchResult.Models, nil
|
||||
}
|
||||
|
||||
// Create a conversation fragment
|
||||
fragment := cogito.NewEmptyFragment().
|
||||
AddMessage("user",
|
||||
|
||||
Reference in New Issue
Block a user