Class: AiChatbotProfileReference
Hierarchy
↳
AiChatbotProfileReference
Methods
ask
▸ ask(prompt
, options?
): Promise
<string
>
Sends a prompt to the current profile and returns the response as a Promise of string.
Parameters
Name | Type | Description |
---|---|---|
prompt | string | The prompt. |
options? | Omit <AiChatbotChatOptions , "smoothTyping" > | The chat options. |
Returns
Promise
<string
>
Inherited from
askWithVoiceResponse
▸ askWithVoiceResponse(prompt
, options?
): Promise
<AskWithVoiceResponse
>
Parameters
Name | Type |
---|---|
prompt | string |
options? | Omit <AiChatbotChatOptions , "smoothTyping" > |
Returns
Promise
<AskWithVoiceResponse
>
Inherited from
AiAgentReference.askWithVoiceResponse
chat
▸ chat(prompt
, options?
): Observable
<string
>
Sends a prompt to the current profile.
Parameters
Name | Type | Description |
---|---|---|
prompt | string | The prompt. |
options? | AiChatbotChatOptions | The chat options. |
Returns
Observable
<string
>
An observable that emits when a new response token is received. The emitted value is the entire response that has been received so far.
Inherited from
context
▸ context(id?
): AiAgentContextReference
Retrieves a context reference for the current profile. A context reference can be used to add a new context entry to the profile, or update/delete an existing entry context.
Parameters
Name | Type | Description |
---|---|---|
id? | string | The id of the context entry. If no id is passed, an id will be generated and the reference will point to a new context entry. |
Returns
The context reference.
Inherited from
delete
▸ delete(): Promise
<void
>
Deletes an existing chatbot profile. This will result in an error if a profile has not yet been created for the current profile id.
Returns
Promise
<void
>
A promise that resolves when the profile is successfully deleted.
Inherited from
insert
▸ insert(data
): Promise
<void
>
Adds a new profile to the chatbot. This will result in an error if a profile already exists with the same id.
Parameters
Name | Type | Description |
---|---|---|
data | ProfileData | An object containing options for creating the profile. |
Returns
Promise
<void
>
A promise that resolves when the profile is successfully created.
Inherited from
instruction
▸ instruction(id?
): AiAgentInstructionReference
Retrieves an instruction reference for the current profile. An instruction reference can be used to add a new instruction entry to the profile, or update/delete an existing instruction entry.
Parameters
Name | Type | Description |
---|---|---|
id? | string | The id of the instruction entry. If no id is passed, an id will be generated and the reference will point to a new instruction entry. |
Returns
The instruction reference.
Inherited from
search
▸ search(options
): Promise
<AiSearchResponse
>
Parameters
Name | Type |
---|---|
options | AiSearchOptions |
Returns
Promise
<AiSearchResponse
>
Inherited from
transcribeAndAsk
▸ transcribeAndAsk(fileToTranscribe
, options?
): Promise
<AiTranscribeAndAskResponse
>
Parameters
Name | Type |
---|---|
fileToTranscribe | File |
options? | AskOptionsWithoutVoice |
Returns
Promise
<AiTranscribeAndAskResponse
>
Inherited from
AiAgentReference.transcribeAndAsk
transcribeAndAskWithVoiceResponse
▸ transcribeAndAskWithVoiceResponse(fileToTranscribe
, options?
): Promise
<TranscribeAndAskWithVoiceResponse
>
Parameters
Name | Type |
---|---|
fileToTranscribe | File |
options? | Omit <AiChatbotChatOptions , "smoothTyping" > |
Returns
Promise
<TranscribeAndAskWithVoiceResponse
>
Inherited from
AiAgentReference.transcribeAndAskWithVoiceResponse
transcribeAndChat
▸ transcribeAndChat(fileToTranscribe
, options?
): Promise
<TranscribeAndChatResponse
>
Parameters
Name | Type |
---|---|
fileToTranscribe | File |
options? | AiChatbotChatOptions |
Returns
Promise
<TranscribeAndChatResponse
>
Inherited from
AiAgentReference.transcribeAndChat
update
▸ update(data
): Promise
<void
>
Updates an existing chatbot profile. This will result in an error if a profile has not yet been created for the current profile id.
Parameters
Name | Type | Description |
---|---|---|
data | Partial <ProfileData > | An object containing options for updating the profile. |
Returns
Promise
<void
>
A promise that resolves when the profile is successfully updated.