feat(canvas): 生成合同 - 统一节点参数并补充模型上下文能力
This commit is contained in:
153
web/src/lib/canvas/generation-contract.generated.ts
Normal file
153
web/src/lib/canvas/generation-contract.generated.ts
Normal file
@@ -0,0 +1,153 @@
|
||||
// Generated by go generate ./internal/canvas/contract. Do not edit.
|
||||
export const GENERATION_CONTRACT_VERSION = 1;
|
||||
export const GENERATION_LIMITS = { nodeTitle: 240, prompt: 16000, canvasOperations: 20 } as const;
|
||||
|
||||
export type ModelSelection = { kind: "logical"; logicalModelId: string; channelId?: never; modelKey?: never } | { kind: "channel"; channelId: string; modelKey: string; logicalModelId?: never };
|
||||
|
||||
export type Options = {
|
||||
size?: string;
|
||||
quality?: string;
|
||||
count?: number;
|
||||
transparentBackground?: boolean;
|
||||
durationSeconds?: number;
|
||||
resolution?: string;
|
||||
generateAudio?: boolean;
|
||||
watermark?: boolean;
|
||||
audioVoice?: string;
|
||||
audioFormat?: string;
|
||||
audioSpeed?: string;
|
||||
audioInstructions?: string;
|
||||
};
|
||||
|
||||
export type ReferenceBinding = {
|
||||
id: string;
|
||||
nodeId?: string;
|
||||
resourceId?: string;
|
||||
transientId?: string;
|
||||
mediaType: "image" | "video" | "audio" | "text";
|
||||
role: "reference" | "source-text" | "first-frame" | "last-frame" | "mask";
|
||||
order: number;
|
||||
resolution: "latest" | "snapshot";
|
||||
};
|
||||
|
||||
export type GenerationSpec = {
|
||||
version: number;
|
||||
mode: "image" | "video" | "audio";
|
||||
prompt: string;
|
||||
modelSelection?: ModelSelection;
|
||||
options: Options;
|
||||
referenceBindings: ReferenceBinding[];
|
||||
textInputMode: "prompt-only" | "append-sources";
|
||||
};
|
||||
|
||||
export const GENERATION_OPTION_FIELDS = [
|
||||
{
|
||||
"kind": "string",
|
||||
"modes": [
|
||||
"image",
|
||||
"video"
|
||||
],
|
||||
"name": "size",
|
||||
"node": "size",
|
||||
"task": "size"
|
||||
},
|
||||
{
|
||||
"kind": "string",
|
||||
"modes": [
|
||||
"image"
|
||||
],
|
||||
"name": "quality",
|
||||
"node": "quality",
|
||||
"task": "quality"
|
||||
},
|
||||
{
|
||||
"kind": "number",
|
||||
"modes": [
|
||||
"image"
|
||||
],
|
||||
"name": "count",
|
||||
"node": "count",
|
||||
"task": "count"
|
||||
},
|
||||
{
|
||||
"kind": "boolean",
|
||||
"modes": [
|
||||
"image"
|
||||
],
|
||||
"name": "transparentBackground",
|
||||
"node": "transparentBackground",
|
||||
"task": "transparentBackground"
|
||||
},
|
||||
{
|
||||
"kind": "number",
|
||||
"modes": [
|
||||
"video"
|
||||
],
|
||||
"name": "durationSeconds",
|
||||
"node": "seconds",
|
||||
"task": "videoSeconds"
|
||||
},
|
||||
{
|
||||
"kind": "string",
|
||||
"modes": [
|
||||
"video"
|
||||
],
|
||||
"name": "resolution",
|
||||
"node": "vquality",
|
||||
"task": "vquality"
|
||||
},
|
||||
{
|
||||
"kind": "boolean",
|
||||
"modes": [
|
||||
"video"
|
||||
],
|
||||
"name": "generateAudio",
|
||||
"node": "generateAudio",
|
||||
"task": "videoGenerateAudio"
|
||||
},
|
||||
{
|
||||
"kind": "boolean",
|
||||
"modes": [
|
||||
"video"
|
||||
],
|
||||
"name": "watermark",
|
||||
"node": "watermark",
|
||||
"task": "videoWatermark"
|
||||
},
|
||||
{
|
||||
"kind": "string",
|
||||
"modes": [
|
||||
"audio"
|
||||
],
|
||||
"name": "audioVoice",
|
||||
"node": "audioVoice",
|
||||
"task": "audioVoice"
|
||||
},
|
||||
{
|
||||
"kind": "string",
|
||||
"modes": [
|
||||
"audio"
|
||||
],
|
||||
"name": "audioFormat",
|
||||
"node": "audioFormat",
|
||||
"task": "audioFormat"
|
||||
},
|
||||
{
|
||||
"kind": "string",
|
||||
"modes": [
|
||||
"audio"
|
||||
],
|
||||
"name": "audioSpeed",
|
||||
"node": "audioSpeed",
|
||||
"task": "audioSpeed"
|
||||
},
|
||||
{
|
||||
"kind": "string",
|
||||
"modes": [
|
||||
"audio"
|
||||
],
|
||||
"name": "audioInstructions",
|
||||
"node": "audioInstructions",
|
||||
"task": "audioInstructions"
|
||||
}
|
||||
] as const;
|
||||
Reference in New Issue
Block a user