Commit Graph

2 Commits

Author SHA1 Message Date
Anthony Shaw
c65e8ab0b5 Fix Python cookbook recipes to use correct async SDK API
All 5 Python recipes and their markdown docs used a synchronous,
kwargs-based API that doesn't match the real github-copilot-sdk:

- client.start() -> await client.start() (all methods are async)
- create_session(model=...) -> create_session(SessionConfig(model=...))
- session.send(prompt=...) -> session.send(MessageOptions(prompt=...))
- session.wait_for_idle() -> session.send_and_wait() (wait_for_idle doesn't exist)
- event['type']/event['data']['content'] -> event.type/event.data.content
- All code wrapped in async def main() + asyncio.run(main())

Verified all imports resolve against github-copilot-sdk.
2026-02-11 06:19:33 -08:00
Aaron Powell
f59e0b4080 Moving the copilot-sdk cookbook content in here 2026-01-29 14:29:36 +11:00