mirror of
https://github.com/ollama/ollama.git
synced 2025-04-08 03:48:21 +02:00
Update new_runner_benchmark_test.go
This commit is contained in:
parent
90698c7d15
commit
c2b11611a8
@ -21,8 +21,9 @@ var runnerMetrics []BenchmarkMetrics
|
||||
|
||||
// CompletionRequest represents the request body for the completion endpoint
|
||||
type CompletionRequest struct {
|
||||
Prompt string `json:"prompt"`
|
||||
NumPredict int `json:"n_predict"`
|
||||
Prompt string `json:"prompt"`
|
||||
NumPredict int `json:"n_predict"`
|
||||
Temperature float32 `json:"temperature"`
|
||||
}
|
||||
|
||||
// CompletionResponse represents a single response chunk from the streaming API
|
||||
@ -115,8 +116,9 @@ func runCompletion(ctx context.Context, tt TestCase, b *testing.B) BenchmarkMetr
|
||||
|
||||
// Create request body
|
||||
reqBody := CompletionRequest{
|
||||
Prompt: tt.prompt,
|
||||
NumPredict: tt.maxTokens,
|
||||
Prompt: tt.prompt,
|
||||
NumPredict: tt.maxTokens,
|
||||
Temperature: 0.1,
|
||||
}
|
||||
jsonData, err := json.Marshal(reqBody)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user