mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
Add compatibility to gpt4all models
This commit is contained in:
parent
17b1724f7c
commit
650a22aef1
3 changed files with 16 additions and 2 deletions
14
main.go
14
main.go
|
@ -36,7 +36,9 @@ func llamaFromOptions(ctx *cli.Context) (*llama.LLama, error) {
|
|||
if ctx.Bool("alpaca") {
|
||||
opts = append(opts, llama.EnableAlpaca)
|
||||
}
|
||||
|
||||
if ctx.Bool("gpt4all") {
|
||||
opts = append(opts, llama.EnableGPT4All)
|
||||
}
|
||||
return llama.New(ctx.String("model"), opts...)
|
||||
}
|
||||
|
||||
|
@ -95,6 +97,11 @@ var modelFlags = []cli.Flag{
|
|||
EnvVars: []string{"ALPACA"},
|
||||
Value: true,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "gpt4all",
|
||||
EnvVars: []string{"GPT4ALL"},
|
||||
Value: false,
|
||||
},
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -168,6 +175,11 @@ echo "An Alpaca (Vicugna pacos) is a domesticated species of South American came
|
|||
EnvVars: []string{"ALPACA"},
|
||||
Value: true,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "gpt4all",
|
||||
EnvVars: []string{"GPT4ALL"},
|
||||
Value: false,
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "context-size",
|
||||
EnvVars: []string{"CONTEXT_SIZE"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue