MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / TEST_F

Function TEST_F

tests/integration/tool_calling_integration_test.cpp:651–666  ·  view source on GitHub ↗

Test OpenAI-specific tool choice "none"

Source from the content-addressed store, hash-verified

649
650// Test OpenAI-specific tool choice "none"
651TEST_F(OpenAISpecificToolTest, ToolChoiceNoneSupport) {
652 if (!use_real_api_) {
653 GTEST_SKIP() << "No OPENAI_API_KEY environment variable set";
654 }
655
656 GenerateOptions options(model_, "Tell me about the weather");
657 options.tools = tools_;
658 options.tool_choice = ToolChoice::none();
659 options.max_tokens = 150;
660
661 auto result = client_->generate_text(options);
662
663 TestAssertions::assertSuccess(result);
664 EXPECT_FALSE(result.text.empty());
665 EXPECT_FALSE(result.has_tool_calls());
666}
667
668class AnthropicSpecificToolTest : public ::testing::Test {
669 protected:

Callers

nothing calls this directly

Calls 4

generate_textMethod · 0.45
has_tool_callsMethod · 0.45
is_successMethod · 0.45
error_messageMethod · 0.45

Tested by

no test coverage detected