Sanity Library Reference Docs
    Preparing search index...

    Interface ConstantAgentActionParamBeta

    Include a string in the instruction: do not have to escape $ signs in the string.

    client.agent.action.generate({
    schemaId,
    documentId,
    instruction: 'Give the following topic:\n $topic \n ---\nGenerate the full article.',
    instructionParams: {
    topic: {
    type: 'constant',
    value: 'Grapefruit'
    },
    },
    })

    type: 'constant' can also be provided directly as a string, as a shorthand:

    client.agent.action.generate({
    schemaId,
    documentId,
    instruction: 'Give the following topic:\n $topic \n ---\nGenerate the full article.',
    instructionParams: {
    topic: 'Grapefruit'
    },
    })
    interface ConstantAgentActionParam {
        type: "constant";
        value: string;
    }
    Index

    Properties

    Properties

    type: "constant"
    value: string