Skip to main content

@hubai/brain-sdk

Table of contents

Enumerations

Classes

Interfaces

Type Aliases

Type Aliases

BrainPromptResponse

Ƭ BrainPromptResponse: Object

The response we get back from the brain

Type declaration

NameTypeDescription
attachments?ResponseFile[]The files we are sending back to the user
resultstringThe text result of the prompt
validationResultBrainSettingsValidationResultThe result of the settings/prompt validation.

Defined in

models/brainService.ts:6


FileAttachment

Ƭ FileAttachment: Object

An attachment

Type declaration

NameTypeDescription
id?stringAn unique id of the attachment (Optional)
mimeTypestringThe mime type of the file
originalFileName?stringThe original file name (Optional)
pathstringThe path of the attached file (required, must be an absolute local path )
sizenumberThe size of the file in bytes.

Defined in

models/brainService.ts:58


FileType

Ƭ FileType: "image" | "video" | "audio" | "document" | "other"

The type of file we are sending to the brain

Defined in

models/brainService.ts:25


LocalAudioPrompt

Ƭ LocalAudioPrompt: Object

Represents an audio prompt sent to the brain

Type declaration

NameTypeDescription
audioFilePathstringThe path of the audio file
languagestringThe language-code of the audio file (default is en)

Defined in

models/brainService.ts:190


ResponseFile

Ƭ ResponseFile: Object

Type declaration

NameTypeDescription
caption?stringThe file description (Optional)
dataBuffer | stringThe data of the file. It can be a string (url or base64 encoded) or a Buffer (binary)
fileName?stringThe original file name (Optional)
fileTypeFileTypeThe type of file
mimeTypestringThe mimetype of the file

Defined in

models/brainService.ts:27


UserRole

Ƭ UserRole: "user" | "brain" | "system"

The role of the sender (user, brain or system)

Defined in

models/brainService.ts:88