models(gallery): add mistral-0.3 and command-r, update functions (#2388)

* models(gallery): add mistral-0.3 and command-r, update functions

Add also disable_parallel_new_lines to disable newlines in the JSON
output when forcing parallel tools. Some models (like mistral) might be
very sensible to that when being used for function calling.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* models(gallery): add aya-23-8b

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-05-23 19:16:08 +02:00 committed by GitHub
parent eb11a46a73
commit ea330d452d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 266 additions and 9 deletions

View file

@ -1,11 +1,12 @@
package functions
type GrammarOption struct {
PropOrder string
Suffix string
MaybeArray bool
MaybeString bool
NoMixedFreeString bool
PropOrder string
Suffix string
MaybeArray bool
DisableParallelNewLines bool
MaybeString bool
NoMixedFreeString bool
}
func (o *GrammarOption) Apply(options ...func(*GrammarOption)) {
@ -18,6 +19,10 @@ var EnableMaybeArray = func(o *GrammarOption) {
o.MaybeArray = true
}
var DisableParallelNewLines = func(o *GrammarOption) {
o.DisableParallelNewLines = true
}
var EnableMaybeString = func(o *GrammarOption) {
o.MaybeString = true
}