Skip to main content

Class: AiChatbotClient

Hierarchy

Methods

ask

ask(profileId, prompt, options?): Promise<string>

Sends a prompt to the specified profile id and returns the response as a Promise of string.

Parameters

NameTypeDescription
profileIdstringThe profile id.
promptstringThe prompt.
options?AskOptionsWithoutVoiceThe options to send to the chat model.

Returns

Promise<string>

A promise that resolves when the chat is complete. The resolved value is the entire response.

Inherited from

AiAgentClient.ask


askInternal

askInternal<T>(profileId, prompt, isVoiceResponse, options?): Promise<T>

Type parameters

Name
T

Parameters

NameType
profileIdstring
promptstring | File
isVoiceResponseboolean
options?Omit<AiChatbotChatOptions, "smoothTyping">

Returns

Promise<T>

Inherited from

AiAgentClient.askInternal


askWithVoiceResponse

askWithVoiceResponse(profileId, prompt, options?): Promise<AskWithVoiceResponse>

Parameters

NameType
profileIdstring
promptstring
options?Omit<AiChatbotChatOptions, "smoothTyping">

Returns

Promise<AskWithVoiceResponse>

Inherited from

AiAgentClient.askWithVoiceResponse


chat

chat(profileId, prompt, options?): Observable<string>

Sends a prompt to the specified profile id.

Parameters

NameTypeDescription
profileIdstringThe profile id.
promptstringThe prompt.
options?ChatOptionsWithoutVoiceThe options to send to the chat model.

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

AiAgentClient.chat


profile

profile(id): AiAgentReference

Retrieves a profile reference for the provided id. A profile reference can be used to create and update profiles, add instructions and context and start chats.

Parameters

NameTypeDescription
idstringThe id of the profile.

Returns

AiAgentReference

The profile reference.

Inherited from

AiAgentClient.profile


search(agentId, options): Promise<AiSearchResponse>

Parameters

NameType
agentIdstring
optionsAiSearchOptions

Returns

Promise<AiSearchResponse>

Inherited from

AiAgentClient.search


transcribeAndAsk

transcribeAndAsk(profileId, fileToTranscribe, options?): Promise<AiTranscribeAndAskResponse>

Parameters

NameType
profileIdstring
fileToTranscribeFile
options?AskOptionsWithoutVoice

Returns

Promise<AiTranscribeAndAskResponse>

Inherited from

AiAgentClient.transcribeAndAsk


transcribeAndAskWithVoiceResponse

transcribeAndAskWithVoiceResponse(profileId, fileToTranscribe, options?): Promise<TranscribeAndAskWithVoiceResponse>

Parameters

NameType
profileIdstring
fileToTranscribeFile
options?Omit<AiChatbotChatOptions, "smoothTyping">

Returns

Promise<TranscribeAndAskWithVoiceResponse>

Inherited from

AiAgentClient.transcribeAndAskWithVoiceResponse


transcribeAndChat

transcribeAndChat(profileId, fileToTranscribe, options?): Promise<TranscribeAndChatResponse>

Parameters

NameType
profileIdstring
fileToTranscribeFile
options?ChatOptionsWithoutVoice

Returns

Promise<TranscribeAndChatResponse>

Inherited from

AiAgentClient.transcribeAndChat