spoc-bot-vr/ai_test.go

29 lines
381 B
Go

//go:build ai
package main
import (
"context"
"testing"
"time"
)
func TestAILocal(t *testing.T) {
ctx, can := context.WithTimeout(context.Background(), time.Minute)
defer can()
ai := NewAILocal(
"checkpointPath",
"tokenizerPath",
0.9,
256,
0.9,
)
if result, err := ai.Do(ctx, "hello world"); err != nil {
t.Fatal(err)
} else {
t.Logf("%s", result)
}
}