Tela SDK for JavaScript
    Preparing search index...

    Represents a specific version of a canvas/prompt from the Tela API.

    type PromptVersion = {
        configuration: {
            model: string;
            structuredOutput: { enabled: boolean; schema: JSONSchema.JSONSchema };
            temperature: number;
            type: string;
        };
        content: string;
        createdAt: string;
        createdBy: string;
        deletedAt: any;
        deletedBy: any;
        draft: boolean;
        graph: any;
        id: string;
        isWorkflow: boolean;
        markdownContent: any;
        messages: {
            content: string;
            createdAt: string;
            createdBy: string;
            deletedAt: any;
            id: string;
            index: number;
            markdownContent: string;
            promptVersionId: string;
            role: string;
            updatedAt: string;
            updatedBy: string;
        }[];
        promoted: boolean;
        promptId: string;
        title: string;
        updatedAt: string;
        updatedBy: string;
        variables: CanvasVariable[];
        workflowSpec: any;
        workspaceId: string;
    }
    Index

    Properties

    configuration: {
        model: string;
        structuredOutput: { enabled: boolean; schema: JSONSchema.JSONSchema };
        temperature: number;
        type: string;
    }

    Configuration settings for this prompt version.

    Type Declaration

    • model: string

      The AI model to use (e.g., 'gpt-4', 'claude-3').

    • structuredOutput: { enabled: boolean; schema: JSONSchema.JSONSchema }

      Structured output configuration.

      • enabled: boolean

        Whether structured output is enabled.

      • schema: JSONSchema.JSONSchema

        JSON schema for validating structured output.

    • temperature: number

      Temperature setting for response randomness (0-1).

    • type: string

      The type of prompt ('chat' or 'completion').

    content: string

    The raw content of the prompt.

    createdAt: string

    ISO timestamp when this version was created.

    createdBy: string

    User ID who created this version.

    deletedAt: any

    ISO timestamp when this version was deleted, if applicable.

    deletedBy: any

    User ID who deleted this version, if applicable.

    draft: boolean

    Whether this is a draft version.

    graph: any

    Graph representation of the workflow.

    id: string

    Unique identifier for this prompt version.

    isWorkflow: boolean

    Whether this prompt is a workflow.

    markdownContent: any

    The markdown-formatted content of the prompt.

    messages: {
        content: string;
        createdAt: string;
        createdBy: string;
        deletedAt: any;
        id: string;
        index: number;
        markdownContent: string;
        promptVersionId: string;
        role: string;
        updatedAt: string;
        updatedBy: string;
    }[]

    Messages in the conversation for this prompt version.

    Type Declaration

    • content: string

      The raw content of the message.

    • createdAt: string

      ISO timestamp when this message was created.

    • createdBy: string

      User ID who created this message.

    • deletedAt: any

      ISO timestamp when this message was deleted, if applicable.

    • id: string

      Unique message identifier.

    • index: number

      Order index of this message in the conversation.

    • markdownContent: string

      The markdown-formatted content of the message.

    • promptVersionId: string

      ID of the prompt version this message belongs to.

    • role: string

      Role of the message sender (e.g., 'user', 'assistant').

    • updatedAt: string

      ISO timestamp when this message was last updated.

    • updatedBy: string

      User ID who last updated this message.

    promoted: boolean

    Whether this version is promoted to production.

    promptId: string

    The ID of the parent prompt.

    title: string

    The title/name of the prompt.

    updatedAt: string

    ISO timestamp when this version was last updated.

    updatedBy: string

    User ID who last updated this version.

    variables: CanvasVariable[]

    Variables available in this prompt version.

    workflowSpec: any

    Workflow specification if this is a workflow-based prompt.

    workspaceId: string

    ID of the workspace this prompt belongs to.