544. 세션에서 대화 이력·컨텍스트 조회 (Retrieve conversation history and context from a session)
- 원문: English
- 위치: Additional capabilities › Session management › Retrieve conversation history and context from a session
한 줄 요약
GetSession(세션 정보), ListInvocations(모든 Invocation 요약), GetInvocationStep(특정 체크포인트 상세)으로 저장된 대화를 꺼냅니다.
쉽게 말하면
저장해 둔 “챕터 목록"과 “특정 줄"을 다시 읽어와 대화를 이어가거나 디버깅합니다.
핵심 내용
| API | 반환 내용 |
|---|---|
GetSession | 세션 상세(메타데이터 등) |
ListInvocations | 세션 내 모든 Invocation 요약 |
GetInvocationStep | 특정 체크포인트의 상태(텍스트·이미지) |
GetInvocationStep호출 시sessionIdentifier,invocationIdentifier,invocationStepId를 지정하고, 응답의invocationStep.payload.contentBlocks에서 텍스트·이미지를 읽습니다.
SA 관점
- 재개(resume) 시나리오에서는 보통
ListInvocations로 마지막 지점을 찾고 해당 스텝을 읽어 상태를 복원하는 흐름이 됩니다. 조회 호출이 잦으면 API 할당량도 확인하세요.