I'm trying to implement multiple sessions on my bot according to this cookbook guide about multiple sessions: https://github.com/github/copilot-sdk/blob/main/cookbook/python/multiple-sessions.md
Which when I try to use list_sessions() method, it just throws AttributeError because it does not exist at all from CopilotClient object, same thing for delete_session() method which does not exist.
Here's the sample code to reproduce
import asyncio
from copilot import CopilotClient
async def main():
client = CopilotClient()
await client.start()
session = await client.create_session({
"session_id": "test-session-123",
"model": "gpt-4.1"
})
response = await session.send_and_wait({"prompt": "Hello, world!"})
print(response.data.content)
await session.destroy()
# List sessions - raises AttributeError exception ''CopilotClient' object has no attribute 'list_sessions'
_sessions = await client.list_sessions()
for s in _sessions:
print(s)
# Delete session, also raises similar exception
await client.delete_session("test-session-123")
# Stop
await client.stop()
asyncio.run(main())
I'm currently using github-copilot-sdk version 0.1.16 in which as of writing this issue... this is the latest one installed from pip. Ubuntu 24.04, venv, Python 3.12.1
I'm trying to implement multiple sessions on my bot according to this cookbook guide about multiple sessions: https://github.com/github/copilot-sdk/blob/main/cookbook/python/multiple-sessions.md
Which when I try to use
list_sessions()method, it just throws AttributeError because it does not exist at all fromCopilotClientobject, same thing fordelete_session()method which does not exist.Here's the sample code to reproduce
I'm currently using
github-copilot-sdkversion 0.1.16 in which as of writing this issue... this is the latest one installed from pip. Ubuntu 24.04, venv, Python 3.12.1