Skip to content

Commit bbe7749

Browse files
committed
[migration][gpt-4o-mini -> gpt-5.4]
1 parent 62f52ea commit bbe7749

File tree

340 files changed

+1982
-1699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+1982
-1699
lines changed

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ from swarms import Agent
144144

145145
# Initialize a new agent
146146
agent = Agent(
147-
model_name="gpt-4o-mini", # Specify the LLM
147+
model_name="gpt-5.4", # Specify the LLM
148148
max_loops="auto", # Set the number of interactions
149149
interactive=True, # Enable interactive mode for real-time feedback
150150
)
@@ -164,14 +164,14 @@ from swarms import Agent, SequentialWorkflow
164164
researcher = Agent(
165165
agent_name="Researcher",
166166
system_prompt="Your job is to research the provided topic and provide a detailed summary.",
167-
model_name="gpt-4o-mini",
167+
model_name="gpt-5.4",
168168
)
169169

170170
# Agent 2: The Writer
171171
writer = Agent(
172172
agent_name="Writer",
173173
system_prompt="Your job is to take the research summary and write a beautiful, engaging blog post about it.",
174-
model_name="gpt-4o-mini",
174+
model_name="gpt-5.4",
175175
)
176176

177177
# Create a sequential workflow where the researcher's output feeds into the writer's input
@@ -200,7 +200,7 @@ swarm = AutoSwarmBuilder(
200200
verbose=True,
201201
max_loops=1,
202202
return_agents=True,
203-
model_name="gpt-4o-mini",
203+
model_name="gpt-5.4",
204204
)
205205

206206
# Let the builder automatically create agents and workflows
@@ -257,14 +257,14 @@ from swarms import Agent, SequentialWorkflow
257257
researcher = Agent(
258258
agent_name="Researcher",
259259
system_prompt="Your job is to research the provided topic and provide a detailed summary.",
260-
model_name="gpt-4o-mini",
260+
model_name="gpt-5.4",
261261
)
262262

263263
# Agent 2: The Writer
264264
writer = Agent(
265265
agent_name="Writer",
266266
system_prompt="Your job is to take the research summary and write a beautiful, engaging blog post about it.",
267-
model_name="gpt-4o-mini",
267+
model_name="gpt-5.4",
268268
)
269269

270270
# Create a sequential workflow where the researcher's output feeds into the writer's input
@@ -289,21 +289,21 @@ from swarms import Agent, ConcurrentWorkflow
289289
market_analyst = Agent(
290290
agent_name="Market-Analyst",
291291
system_prompt="Analyze market trends and provide insights on the given topic.",
292-
model_name="gpt-4o-mini",
292+
model_name="gpt-5.4",
293293
max_loops=1,
294294
)
295295

296296
financial_analyst = Agent(
297297
agent_name="Financial-Analyst",
298298
system_prompt="Provide financial analysis and recommendations on the given topic.",
299-
model_name="gpt-4o-mini",
299+
model_name="gpt-5.4",
300300
max_loops=1,
301301
)
302302

303303
risk_analyst = Agent(
304304
agent_name="Risk-Analyst",
305305
system_prompt="Assess risks and provide risk management strategies for the given topic.",
306-
model_name="gpt-4o-mini",
306+
model_name="gpt-5.4",
307307
max_loops=1,
308308
)
309309

@@ -331,9 +331,9 @@ Inspired by `einsum`, `AgentRearrange` lets you define complex, non-linear relat
331331
from swarms import Agent, AgentRearrange
332332

333333
# Define agents
334-
researcher = Agent(agent_name="researcher", model_name="gpt-4o-mini")
335-
writer = Agent(agent_name="writer", model_name="gpt-4o-mini")
336-
editor = Agent(agent_name="editor", model_name="gpt-4o-mini")
334+
researcher = Agent(agent_name="researcher", model_name="gpt-5.4")
335+
writer = Agent(agent_name="writer", model_name="gpt-5.4")
336+
editor = Agent(agent_name="editor", model_name="gpt-5.4")
337337

338338
# Define a flow: researcher sends work to both writer and editor simultaneously
339339
# This is a one-to-many relationship
@@ -362,8 +362,8 @@ print(outputs)
362362
from swarms import Agent, GraphWorkflow, Node, Edge, NodeType
363363
364364
# Define agents and a simple python function as nodes
365-
code_generator = Agent(agent_name="CodeGenerator", system_prompt="Write Python code for the given task.", model_name="gpt-4o-mini")
366-
code_tester = Agent(agent_name="CodeTester", system_prompt="Test the given Python code and find bugs.", model_name="gpt-4o-mini")
365+
code_generator = Agent(agent_name="CodeGenerator", system_prompt="Write Python code for the given task.", model_name="gpt-5.4")
366+
code_tester = Agent(agent_name="CodeTester", system_prompt="Test the given Python code and find bugs.", model_name="gpt-5.4")
367367
368368
# Create nodes for the graph
369369
node1 = Node(id="generator", agent=code_generator)
@@ -396,9 +396,9 @@ from swarms import Agent
396396
from swarms.structs.swarm_router import SwarmRouter, SwarmType
397397

