mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-21 11:04:59 +00:00
Update llama-go, allow to set context-size and enable alpaca model by default
This commit is contained in:
parent
973042bb4c
commit
9ba30c9c44
4 changed files with 161 additions and 45 deletions
7
api.go
7
api.go
|
@ -7,14 +7,9 @@ import (
|
|||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func api(model, listenAddr string, threads int) error {
|
||||
func api(l *llama.LLama, listenAddr string, threads int) error {
|
||||
app := fiber.New()
|
||||
|
||||
l, err := llama.New(model)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
/*
|
||||
curl --location --request POST 'http://localhost:8080/predict' --header 'Content-Type: application/json' --data-raw '{
|
||||
"text": "What is an alpaca?",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue