basic_test.go 555 B

12345678910111213141516171819202122232425262728
  1. //go:build integration
  2. package integration
  3. import (
  4. "context"
  5. "net/http"
  6. "testing"
  7. "time"
  8. "github.com/jmorganca/ollama/api"
  9. )
  10. func TestOrcaMiniBlueSky(t *testing.T) {
  11. ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
  12. defer cancel()
  13. // Set up the test data
  14. req := api.GenerateRequest{
  15. Model: "orca-mini",
  16. Prompt: "why is the sky blue?",
  17. Stream: &stream,
  18. Options: map[string]interface{}{
  19. "temperature": 0,
  20. "seed": 123,
  21. },
  22. }
  23. GenerateTestHelper(ctx, t, &http.Client{}, req, []string{"rayleigh"})
  24. }