@hubai/brain-sdk
Table of contents
Enumerations
Classes
Interfaces
- IAudioTranscriberBrainService
- IBrainPromptContext
- IBrainService
- IBrainSettings
- IImageGenerationBrainService
- ITextBrainService
- ImageGenerationBrainPrompt
- TextBrainPrompt
Type Aliases
Type Aliases
BrainPromptResponse
Ƭ BrainPromptResponse: Object
The response we get back from the brain
Type declaration
Name | Type | Description |
---|---|---|
attachments? | ResponseFile [] | The files we are sending back to the user |
result | string | The text result of the prompt |
validationResult | BrainSettingsValidationResult | The result of the settings/prompt validation. |
Defined in
FileAttachment
Ƭ FileAttachment: Object
An attachment
Type declaration
Name | Type | Description |
---|---|---|
id? | string | An unique id of the attachment (Optional) |
mimeType | string | The mime type of the file |
originalFileName? | string | The original file name (Optional) |
path | string | The path of the attached file (required, must be an absolute local path ) |
size | number | The size of the file in bytes. |
Defined in
FileType
Ƭ FileType: "image"
| "video"
| "audio"
| "document"
| "other"
The type of file we are sending to the brain
Defined in
LocalAudioPrompt
Ƭ LocalAudioPrompt: Object
Represents an audio prompt sent to the brain
Type declaration
Name | Type | Description |
---|---|---|
audioFilePath | string | The path of the audio file |
language | string | The language-code of the audio file (default is en) |
Defined in
ResponseFile
Ƭ ResponseFile: Object
Type declaration
Name | Type | Description |
---|---|---|
caption? | string | The file description (Optional) |
data | Buffer | string | The data of the file. It can be a string (url or base64 encoded) or a Buffer (binary) |
fileName? | string | The original file name (Optional) |
fileType | FileType | The type of file |
mimeType | string | The mimetype of the file |
Defined in
UserRole
Ƭ UserRole: "user"
| "brain"
| "system"
The role of the sender (user, brain or system)