mirror of https://github.com/aliasrobotics/cai.git
fix function schema test
This commit is contained in:
parent
f07059cbd5
commit
99469a17e2
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue