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
|
// CompletionRequest represents the request body for the completion endpoint
|
||||||
type CompletionRequest struct {
|
type CompletionRequest struct {
|
||||||
Prompt string `json:"prompt"`
|
Prompt string `json:"prompt"`
|
||||||
NumPredict int `json:"n_predict"`
|
NumPredict int `json:"n_predict"`
|
||||||
|
Temperature float32 `json:"temperature"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CompletionResponse represents a single response chunk from the streaming API
|
// 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
|
// Create request body
|
||||||
reqBody := CompletionRequest{
|
reqBody := CompletionRequest{
|
||||||
Prompt: tt.prompt,
|
Prompt: tt.prompt,
|
||||||
NumPredict: tt.maxTokens,
|
NumPredict: tt.maxTokens,
|
||||||
|
Temperature: 0.1,
|
||||||
}
|
}
|
||||||
jsonData, err := json.Marshal(reqBody)
|
jsonData, err := json.Marshal(reqBody)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user