Skip to content

Commit 2d6cdea

Browse files
authored
fix(examples): correct AgentInputItem import type usage in examples (#503)
1 parent 3ce9513 commit 2d6cdea

File tree

6 files changed

+13
-24
lines changed

6 files changed

+13
-24
lines changed

examples/agent-patterns/llm-as-a-judge.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Agent, AgentInputItem, run, withTrace } from '@openai/agents';
1+
import { Agent, run, withTrace } from '@openai/agents';
2+
import type { AgentInputItem } from '@openai/agents';
23
import { z } from 'zod';
34
import readline from 'node:readline/promises';
45

examples/agent-patterns/routing.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import {
2-
Agent,
3-
run,
4-
withTrace,
5-
AgentInputItem,
6-
StreamedRunResult,
7-
} from '@openai/agents';
1+
import { Agent, run, withTrace } from '@openai/agents';
2+
import type { AgentInputItem } from '@openai/agents';
3+
import type { StreamedRunResult } from '@openai/agents';
84
import readline from 'node:readline/promises';
95
import { randomUUID } from 'node:crypto';
106

examples/basic/chat.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
import {
2-
Agent,
3-
AgentInputItem,
4-
run,
5-
tool,
6-
user,
7-
withTrace,
8-
} from '@openai/agents';
1+
import { Agent, run, tool, user, withTrace } from '@openai/agents';
2+
import type { AgentInputItem } from '@openai/agents';
93
import { createInterface } from 'node:readline/promises';
104
import { z } from 'zod';
115

examples/docs/results/historyLoop.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { AgentInputItem, Agent, user, run } from '@openai/agents';
1+
import { Agent, user, run } from '@openai/agents';
2+
import type { AgentInputItem } from '@openai/agents';
23

34
const agent = new Agent({
45
name: 'Assistant',

examples/docs/running-agents/chatLoop.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Agent, AgentInputItem, run } from '@openai/agents';
1+
import { Agent, run } from '@openai/agents';
2+
import type { AgentInputItem } from '@openai/agents';
23

34
let thread: AgentInputItem[] = [];
45

examples/nextjs/src/app/api/basic/route.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ import { NextRequest, NextResponse } from 'next/server';
22
import { randomUUID } from 'node:crypto';
33

44
import { agent } from '@/agents';
5-
import {
6-
AgentInputItem,
7-
Runner,
8-
RunState,
9-
RunToolApprovalItem,
10-
} from '@openai/agents';
5+
import { Runner, RunState, RunToolApprovalItem } from '@openai/agents';
6+
import type { AgentInputItem } from '@openai/agents';
117
import { db } from '@/db';
128

139
function generateConversationId() {

0 commit comments

Comments
 (0)