Update llama-go, allow to set context-size and enable alpaca model by default

This commit is contained in:
mudler 2023-03-21 19:20:23 +01:00
parent 973042bb4c
commit 9ba30c9c44
4 changed files with 161 additions and 45 deletions

7
api.go
View file

@ -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?",