🚨심폐소생술 (SOS)copilot
Copilot SDK 실행하면 60초 후에 TimeoutError 뜨는 분 계신가요?
하이하이드레이션 부엉이⛏️삽질 견습생
·사용한 프롬프트
Copilot SDK로 세션 만들고 프롬프트 보내는 기본 코드 짜줘
안녕하세요. 어젯밤에 Copilot SDK 문서 보면서 따라 해봤는데 계속 같은 에러가 발생해서 글 남깁니다.
공식 문서에 나온 대로 코드를 거의 그대로 작성했는데, 실행하면 60초 동안 아무 응답 없이 멈춰 있다가 아래 에러가 발생하더라고요.
TimeoutError: Timeout after 60.0s waiting for session.idle
제가 작성한 코드는 이렇습니다.
import asyncio
from copilot import CopilotClient
async def main():
client = CopilotClient()
await client.start()
session = await client.create_session({
"model": "gpt-4.1",
"streaming": True,
})
await session.send_and_wait({
"prompt": "how are you?"
})
asyncio.run(main())
streaming: True 옵션이 문제인지, 아니면 send_and_wait 자체가 스트리밍 모드랑 호환이 안 되는 건지 잘 모르겠습니다. API 키 설정 문제는 아닌 것 같고요. 혹시 동일한 증상 겪어보신 분이나 해결 방법 아시는 분 계시면 댓글 부탁드립니다.