Class: AiChatbotClient
Hierarchy
↳
AiChatbotClient
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
Name | Type | Description |
---|---|---|
profileId | string | The profile id. |
prompt | string | The prompt. |
options? | AskOptionsWithoutVoice | The 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
askInternal
▸ askInternal<T
>(profileId
, prompt
, isVoiceResponse
, options?
): Promise
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
profileId | string |
prompt | string | File |
isVoiceResponse | boolean |
options? | Omit <AiChatbotChatOptions , "smoothTyping" > |
Returns
Promise
<T
>
Inherited from
askWithVoiceResponse
▸ askWithVoiceResponse(profileId
, prompt
, options?
): Promise
<AskWithVoiceResponse
>
Parameters
Name | Type |
---|---|
profileId | string |
prompt | string |
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
Name | Type | Description |
---|---|---|
profileId | string | The profile id. |
prompt | string | The prompt. |
options? | ChatOptionsWithoutVoice | The 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
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
Name | Type | Description |
---|---|---|
id | string | The id of the profile. |
Returns
The profile reference.
Inherited from
search
▸ search(agentId
, options
): Promise
<AiSearchResponse
>
Parameters
Name | Type |
---|---|
agentId | string |
options | AiSearchOptions |
Returns
Promise
<AiSearchResponse
>
Inherited from
transcribeAndAsk
▸ transcribeAndAsk(profileId
, fileToTranscribe
, options?
): Promise
<AiTranscribeAndAskResponse
>
Parameters
Name | Type |
---|---|
profileId | string |
fileToTranscribe | File |
options? | AskOptionsWithoutVoice |
Returns
Promise
<AiTranscribeAndAskResponse
>
Inherited from
AiAgentClient.transcribeAndAsk
transcribeAndAskWithVoiceResponse
▸ transcribeAndAskWithVoiceResponse(profileId
, fileToTranscribe
, options?
): Promise
<TranscribeAndAskWithVoiceResponse
>
Parameters
Name | Type |
---|---|
profileId | string |
fileToTranscribe | File |
options? | Omit <AiChatbotChatOptions , "smoothTyping" > |
Returns
Promise
<TranscribeAndAskWithVoiceResponse
>
Inherited from
AiAgentClient.transcribeAndAskWithVoiceResponse
transcribeAndChat
▸ transcribeAndChat(profileId
, fileToTranscribe
, options?
): Promise
<TranscribeAndChatResponse
>
Parameters
Name | Type |
---|---|
profileId | string |
fileToTranscribe | File |
options? | ChatOptionsWithoutVoice |
Returns
Promise
<TranscribeAndChatResponse
>