openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
57 lines • 3.11 kB
TypeScript
import { r as OpenClawConfig } from "../types.openclaw-yUy4bDSr.js";
import { At as TranscribeAudioFileParams, Dt as ExtractStructuredWithModelParams, Et as DescribeVideoFileParams, Ot as RunMediaUnderstandingFileParams, Tt as DescribeImageFileWithModelParams, Wp as transcribeFirstAudio, a as MsgContext, kt as RunMediaUnderstandingFileResult, wt as DescribeImageFileParams } from "../config-contracts-DzLaG7FV.js";
import "../types-BT7ltkMV.js";
import { x as StructuredExtractionResult } from "../image-runtime-g3hqqrXC.js";
//#region src/media-understanding/echo-transcript.d.ts
/** Sends a best-effort transcript echo back to the originating deliverable chat. */
declare function sendTranscriptEcho(params: {
ctx: MsgContext;
cfg: OpenClawConfig;
transcript: string;
format?: string;
logSuccess?: boolean;
failureLogPrefix?: string;
}): Promise<void>;
//#endregion
//#region src/media-understanding/runtime.d.ts
/** Runs media understanding for one local file or remote URL and returns the first matching output. */
export declare function runMediaUnderstandingFile(params: RunMediaUnderstandingFileParams): Promise<RunMediaUnderstandingFileResult>;
export declare function describeImageFile(params: DescribeImageFileParams): Promise<RunMediaUnderstandingFileResult>;
/** Describes one image with an explicit provider/model, bypassing configured media model selection. */
export declare function describeImageFileWithModel(params: DescribeImageFileWithModelParams): Promise<{
text: string;
model?: string;
}>;
export declare function extractStructuredWithModel(params: ExtractStructuredWithModelParams): Promise<StructuredExtractionResult>;
export declare function describeVideoFile(params: DescribeVideoFileParams): Promise<RunMediaUnderstandingFileResult>;
export declare function transcribeAudioFile(params: TranscribeAudioFileParams): Promise<RunMediaUnderstandingFileResult>;
//#endregion
//#region src/plugin-sdk/media-understanding-runtime.d.ts
type TranscribeFirstAudio = typeof transcribeFirstAudio;
type SendTranscriptEcho = typeof sendTranscriptEcho;
export declare function formatAudioTranscriptForAgent(transcript: string): string;
/** Creates shared preflight transcription and deferred-echo behavior for a channel. */
export declare function createChannelPreflightAudio<TAudio>(params: {
channel: string;
isAudio: (value: TAudio) => boolean;
deferTranscriptEcho?: boolean;
transcribeFirstAudio?: TranscribeFirstAudio;
sendTranscriptEcho?: SendTranscriptEcho;
}): {
isAudio: (value: TAudio) => boolean;
suppress: (cfg: OpenClawConfig) => OpenClawConfig;
format: (transcript: string, formatTemplate: string) => string;
resolve(resolveParams: {
request: Parameters<TranscribeFirstAudio>[0];
abortSignal?: AbortSignal;
}): Promise<string | undefined>;
send(sendParams: {
transcript: string;
cfg: OpenClawConfig;
accountId: string;
originatingTo: string;
messageThreadId?: string;
}): Promise<void>;
};
//#endregion
export type { ExtractStructuredWithModelParams, RunMediaUnderstandingFileParams, RunMediaUnderstandingFileResult };