mirror of https://github.com/aliasrobotics/cai.git
final fix
This commit is contained in:
parent
73de470fb0
commit
8aa1ae0424
|
|
@ -2,9 +2,9 @@ from typing import Optional
|
|||
|
||||
import graphviz # type: ignore
|
||||
|
||||
from agents import Agent
|
||||
from agents.handoffs import Handoff
|
||||
from agents.tool import Tool
|
||||
from cai.sdk.agents import Agent
|
||||
from cai.sdk.agents.handoffs import Handoff
|
||||
from cai.sdk.agents.tool import Tool
|
||||
|
||||
|
||||
def get_main_graph(agent: Agent) -> str:
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import pytest
|
|||
from pydantic import BaseModel
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from agents import Agent, AgentOutputSchema, ModelBehaviorError, Runner, UserError
|
||||
from agents.agent_output import _WRAPPER_DICT_KEY
|
||||
from agents.util import _json
|
||||
from cai.sdk.agents import Agent, AgentOutputSchema, ModelBehaviorError, Runner, UserError
|
||||
from cai.sdk.agents.agent_output import _WRAPPER_DICT_KEY
|
||||
from cai.sdk.agents.util import _json
|
||||
|
||||
|
||||
def test_plain_text_output():
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import pytest
|
|||
from inline_snapshot import snapshot
|
||||
from pydantic import BaseModel
|
||||
|
||||
from agents import Agent, Runner
|
||||
from agents.agent_output import _WRAPPER_DICT_KEY
|
||||
from agents.util._pretty_print import pretty_print_result, pretty_print_run_result_streaming
|
||||
from cai.sdk.agents import Agent, Runner
|
||||
from cai.sdk.agents.agent_output import _WRAPPER_DICT_KEY
|
||||
from cai.sdk.agents.util._pretty_print import pretty_print_result, pretty_print_run_result_streaming
|
||||
from tests.fake_model import FakeModel
|
||||
|
||||
from .test_responses import get_final_output_message, get_text_message
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ from inline_snapshot import snapshot
|
|||
from openai import AsyncOpenAI
|
||||
from openai.types.responses import ResponseCompletedEvent
|
||||
|
||||
from agents import ModelSettings, ModelTracing, OpenAIResponsesModel, trace
|
||||
from agents.tracing.span_data import ResponseSpanData
|
||||
from cai.sdk.agents import ModelSettings, ModelTracing, OpenAIResponsesModel, trace
|
||||
from cai.sdk.agents.tracing.span_data import ResponseSpanData
|
||||
from tests import fake_model
|
||||
|
||||
from .testing_processor import assert_no_spans, fetch_normalized_spans, fetch_ordered_spans
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from typing import Any
|
|||
import pytest
|
||||
from pydantic import BaseModel
|
||||
|
||||
from agents import Agent, RunResult
|
||||
from cai.sdk.agents import Agent, RunResult
|
||||
|
||||
|
||||
def create_run_result(final_output: Any) -> RunResult:
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ from __future__ import annotations
|
|||
|
||||
import pytest
|
||||
|
||||
from agents import Agent, RunConfig, Runner
|
||||
from agents.models.interface import Model, ModelProvider
|
||||
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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from typing import Any
|
|||
import pytest
|
||||
from pydantic import BaseModel
|
||||
|
||||
from agents import (
|
||||
from cai.sdk.agents import (
|
||||
Agent,
|
||||
MessageOutputItem,
|
||||
ModelResponse,
|
||||
|
|
@ -19,7 +19,7 @@ from agents import (
|
|||
TResponseInputItem,
|
||||
Usage,
|
||||
)
|
||||
from agents._run_impl import (
|
||||
from cai.sdk.agents._run_impl import (
|
||||
NextStepFinalOutput,
|
||||
NextStepHandoff,
|
||||
NextStepRunAgain,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from openai.types.responses.response_computer_tool_call import ActionClick
|
|||
from openai.types.responses.response_reasoning_item import ResponseReasoningItem, Summary
|
||||
from pydantic import BaseModel
|
||||
|
||||
from agents import (
|
||||
from cai.sdk.agents import (
|
||||
Agent,
|
||||
Computer,
|
||||
ComputerTool,
|
||||
|
|
@ -23,7 +23,7 @@ from agents import (
|
|||
ToolCallItem,
|
||||
Usage,
|
||||
)
|
||||
from agents._run_impl import RunImpl
|
||||
from cai.sdk.agents._run_impl import RunImpl
|
||||
|
||||
from .test_responses import (
|
||||
get_final_output_message,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from agents.exceptions import UserError
|
||||
from agents.strict_schema import ensure_strict_json_schema
|
||||
from cai.sdk.agents.exceptions import UserError
|
||||
from cai.sdk.agents.strict_schema import ensure_strict_json_schema
|
||||
|
||||
|
||||
def test_empty_schema_has_additional_properties_false():
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from agents import Agent, ModelSettings, Runner
|
||||
from agents._run_impl import AgentToolUseTracker, RunImpl
|
||||
from cai.sdk.agents import Agent, ModelSettings, Runner
|
||||
from cai.sdk.agents._run_impl import AgentToolUseTracker, RunImpl
|
||||
|
||||
from .fake_model import FakeModel
|
||||
from .test_responses import get_function_tool, get_function_tool_call, get_text_message
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import pytest
|
||||
from pydantic import BaseModel
|
||||
|
||||
from agents import Agent, Handoff, function_tool, handoff
|
||||
from agents.exceptions import UserError
|
||||
from agents.models.openai_chatcompletions import ToolConverter
|
||||
from agents.tool import FileSearchTool, WebSearchTool
|
||||
from cai.sdk.agents import Agent, Handoff, function_tool, handoff
|
||||
from cai.sdk.agents.exceptions import UserError
|
||||
from cai.sdk.agents.models.openai_chatcompletions import ToolConverter
|
||||
from cai.sdk.agents.tool import FileSearchTool, WebSearchTool
|
||||
|
||||
|
||||
def some_function(a: str, b: list[int]) -> str:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from typing import cast
|
|||
import pytest
|
||||
from openai.types.responses.response_input_item_param import FunctionCallOutput
|
||||
|
||||
from agents import (
|
||||
from cai.sdk.agents import (
|
||||
Agent,
|
||||
FunctionToolResult,
|
||||
RunConfig,
|
||||
|
|
@ -16,7 +16,7 @@ from agents import (
|
|||
ToolsToFinalOutputResult,
|
||||
UserError,
|
||||
)
|
||||
from agents._run_impl import RunImpl
|
||||
from cai.sdk.agents._run_impl import RunImpl
|
||||
|
||||
from .test_responses import get_function_tool
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ from unittest.mock import MagicMock, patch
|
|||
import httpx
|
||||
import pytest
|
||||
|
||||
from agents.tracing.processor_interface import TracingProcessor
|
||||
from agents.tracing.processors import BackendSpanExporter, BatchTraceProcessor
|
||||
from agents.tracing.span_data import AgentSpanData
|
||||
from agents.tracing.spans import SpanImpl
|
||||
from agents.tracing.traces import TraceImpl
|
||||
from cai.sdk.agents.tracing.processor_interface import TracingProcessor
|
||||
from cai.sdk.agents.tracing.processors import BackendSpanExporter, BatchTraceProcessor
|
||||
from cai.sdk.agents.tracing.span_data import AgentSpanData
|
||||
from cai.sdk.agents.tracing.spans import SpanImpl
|
||||
from cai.sdk.agents.tracing.traces import TraceImpl
|
||||
|
||||
|
||||
def get_span(processor: TracingProcessor) -> SpanImpl[AgentSpanData]:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from typing import Any
|
|||
import pytest
|
||||
from inline_snapshot import snapshot
|
||||
|
||||
from agents.tracing import (
|
||||
from cai.sdk.agents.tracing import (
|
||||
Span,
|
||||
Trace,
|
||||
agent_span,
|
||||
|
|
@ -16,7 +16,7 @@ from agents.tracing import (
|
|||
handoff_span,
|
||||
trace,
|
||||
)
|
||||
from agents.tracing.spans import SpanError
|
||||
from cai.sdk.agents.tracing.spans import SpanError
|
||||
|
||||
from .testing_processor import (
|
||||
SPAN_PROCESSOR_TESTING,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import pytest
|
|||
from inline_snapshot import snapshot
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from agents import (
|
||||
from cai.sdk.agents import (
|
||||
Agent,
|
||||
GuardrailFunctionOutput,
|
||||
InputGuardrail,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import pytest
|
|||
from inline_snapshot import snapshot
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from agents import (
|
||||
from cai.sdk.agents import (
|
||||
Agent,
|
||||
GuardrailFunctionOutput,
|
||||
InputGuardrail,
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ from unittest.mock import Mock
|
|||
import graphviz # type: ignore
|
||||
import pytest
|
||||
|
||||
from agents import Agent
|
||||
from agents.extensions.visualization import (
|
||||
from cai.sdk.agents import Agent
|
||||
from cai.sdk.agents.extensions.visualization import (
|
||||
draw_graph,
|
||||
get_all_edges,
|
||||
get_all_nodes,
|
||||
get_main_graph,
|
||||
)
|
||||
from agents.handoffs import Handoff
|
||||
from cai.sdk.agents.handoffs import Handoff
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
Loading…
Reference in New Issue