Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ console.log(result.finalOutput);
## Functions example

```js
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, run, tool } from '@openai/agents';

const getWeatherTool = tool({
Expand Down Expand Up @@ -110,7 +110,7 @@ main().catch(console.error);
## Handoffs example

```js
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, run, tool } from '@openai/agents';

const getWeatherTool = tool({
Expand Down Expand Up @@ -147,7 +147,7 @@ main().catch(console.error);
## Voice Agent

```js
import { z } from 'zod';
import { z } from '@openai/zod';
import { RealtimeAgent, RealtimeSession, tool } from '@openai/agents-realtime';

const getWeatherTool = tool({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/ja/guides/running-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ SDK はキャッチ可能な少数のエラーをスローします。
以下は `GuardrailExecutionError` を処理するコード例です。

```typescript
import { z } from 'zod';
import { z } from '@openai/zod';
import {
Agent,
run,
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/agents/agentForcingToolUse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Agent, tool } from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

const calculatorTool = tool({
name: 'Calculator',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/agents/agentWithAodOutputType.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Agent } from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

const CalendarEvent = z.object({
name: z.string(),
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/agents/agentWithTools.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Agent, tool } from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

const getWeather = tool({
name: 'get_weather',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/context/localContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Agent, run, RunContext, tool } from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

interface UserInfo {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/guardrails/guardrails-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
InputGuardrailTripwireTriggered,
InputGuardrail,
} from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

const guardrailAgent = new Agent({
name: 'Guardrail check',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/guardrails/guardrails-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
OutputGuardrailTripwireTriggered,
OutputGuardrail,
} from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

// The output by the main agent
const MessageOutput = z.object({ response: z.string() });
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/handoffs/handoffInput.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, handoff, RunContext } from '@openai/agents';

const EscalationData = z.object({ reason: z.string() });
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/human-in-the-loop/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import { z } from '@openai/zod';
import readline from 'node:readline/promises';
import fs from 'node:fs/promises';
import { Agent, run, tool, RunState, RunResult } from '@openai/agents';
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/human-in-the-loop/toolApprovalDefinition.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { tool } from '@openai/agents';
import z from 'zod';
import z from '@openai/zod';

const sensitiveTool = tool({
name: 'cancelOrder',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/readme/readme-functions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, run, tool } from '@openai/agents';

const getWeatherTool = tool({
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/readme/readme-handoffs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, run, tool } from '@openai/agents';

const getWeatherTool = tool({
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/readme/readme-voice-agent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import { z } from '@openai/zod';
import { RealtimeAgent, RealtimeSession, tool } from '@openai/agents-realtime';

const getWeatherTool = tool({
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/results/handoffFinalOutputTypes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Agent, run } from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

const refundAgent = new Agent({
name: 'Refund Agent',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/running-agents/exceptions1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
InputGuardrail,
InputGuardrailTripwireTriggered,
} from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

const guardrailAgent = new Agent({
name: 'Guardrail check',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/running-agents/exceptions2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, run, tool, ToolCallError } from '@openai/agents';

const unstableTool = tool({
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/tools/functionTools.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { tool } from '@openai/agents';
import { z } from 'zod';
import { z } from '@openai/zod';

const getWeatherTool = tool({
name: 'get_weather',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/voice-agents/defineTool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { tool, RealtimeAgent } from '@openai/agents/realtime';
import { z } from 'zod';
import { z } from '@openai/zod';

const getWeather = tool({
name: 'get_weather',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/voice-agents/delegationAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
tool,
} from '@openai/agents/realtime';
import { handleRefundRequest } from './serverAgent';
import z from 'zod';
import z from '@openai/zod';

const refundSupervisorParameters = z.object({
request: z.string(),
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/voice-agents/serverAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'server-only';

import { Agent, run } from '@openai/agents';
import type { RealtimeItem } from '@openai/agents/realtime';
import z from 'zod';
import z from '@openai/zod';

const agent = new Agent({
name: 'Refund Expert',
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/voice-agents/toolHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
RealtimeContextData,
RealtimeItem,
} from '@openai/agents/realtime';
import { z } from 'zod';
import { z } from '@openai/zod';

const parameters = z.object({
request: z.string(),
Expand Down
6 changes: 3 additions & 3 deletions packages/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ console.log(result.finalOutput);
## Functions example

```js
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, run, tool } from '@openai/agents';

const getWeatherTool = tool({
Expand Down Expand Up @@ -107,7 +107,7 @@ main().catch(console.error);
## Handoffs example

```js
import { z } from 'zod';
import { z } from '@openai/zod';
import { Agent, run, tool } from '@openai/agents';

const getWeatherTool = tool({
Expand Down Expand Up @@ -144,7 +144,7 @@ main().catch(console.error);
## Voice Agent

```js
import { z } from 'zod';
import { z } from '@openai/zod';
import { RealtimeAgent, RealtimeSession, tool } from '@openai/agents-realtime';

const getWeatherTool = tool({
Expand Down