DEV Community

chenhao
chenhao

Posted on

Let's write an SDK that calls Skills, and feel free to discuss and exchange ideas.

Invocation can be achieved with just a few lines of code

import asyncio
from openskills import create_agent

async def main():
    # Create agent with skills
    agent = await create_agent(
        skill_paths=["./skills"],
        api_key="your-api-key",
        model="gpt-4",
    )

    # Chat with automatic skill invocation
    response = await agent.chat("帮我总结会议")
    print(response.content)
    print(f"Used skill: {response.skill_used}")

asyncio.run(main())
Enter fullscreen mode Exit fullscreen mode

GitHub:https://github.com/twwch/OpenSkills

Top comments (0)