Skip to content

Commit e843464

Browse files
authored
Merge pull request #45 from openai/f/misc-fixes
Update o1-mini to o4-mini, fix metaprompt
2 parents d856a28 + 238b431 commit e843464

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is a simple demonstration of more advanced, agentic patterns built on top of the Realtime API. In particular, this demonstrates:
44
- Sequential agent handoffs according to a defined agent graph (taking inspiration from [OpenAI Swarm](https://github.com/openai/swarm))
5-
- Background escalation to more intelligent models like o1-mini for high-stakes decisions
5+
- Background escalation to more intelligent models like o4-mini for high-stakes decisions
66
- Prompting models to follow a state machine, for example to accurately collect things like names and phone numbers with confirmation character by character to authenticate a user.
77

88
Here's a quick [demo video](https://x.com/OpenAIDevs/status/1880306081517432936) if you'd like a walkthrough. You should be able to use this repo to prototype your own multi-agent realtime voice app in less than 20 minutes!
@@ -63,7 +63,7 @@ sequenceDiagram
6363
participant NextAPI as /api/session
6464
participant RealtimeAPI as OpenAI Realtime API
6565
participant AgentManager as Agents (authentication, returns, sales, simulatedHuman)
66-
participant o1mini as "o1-mini" (Escalation Model)
66+
participant o1mini as "o4-mini" (Escalation Model)
6767
6868
Note over WebClient: User navigates to ?agentConfig=customerServiceRetail
6969
User->>WebClient: Open Page
@@ -96,11 +96,11 @@ sequenceDiagram
9696
returns->>AgentManager: function_call => checkEligibilityAndPossiblyInitiateReturn
9797
AgentManager-->>WebClient: function_call => name="checkEligibilityAndPossiblyInitiateReturn"
9898
99-
Note over WebClient: The WebClient calls /api/chat/completions with model="o1-mini"
99+
Note over WebClient: The WebClient calls /api/chat/completions with model="o4-mini"
100100
WebClient->>o1mini: "Is this item eligible for return?"
101101
o1mini->>WebClient: "Yes/No (plus notes)"
102102
103-
Note right of returns: Returns uses the result from "o1-mini"
103+
Note right of returns: Returns uses the result from "o4-mini"
104104
returns->>AgentManager: "Return is approved" or "Return is denied"
105105
AgentManager->>WebClient: conversation.item.create (assistant role)
106106
WebClient->>User: Displays final verdict
@@ -112,7 +112,7 @@ sequenceDiagram
112112
### Next steps
113113
- Check out the configs in `src/app/agentConfigs`. The example above is a minimal demo that illustrates the core concepts.
114114
- [frontDeskAuthentication](src/app/agentConfigs/frontDeskAuthentication) Guides the user through a step-by-step authentication flow, confirming each value character-by-character, authenticates the user with a tool call, and then transfers to another agent. Note that the second agent is intentionally "bored" to show how to prompt for personality and tone.
115-
- [customerServiceRetail](src/app/agentConfigs/customerServiceRetail) Also guides through an authentication flow, reads a long offer from a canned script verbatim, and then walks through a complex return flow which requires looking up orders and policies, gathering user context, and checking with `o1-mini` to ensure the return is eligible. To test this flow, say that you'd like to return your snowboard and go through the necessary prompts!
115+
- [customerServiceRetail](src/app/agentConfigs/customerServiceRetail) Also guides through an authentication flow, reads a long offer from a canned script verbatim, and then walks through a complex return flow which requires looking up orders and policies, gathering user context, and checking with `o4-mini` to ensure the return is eligible. To test this flow, say that you'd like to return your snowboard and go through the necessary prompts!
116116

117117
### Defining your own agents
118118
- You can copy these to make your own multi-agent voice app! Once you make a new agent set config, add it to `src/app/agentConfigs/index.ts` and you should be able to select it in the UI in the "Scenario" dropdown menu.

src/app/agentConfigs/customerServiceRetail/returns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ true/false/need_more_information
273273
},
274274
];
275275

276-
const model = "o1-mini";
276+
const model = "o4-mini";
277277
console.log(`checking order eligibility with model=${model}`);
278278

279279
const response = await fetch("/api/chat/completions", {

src/app/agentConfigs/voiceAgentMetaprompt.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<user_input>
44
// Describe your agent's role and personality here, as well as key flow steps
5-
</user_agent_description>
5+
</user_input>
66

77
<instructions>
88
- You are an expert at creating LLM prompts to define prompts to produce specific, high-quality voice agents

0 commit comments

Comments
 (0)