398398
# Define a few generic agents
399-
writer = Agent(agent_name="Writer", system_prompt="You are a creative writer.", model_name="gpt-4o-mini")
400-
editor = Agent(agent_name="Editor", system_prompt="You are an expert editor for stories.", model_name="gpt-4o-mini")
401-
reviewer = Agent(agent_name="Reviewer", system_prompt="You are a final reviewer who gives a score.", model_name="gpt-4o-mini")
399+
writer = Agent(agent_name="Writer", system_prompt="You are a creative writer.", model_name="gpt-5.4")
400+
editor = Agent(agent_name="Editor", system_prompt="You are an expert editor for stories.", model_name="gpt-5.4")
401+
reviewer = Agent(agent_name="Reviewer", system_prompt="You are a final reviewer who gives a score.", model_name="gpt-5.4")
402402

403403
# The agents and task will be the same for all examples
404404
agents = [writer, editor, reviewer]
@@ -426,7 +426,7 @@ print("Running a Mixture of Agents Workflow...")
426426
aggregator = Agent(
427427
agent_name="Aggregator",
428428
system_prompt="Combine the story, edits, and review into a final document.",
429-
model_name="gpt-4o-mini"
429+
model_name="gpt-5.4"
430430
)
431431
moa_router = SwarmRouter(
432432
swarm_type=SwarmType.MixtureOfAgents,
@@ -450,15 +450,15 @@ The `MixtureOfAgents` architecture processes tasks by feeding them to multiple "
450450
from swarms import Agent, MixtureOfAgents
451451

452452
# Define expert agents
453-
financial_analyst = Agent(agent_name="FinancialAnalyst", system_prompt="Analyze financial data.", model_name="gpt-4o-mini")
454-
market_analyst = Agent(agent_name="MarketAnalyst", system_prompt="Analyze market trends.", model_name="gpt-4o-mini")
455-
risk_analyst = Agent(agent_name="RiskAnalyst", system_prompt="Analyze investment risks.", model_name="gpt-4o-mini")
453+
financial_analyst = Agent(agent_name="FinancialAnalyst", system_prompt="Analyze financial data.", model_name="gpt-5.4")
454+
market_analyst = Agent(agent_name="MarketAnalyst", system_prompt="Analyze market trends.", model_name="gpt-5.4")
455+
risk_analyst = Agent(agent_name="RiskAnalyst", system_prompt="Analyze investment risks.", model_name="gpt-5.4")
456456

457457
# Define the aggregator agent
458458
aggregator = Agent(
459459
agent_name="InvestmentAdvisor",
460460
system_prompt="Synthesize the financial, market, and risk analyses to provide a final investment recommendation.",
461-
model_name="gpt-4o-mini"
461+
model_name="gpt-5.4"
462462
)
463463

464464
# Create the MoA swarm
@@ -482,8 +482,8 @@ print(recommendation)
482482
from swarms import Agent, GroupChat
483483

484484
# Define agents for a debate
485-
tech_optimist = Agent(agent_name="TechOptimist", system_prompt="Argue for the benefits of AI in society.", model_name="gpt-4o-mini")
486-
tech_critic = Agent(agent_name="TechCritic", system_prompt="Argue against the unchecked advancement of AI.", model_name="gpt-4o-mini")
485+
tech_optimist = Agent(agent_name="TechOptimist", system_prompt="Argue for the benefits of AI in society.", model_name="gpt-5.4")
486+
tech_critic = Agent(agent_name="TechCritic", system_prompt="Argue against the unchecked advancement of AI.", model_name="gpt-5.4")
487487

488488
# Create the group chat
489489
chat = GroupChat(
@@ -514,25 +514,25 @@ from swarms import Agent, HierarchicalSwarm
514514
content_strategist = Agent(
515515
agent_name="Content-Strategist",
516516
system_prompt="You are a senior content strategist. Develop comprehensive content strategies, editorial calendars, and content roadmaps.",
517-
model_name="gpt-4o-mini"
517+
model_name="gpt-5.4"
518518
)
519519

520520
creative_director = Agent(
521521
agent_name="Creative-Director",
522522
system_prompt="You are a creative director. Develop compelling advertising concepts, visual directions, and campaign creativity.",
523-
model_name="gpt-4o-mini"
523+
model_name="gpt-5.4"
524524
)
525525

526526
seo_specialist = Agent(
527527
agent_name="SEO-Specialist",
528528
system_prompt="You are an SEO expert. Conduct keyword research, optimize content, and develop organic growth strategies.",
529-
model_name="gpt-4o-mini"
529+
model_name="gpt-5.4"
530530
)
531531

532532
brand_strategist = Agent(
533533
agent_name="Brand-Strategist",
534534
system_prompt="You are a brand strategist. Develop brand positioning, identity systems, and market differentiation strategies.",
535-
model_name="gpt-4o-mini"
535+
model_name="gpt-5.4"
536536
)
537537

538538
# Create the hierarchical swarm with a director

docs/developer_guides/web_scraper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ from swarms_tools import scrape_and_format_sync
3535

3636
agent = Agent(
3737
agent_name="Web Scraper Agent",
38-
model_name="gpt-4o-mini",
38+
model_name="gpt-5.4",
3939
tools=[scrape_and_format_sync],
4040
dynamic_context_window=True,
4141
dynamic_temperature_enabled=True,
@@ -60,7 +60,7 @@ from swarms import Agent
6060

6161
agent = Agent(
6262
agent_name="Web Scraper Agent",
63-
model_name="gpt-4o-mini",
63+
model_name="gpt-5.4",
6464
tools=[scrape_and_format_sync],
6565
dynamic_context_window=True,
6666
dynamic_temperature_enabled=True,

docs/examples/agent_stream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ from swarms import Agent
3535
# Enable real-time streaming
3636
agent = Agent(
3737
agent_name="StoryAgent",
38-
model_name="gpt-4o-mini",
38+
model_name="gpt-5.4",
3939
streaming_on=True, # 🔥 This enables real streaming!
4040
max_loops=1,
4141
print_on=True, # By default, it's False for raw streaming!

docs/examples/cli_multi_agent_quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Execute a single agent task:
163163
swarms agent \
164164
--name "Research-Agent" \
165165
--task "Summarize recent AI developments" \
166-
--model "gpt-4o-mini" \
166+
--model "gpt-5.4" \
167167
--max-loops 1
168168
```
169169

docs/examples/debate_quickstart.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Create a DebateWithJudge system using preset agents (the simplest approach):
4646
debate = DebateWithJudge(
4747
preset_agents=True, # Use built-in optimized agents
4848
max_loops=3, # 3 rounds of debate
49-
model_name="gpt-4o-mini",
49+
model_name="gpt-5.4",
5050
verbose=True
5151
)
5252
```
@@ -85,7 +85,7 @@ from swarms import DebateWithJudge
8585
debate_system = DebateWithJudge(
8686
preset_agents=True,
8787
max_loops=3,
88-
model_name="gpt-4o-mini",
88+
model_name="gpt-5.4",
8989
output_type="str-all-except-first",
9090
verbose=True,
9191
)
@@ -126,7 +126,7 @@ pro_agent = Agent(
126126
"You present arguments focusing on economic growth, technological competitiveness, "
127127
"and the risks of over-regulation stifling progress."
128128
),
129-
model_name="gpt-4o-mini",
129+
model_name="gpt-5.4",
130130
max_loops=1,
131131
)
132132

@@ -138,7 +138,7 @@ con_agent = Agent(
138138
"You present arguments focusing on public safety, ethical considerations, "
139139
"and the need for government oversight of powerful technologies."
140140
),
141-
model_name="gpt-4o-mini",
141+
model_name="gpt-5.4",
142142
max_loops=1,
143143
)
144144

@@ -150,7 +150,7 @@ judge_agent = Agent(
150150
"You synthesize the strongest arguments from both sides and provide "
151151
"balanced, actionable policy recommendations."
152152
),
153-
model_name="gpt-4o-mini",
153+
model_name="gpt-5.4",
154154
max_loops=1,
155155
)
156156

@@ -198,7 +198,7 @@ for topic, result in zip(topics, results):
198198
|-----------|---------|-------------|
199199
| `preset_agents` | `False` | Use built-in optimized agents |
200200
| `max_loops` | `3` | Number of debate rounds |
201-
| `model_name` | `"gpt-4o-mini"` | Model for preset agents |
201+
| `model_name` | `"gpt-5.4"` | Model for preset agents |
202202
| `output_type` | `"str-all-except-first"` | Output format |
203203
| `verbose` | `True` | Enable detailed logging |
204204

docs/examples/exa_search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ from swarms_tools import exa_search
3939

4040
agent = Agent(
4141
name="Exa Search Agent",
42-
llm="gpt-4o-mini",
42+
llm="gpt-5.4",
4343
tools=[exa_search],
4444
)
4545

docs/examples/x402_payment_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ app = FastAPI(title="Research Agent API")
6464
research_agent = Agent(
6565
agent_name="Research-Agent",
6666
system_prompt="You are an expert research analyst. Conduct thorough research on the given topic and provide comprehensive, well-structured insights with citations.",
67-
model_name="gpt-4o-mini",
67+
model_name="gpt-5.4",
6868
max_loops=1,
6969
tools=[exa_search],
7070
)

0 commit comments

Comments
 (0)