Spaces:
Sleeping
Sleeping
File size: 817 Bytes
a1e47c1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# coding: utf-8
# Copyright (c) 2025 inclusionAI.
from aworld.config.conf import AgentConfig
from aworld.core.agent.base import Agent
from aworld.runner import Runners
if __name__ == '__main__':
agent_config = AgentConfig(
llm_provider="openai",
llm_model_name="gpt-4o",
llm_api_key="YOUR_API_KEY",
llm_base_url="http://localhost:5080"
)
edu_sys_prompt = "You are a helpful agent to convert text to audio for children education."
edu = Agent(
conf=agent_config,
name="edu_agent",
system_prompt=edu_sys_prompt,
mcp_servers=["text_to_audio_local_sse"] # MCP server name for agent to use
)
# run
Runners.sync_run(
input="use text_to_audio_local_sse to convert text to audio: Hello, world!",
agent=edu
)
|