Unverified Commit 1aa5f219 authored by Richard Huo's avatar Richard Huo Committed by GitHub
Browse files

fix: remove the tool calling flaky test as the small model is not stable in...

fix: remove the tool calling flaky test as the small model is not stable in generating Json format (#8523)
parent b441e26a
...@@ -706,40 +706,6 @@ class TestToolCallingProtocol: ...@@ -706,40 +706,6 @@ class TestToolCallingProtocol:
ids = [tc["id"] for tc in result.tool_calls] ids = [tc["id"] for tc in result.tool_calls]
assert len(ids) == len(set(ids)), f"duplicate tool ids: {ids}" assert len(ids) == len(set(ids)), f"duplicate tool ids: {ids}"
def test_complex_nested_arguments_schema_valid(self, client: OpenAI, model: str):
result = stream_chat(
client,
model,
messages=[
{
"role": "user",
"content": (
"Create a weekly team standup meeting titled 'Engineering Standup' "
"from 2025-01-15T09:00:00Z to 2025-01-15T09:30:00Z. "
"Add attendees: Alice (alice@example.com, required) and "
"Bob (bob@example.com, optional). "
"Set recurrence weekly every 1 week for 10 occurrences. "
"Location: Conference Room B. "
"Use the create_event tool."
),
}
],
tools=TOOLS_COMPLEX_ARGS,
)
if result.finish_reason != "tool_calls":
pytest.skip(
"Model declined to call create_event for complex schema "
f"(finish_reason={result.finish_reason!r})"
)
schema = tool_schema_map(TOOLS_COMPLEX_ARGS)
args = parse_and_validate_tool_call(
result.tool_calls[0], schema, expected_name="create_event"
)
assert args["title"]
assert args["start_time"]
assert args["end_time"]
assert isinstance(args.get("attendees", []), list)
def test_array_argument_schema_valid(self, client: OpenAI, model: str): def test_array_argument_schema_valid(self, client: OpenAI, model: str):
tools = [ tools = [
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment