Skip to content

Commit

Permalink
add seed/remove some print
Browse files Browse the repository at this point in the history
Signed-off-by: Alexa Griffith <agriffith96@gmail.com>
  • Loading branch information
alexagriffith committed Feb 20, 2025
1 parent da036cc commit d5c02d8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/extproc/real_providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,10 @@ func TestWithRealProviders(t *testing.T) {
},
}),
// TODO: check if we should seed.
//Seed: openai.Int(0),
Seed: openai.Int(0),
Model: openai.F(tc.modelName),
}
fmt.Println("after params set")
completion, err := client.Chat.Completions.New(context.Background(), params)
fmt.Println("after completion")
if err != nil {
t.Logf("error: %v", err)
return false
Expand All @@ -243,9 +241,6 @@ func TestWithRealProviders(t *testing.T) {
// TODO: remove after test debugging done done
returnsToolCall := false
for _, choice := range completion.Choices {
t.Logf("choice content: %s", choice.Message.Content)
t.Logf("finish reason: %s", choice.FinishReason)
t.Logf("choice toolcall: %v", choice.Message.ToolCalls)
if choice.FinishReason == openai.ChatCompletionChoicesFinishReasonToolCalls {
returnsToolCall = true
}
Expand Down Expand Up @@ -293,7 +288,7 @@ func TestWithRealProviders(t *testing.T) {
// Step 4: Verify that the second response is correct
completionResult := secondChatCompletion.Choices[0].Message.Content
t.Logf("content of completion response using tool: %s", secondChatCompletion.Choices[0].Message.Content)
return completionResult == "The weather in Paris is currently sunny and 25°C."
return completionResult == "The weather in New York City is currently sunny and 25°C."
}, 500*time.Second, 200*time.Second)
})
}
Expand Down

0 comments on commit d5c02d8

Please sign in to comment.