aisbreaker-api-js - v0.1.15 / utils/ResponseCollector / ResponseCollector
Class: ResponseCollector
utils/ResponseCollector.ResponseCollector
Collect all streamed ReponseEvents to create a FinalResponse at the end
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new ResponseCollector(request
)
Parameters
Name | Type |
---|---|
request | Request |
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/utils/ResponseCollector.ts:12
Properties
lastObservedEngineId
• lastObservedEngineId: undefined
| string
service specific engine/model ID
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/utils/ResponseCollector.ts:10
request
• request: Request
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/utils/ResponseCollector.ts:12
Methods
addResponseEvent
▸ addResponseEvent(responseEvent
): void
Parameters
Name | Type |
---|---|
responseEvent | ResponseEvent |
Returns
void
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/utils/ResponseCollector.ts:15
getMillisSinceStart
▸ getMillisSinceStart(): number
Returns
number
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/utils/ResponseCollector.ts:141
getResponseFinalInternResponse
▸ getResponseFinalInternResponse(): any
Create a final response from the collected response events
Returns
any
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/utils/ResponseCollector.ts:129
getResponseFinalOutputs
▸ getResponseFinalOutputs(): Output
[]
Create a final response from the collected response events
Returns
Output
[]
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/utils/ResponseCollector.ts:113