aisbreaker-api-js - v0.1.15 / api/models/Request / ClientRequest
Interface: ClientRequest
api/models/Request.ClientRequest
Same as Request
but with more optional fields.
Table of contents
Properties
Properties
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:82
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:68
inputs
• Optional
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:52
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:77
requested
• Optional
requested: RequestedOptions
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:70
streamProgressFunction
• Optional
streamProgressFunction: StreamProgressFunction
If set to true, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE]
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:87
text
• Optional
text: string
Convenience field for sending a single text message to the AI service. It is equivalent to inputs: [{text: {role: 'user', content: text}}]
.
Exactly one of either text
or inputs
must be set.
In a normalized request, the text
field is never set, i.e. normal service implementation can ignore this field.
Defined in
aisbreaker-js/packages/aisbreaker-api-js/src/api/models/Request.ts:63