refactor: switch Medical Coder Agent to use built-in model_name parameter

- Remove direct OpenAIChat instantiation and llm parameter
- Pass model_name="gpt-4o-mini" (instead of gpt-4o) to Agent
- Clean up imports (drop swarm_models.OpenAIChat, add dotenv.load_dotenv)
- Preserve tweet loop logic and duplicate-checking
pull/856/head
Pavan Kumar 2 weeks ago
parent 42aa843dbd
commit bc14d1141b

@ -159,23 +159,11 @@ This is an example of how to use the TwitterTool in a production environment usi
import os
from time import time
from swarm_models import OpenAIChat
from swarms import Agent
from dotenv import load_dotenv
from swarms_tools.social_media.twitter_tool import TwitterTool
load_dotenv()
model_name = "gpt-4o"
model = OpenAIChat(
model_name=model_name,
max_tokens=3000,
openai_api_key=os.getenv("OPENAI_API_KEY"),
)
medical_coder = Agent(
agent_name="Medical Coder",
system_prompt="""
@ -224,7 +212,8 @@ medical_coder = Agent(
- For ambiguous cases, provide a brief note with reasoning and flag for clarification.
- Ensure the output format is clean, consistent, and ready for professional use.
""",
llm=model,
model_name="gpt-4o-mini",
max_tokens=3000,
max_loops=1,
dynamic_temperature_enabled=True,
)

Loading…
Cancel
Save