fix function schema test

This commit is contained in:
Mery-Sanz 2025-04-11 08:11:26 +02:00
parent f07059cbd5
commit 99469a17e2
4 changed files with 5 additions and 5 deletions

View File

@ -5,8 +5,8 @@ import pytest
from cai.sdk.agents import Agent, RunConfig, Runner
from cai.sdk.agents.models.interface import Model, ModelProvider
from .fake_model import FakeModel
from .test_responses import get_text_message
from tests.fake_model import FakeModel
from tests.core.test_responses import get_text_message
class DummyProvider(ModelProvider):

View File

@ -27,7 +27,7 @@ from cai.sdk.agents._run_impl import (
SingleStepResult,
)
from .test_responses import (
from tests.core.test_responses import (
get_final_output_message,
get_function_tool,
get_function_tool_call,

View File

@ -25,7 +25,7 @@ from cai.sdk.agents import (
)
from cai.sdk.agents._run_impl import RunImpl
from .test_responses import (
from tests.core.test_responses import (
get_final_output_message,
get_function_tool,
get_function_tool_call,

View File

@ -99,7 +99,7 @@ def varargs_function(x: int, *numbers: float, flag: bool = False, **kwargs: Any)
def test_varargs_function():
"""Test a function that uses *args and **kwargs."""
func_schema = function_schema(varargs_function)
func_schema = function_schema(varargs_function, strict_json_schema=False)
# Check JSON schema structure
assert isinstance(func_schema.params_json_schema, dict)
assert func_schema.params_json_schema.get("title") == "varargs_function_args"