Sanity Library Reference Docs
    Preparing search index...

    Type Alias FieldAgentActionParam<TParamConfig>Beta

    FieldAgentActionParam: {
        path: AgentActionPathSegment | AgentActionPath;
        type: "field";
    } & DocIdParam<TParamConfig>

    Includes a LLM-friendly version of the field value in the instruction

    client.agent.action.generate({
    schemaId,
    documentId,
    instruction: 'Give the following field value:\n $pte \n ---\nGenerate keywords.',
    instructionParams: {
    pte: {
    type: 'field',
    path: ['pteField'],
    },
    },
    target: {path: 'keywords' }
    })

    Type Parameters

    • TParamConfig extends { docIdRequired: boolean } = { docIdRequired: false }

    Type declaration