Skip to content

Commit

Permalink
genai: fix buggy test case for array with nullable anyof
Browse files Browse the repository at this point in the history
- An `items` field in JSON Schema can't have `items` as its direct child
  • Loading branch information
RazCrimson committed Feb 3, 2025
1 parent 8c31e84 commit 390db62
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libs/genai/tests/unit_tests/test_function_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ def possibly_none_list(
# Convert to OpenAI tool
oai_tool = convert_to_openai_tool(possibly_none_list)

# Manually assign the 'items' type in the parameters
oai_tool["function"]["parameters"]["properties"]["items"]["items"] = {
"type": "string"
}

# Convert to GenAI, then to dict
genai_tool = convert_to_genai_function_declarations([oai_tool])
genai_tool_dict = tool_to_dict(genai_tool)
Expand Down

0 comments on commit 390db62

Please sign in to comment.