Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions instructions/copilot-sdk-python.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ uv add copilot-sdk

```python
from copilot import CopilotClient
import asyncio

async with CopilotClient() as client:
# Use client...
pass
async def main():
async with CopilotClient() as client:
# Use client...
pass

asyncio.run(main())
```

### Client Configuration Options
Expand All @@ -56,10 +60,16 @@ When creating a CopilotClient, use a dict with these keys:
For explicit control:

```python
client = CopilotClient({"auto_start": False})
await client.start()
# Use client...
await client.stop()
from copilot import CopilotClient
import asyncio

async def main():
client = CopilotClient({"auto_start": False})
await client.start()
# Use client...
await client.stop()

asyncio.run(main())
```

Use `force_stop()` when `stop()` takes too long.
Expand Down