UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

15 lines (14 loc) • 1.28 kB
/** * The one wording of a media block that left the model's view of a request while the transcript keeps it. A block leaves * for one of two reasons ({@link MEDIA_REMOVED_REASONS}): the provider refused the request because an image in it could * not be processed (`engine/llm/rejected-images.ts`), or the request's media budget had no room left for it (the request * trim, `core/media-byte-cap.ts`). Either way the block's slot holds the line {@link mediaRemovedPlaceholder} writes, and * the person hears it under the one code `context.media_removed`, whose `detail.reason` is the same word. */ /** The `errorKind` a provider's image refusal carries (`AssistantMessage.errorKind`). */ export declare const IMAGE_REFUSAL_KIND = "image_unprocessable"; /** Why a media block left the request view — `context.media_removed` `detail.reason`, closed. */ export declare const MEDIA_REMOVED_REASONS: readonly ["rejected_by_provider", "media_budget"]; export type MediaRemovedReason = (typeof MEDIA_REMOVED_REASONS)[number]; /** The text that stands in for the `ordinal`-th (1-based) block of its `type` in its message, removed for `reason`. */ export declare function mediaRemovedPlaceholder(reason: MediaRemovedReason, type: "image" | "document", ordinal: number): string;