/* tslint:disable */ /* eslint-disable */ /** * ChatGPT Function * Backend for Azure OpenAI integrations * * The version of the OpenAPI document: v1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { ClientSecret } from './ClientSecret'; import { ClientSecretFromJSON, ClientSecretFromJSONTyped, ClientSecretToJSON, ClientSecretToJSONTyped, } from './ClientSecret'; import type { TurnDetection } from './TurnDetection'; import { TurnDetectionFromJSON, TurnDetectionFromJSONTyped, TurnDetectionToJSON, TurnDetectionToJSONTyped, } from './TurnDetection'; import type { Tool } from './Tool'; import { ToolFromJSON, ToolFromJSONTyped, ToolToJSON, ToolToJSONTyped, } from './Tool'; /** * * @export * @interface RealtimeSession */ export interface RealtimeSession { /** * * @type {string} * @memberof RealtimeSession */ id?: string | null; /** * * @type {string} * @memberof RealtimeSession */ object?: string | null; /** * * @type {number} * @memberof RealtimeSession */ expiresAt?: number | null; /** * * @type {object} * @memberof RealtimeSession */ inputAudioNoiseReduction?: object | null; /** * * @type {TurnDetection} * @memberof RealtimeSession */ turnDetection?: TurnDetection | null; /** * * @type {string} * @memberof RealtimeSession */ inputAudioFormat?: string | null; /** * * @type {object} * @memberof RealtimeSession */ inputAudioTranscription?: object | null; /** * * @type {ClientSecret} * @memberof RealtimeSession */ clientSecret?: ClientSecret | null; /** * * @type {object} * @memberof RealtimeSession */ include?: object | null; /** * * @type {string} * @memberof RealtimeSession */ model?: string | null; /** * * @type {Array} * @memberof RealtimeSession */ modalities?: Array | null; /** * * @type {string} * @memberof RealtimeSession */ instructions?: string | null; /** * * @type {string} * @memberof RealtimeSession */ voice?: string | null; /** * * @type {string} * @memberof RealtimeSession */ outputAudioFormat?: string | null; /** * * @type {string} * @memberof RealtimeSession */ toolChoice?: string | null; /** * * @type {number} * @memberof RealtimeSession */ temperature?: number | null; /** * * @type {string} * @memberof RealtimeSession */ maxResponseOutputTokens?: string | null; /** * * @type {Array} * @memberof RealtimeSession */ tools?: Array | null; } /** * Check if a given object implements the RealtimeSession interface. */ export function instanceOfRealtimeSession(value: object): value is RealtimeSession { return true; } export function RealtimeSessionFromJSON(json: any): RealtimeSession { return RealtimeSessionFromJSONTyped(json, false); } export function RealtimeSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RealtimeSession { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : json['id'], 'object': json['object'] == null ? undefined : json['object'], 'expiresAt': json['expires_at'] == null ? undefined : json['expires_at'], 'inputAudioNoiseReduction': json['input_audio_noise_reduction'] == null ? undefined : json['input_audio_noise_reduction'], 'turnDetection': json['turn_detection'] == null ? undefined : TurnDetectionFromJSON(json['turn_detection']), 'inputAudioFormat': json['input_audio_format'] == null ? undefined : json['input_audio_format'], 'inputAudioTranscription': json['input_audio_transcription'] == null ? undefined : json['input_audio_transcription'], 'clientSecret': json['client_secret'] == null ? undefined : ClientSecretFromJSON(json['client_secret']), 'include': json['include'] == null ? undefined : json['include'], 'model': json['model'] == null ? undefined : json['model'], 'modalities': json['modalities'] == null ? undefined : json['modalities'], 'instructions': json['instructions'] == null ? undefined : json['instructions'], 'voice': json['voice'] == null ? undefined : json['voice'], 'outputAudioFormat': json['output_audio_format'] == null ? undefined : json['output_audio_format'], 'toolChoice': json['tool_choice'] == null ? undefined : json['tool_choice'], 'temperature': json['temperature'] == null ? undefined : json['temperature'], 'maxResponseOutputTokens': json['max_response_output_tokens'] == null ? undefined : json['max_response_output_tokens'], 'tools': json['tools'] == null ? undefined : ((json['tools'] as Array).map(ToolFromJSON)), }; } export function RealtimeSessionToJSON(json: any): RealtimeSession { return RealtimeSessionToJSONTyped(json, false); } export function RealtimeSessionToJSONTyped(value?: RealtimeSession | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'object': value['object'], 'expires_at': value['expiresAt'], 'input_audio_noise_reduction': value['inputAudioNoiseReduction'], 'turn_detection': TurnDetectionToJSON(value['turnDetection']), 'input_audio_format': value['inputAudioFormat'], 'input_audio_transcription': value['inputAudioTranscription'], 'client_secret': ClientSecretToJSON(value['clientSecret']), 'include': value['include'], 'model': value['model'], 'modalities': value['modalities'], 'instructions': value['instructions'], 'voice': value['voice'], 'output_audio_format': value['outputAudioFormat'], 'tool_choice': value['toolChoice'], 'temperature': value['temperature'], 'max_response_output_tokens': value['maxResponseOutputTokens'], 'tools': value['tools'] == null ? undefined : ((value['tools'] as Array).map(ToolToJSON)), }; }