콘텐츠로 이동

withResponsesWebSocketSession

이 콘텐츠는 아직 번역되지 않았습니다.

function withResponsesWebSocketSession<T>(callback, options?): Promise<T>;

Runs a callback within a session-scoped Responses API websocket provider/runner and closes the provider afterwards so websocket connections do not keep the process alive.

Type Parameter

T

Parameter Type

callback

(session) => T | Promise<T>

options?

ResponsesWebSocketSessionOptions

Promise<T>