-
Notifications
You must be signed in to change notification settings - Fork 819
Closed
Labels
Description
python3.13
inside WSL
from copilot import CopilotClient
import asyncio
async def main():
# Create a client with default options (spawns CLI server)
#client = CopilotClient({"cli_url": "localhost:4321"})
client = CopilotClient()
await client.start()
# Create a session and send a message
session = await client.create_session({"model": "gpt-4"})
session.on(lambda event: print(event.type))
response = await session.send_and_wait({"prompt": "What is 2+2?"})
if response:
print(response.data.content)
# Clean up
await session.destroy()
await client.stop()
asyncio.run(main())
#########
SessionEventType.PENDING_MESSAGES_MODIFIED
SessionEventType.PENDING_MESSAGES_MODIFIED
File "/mnt/c/GIT/argo-events-tasks/github-actions-pin/test.py", line 13, in main
response = await session.send_and_wait({"prompt": "What is 2+2?"})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/c/GIT/argo-events-tasks/github-actions-pin/.venv/lib/python3.13/site-packages/copilot/session.py", line 183, in send_and_wait
raise asyncio.TimeoutError(
f"Timeout after {effective_timeout}s waiting for session.idle"
)
TimeoutError: Timeout after 60.0s waiting for session.idle
Reactions are currently unavailable