UNPKG

@squidcloud/client

Version:

A typescript implementation of the Squid client

59 lines (58 loc) 2.18 kB
import { AiChatModelName, AiChatOptions } from '../../../internal-common/src/public-types/ai-agent.public-types'; import { Observable } from 'rxjs'; /** * Response format for transcribing audio and generating a chat response. * Contains the transcribed text and a stream of AI-generated responses. * @category AI */ export interface TranscribeAndChatResponse { /** Transcribed text from the audio input. */ transcribedPrompt: string; /** Stream of AI-generated responses. */ responseStream: Observable<string>; } /** * Response format for transcribing audio and generating a text and voice response. * Includes the transcribed prompt, the AI-generated response as text, and an audio file. * @category AI */ export interface TranscribeAndAskWithVoiceResponse { /** Transcribed text from the audio input. */ transcribedPrompt: string; /** AI-generated response as a string. */ responseString: string; /** AI-generated voice response as an audio file. */ voiceResponseFile: File; } /** * Response format for AI-generated voice responses. * Contains the AI-generated text response and the corresponding audio file. * @category AI */ export interface AskWithVoiceResponse { /** AI-generated response as a string. */ responseString: string; /** AI-generated voice response as an audio file. */ voiceResponseFile: File; } /** * Chat options that exclude voice-specific configurations. * @category AI */ export type AiChatOptionsWithoutVoice<T extends AiChatModelName | undefined = undefined> = Omit<AiChatOptions<T>, 'voiceOptions'> & { model?: T; }; /** * Options for AI-generated responses that exclude voice-specific settings and smooth typing behavior. * @category AI */ export type AiAskOptions<T extends AiChatModelName | undefined = undefined> = Omit<AiChatOptions<T>, 'voiceOptions' | 'smoothTyping'> & { model?: T; }; /** * Options for AI-generated responses that include voice-specific settings but excludes smooth typing. * @category AI */ export type AiAskOptionsWithVoice<T extends AiChatModelName | undefined = undefined> = Omit<AiChatOptions<T>, 'smoothTyping'> & { model?: T; };