mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 02:16:36 +02:00
Revamp go based integration tests
This uplevels the integration tests to run the server which can allow testing an existing server, or a remote server.
This commit is contained in:
parent
a5ba0fcf78
commit
949b6c01e0
8 changed files with 313 additions and 261 deletions
28
integration/basic_test.go
Normal file
28
integration/basic_test.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
//go:build integration
|
||||
|
||||
package integration
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/jmorganca/ollama/api"
|
||||
)
|
||||
|
||||
func TestOrcaMiniBlueSky(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
|
||||
defer cancel()
|
||||
// Set up the test data
|
||||
req := api.GenerateRequest{
|
||||
Model: "orca-mini",
|
||||
Prompt: "why is the sky blue?",
|
||||
Stream: &stream,
|
||||
Options: map[string]interface{}{
|
||||
"temperature": 0,
|
||||
"seed": 123,
|
||||
},
|
||||
}
|
||||
GenerateTestHelper(ctx, t, &http.Client{}, req, []string{"rayleigh"})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue