feat: add deepgram audio options
This commit is contained in:
@@ -51,6 +51,16 @@ export type MediaUnderstandingModelConfig = {
|
||||
timeoutSeconds?: number;
|
||||
/** Optional language hint for audio transcription. */
|
||||
language?: string;
|
||||
/** Optional Deepgram transcription options (audio only). */
|
||||
deepgram?: {
|
||||
detectLanguage?: boolean;
|
||||
punctuate?: boolean;
|
||||
smartFormat?: boolean;
|
||||
};
|
||||
/** Optional base URL override for provider requests. */
|
||||
baseUrl?: string;
|
||||
/** Optional headers merged into provider requests. */
|
||||
headers?: Record<string, string>;
|
||||
/** Auth profile id to use for this provider. */
|
||||
profile?: string;
|
||||
/** Preferred profile id if multiple are available. */
|
||||
@@ -72,6 +82,16 @@ export type MediaUnderstandingConfig = {
|
||||
timeoutSeconds?: number;
|
||||
/** Default language hint (audio). */
|
||||
language?: string;
|
||||
/** Optional Deepgram transcription options (audio only). */
|
||||
deepgram?: {
|
||||
detectLanguage?: boolean;
|
||||
punctuate?: boolean;
|
||||
smartFormat?: boolean;
|
||||
};
|
||||
/** Optional base URL override for provider requests. */
|
||||
baseUrl?: string;
|
||||
/** Optional headers merged into provider requests. */
|
||||
headers?: Record<string, string>;
|
||||
/** Attachment selection policy. */
|
||||
attachments?: MediaUnderstandingAttachmentsConfig;
|
||||
/** Ordered model list (fallbacks in order). */
|
||||
|
||||
@@ -276,6 +276,14 @@ export const MediaUnderstandingAttachmentsSchema = z
|
||||
})
|
||||
.optional();
|
||||
|
||||
const DeepgramAudioSchema = z
|
||||
.object({
|
||||
detectLanguage: z.boolean().optional(),
|
||||
punctuate: z.boolean().optional(),
|
||||
smartFormat: z.boolean().optional(),
|
||||
})
|
||||
.optional();
|
||||
|
||||
export const MediaUnderstandingModelSchema = z
|
||||
.object({
|
||||
provider: z.string().optional(),
|
||||
@@ -289,6 +297,9 @@ export const MediaUnderstandingModelSchema = z
|
||||
maxBytes: z.number().int().positive().optional(),
|
||||
timeoutSeconds: z.number().int().positive().optional(),
|
||||
language: z.string().optional(),
|
||||
deepgram: DeepgramAudioSchema,
|
||||
baseUrl: z.string().optional(),
|
||||
headers: z.record(z.string(), z.string()).optional(),
|
||||
profile: z.string().optional(),
|
||||
preferredProfile: z.string().optional(),
|
||||
})
|
||||
@@ -303,6 +314,9 @@ export const ToolsMediaUnderstandingSchema = z
|
||||
prompt: z.string().optional(),
|
||||
timeoutSeconds: z.number().int().positive().optional(),
|
||||
language: z.string().optional(),
|
||||
deepgram: DeepgramAudioSchema,
|
||||
baseUrl: z.string().optional(),
|
||||
headers: z.record(z.string(), z.string()).optional(),
|
||||
attachments: MediaUnderstandingAttachmentsSchema,
|
||||
models: z.array(MediaUnderstandingModelSchema).optional(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user