Skip to content

Commit 67cb6fb

Browse files
committed
AcceptAllModels return CompletitionsModels as fallback
1 parent 25ced0d commit 67cb6fb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Services/AI/AcceptAllModelsCatalog.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
namespace App\Services\AI;
2525

26+
use Symfony\AI\Platform\Bridge\Generic\CompletionsModel;
2627
use Symfony\AI\Platform\Exception\ModelNotFoundException;
2728
use Symfony\AI\Platform\Model;
2829
use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface;
@@ -47,7 +48,7 @@ public function getModel(string $modelName): Model
4748
return $this->decorated->getModel($modelName);
4849
} catch (ModelNotFoundException $e) {
4950
//If the model is not found, return a generic model with the given name and no capabilities.
50-
return new Model($modelName, []);
51+
return new CompletionsModel($modelName, []);
5152
}
5253
}
5354

0 commit comments

Comments
 (0)