Merge pull request #2721 from siom79/models-field-emtpy-2714

#2714 the models array can be empty
This commit is contained in:
Nate Sesti 2024-10-28 23:43:02 -07:00 • committed by GitHub
commit 694a044a60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,10 +15,10 @@ export function validateConfig(config: SerializedContinueConfig) {
const errors: ConfigValidationError[] = [];
// Validate chat models
if (!Array.isArray(config.models) || config.models.length === 0) {
if (!Array.isArray(config.models)) {
errors.push({
fatal: true,
message: "The 'models' field should be a non-empty array.",
message: "The 'models' field should be an array.",
});
} else {
config.models.forEach((model, index) => {