aisbreaker-api-js - v0.1.15 / api/models/Request / Request
Interface: Request
api/models/Request.Request
Send a message to the AI service and get the response.
Table of contents
Properties
Properties
abortSignal
• Optional
abortSignal: AbortSignal
If set, the request will be aborted when the signal is aborted.
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:42
clientUser
• Optional
clientUser: string
A unique identifier representing the end-user, which can help the AI service to monitor and detect abuse. ( e.g. https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids ) the value is opaque to the API. Do not use emails or other personally identifiable information (PII); instead use temporary identifies or hashed or encrypted values. ALternatively, this field can also be used for tracing and debugging purposes.
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:31
conversationState
• Optional
conversationState: string
The value presents the conversation, e.g. the history of all (relevant) messages of the conversation. Not set for the first call of a conversation. The conversation_state
value is returned by previous call of the same conversation. The value is opaque to the client, it could be e.g. a conversation ID or the full conversation state as base64-encoded JSON string or ...
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:17
inputs
• inputs: Input
[]
List of messages (prompts, media, ...) to send to the AI service for the conversation specified in conversation_state
.
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:12
internOptions
• Optional
internOptions: any
Service implementation specific opts.
Try to avoid using them because they are NOT portable!!!
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:26
requested
• Optional
requested: RequestedOptions
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:19
streamProgressFunction
• Optional
streamProgressFunction: StreamProgressFunction
If set to true, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as events as they become available.
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:37