Skip to main content

claude@1.0.6

prompt(message, opts)

Functions

prompt

prompt(message, opts) ⇒ operation

Prompt the Claude chat interface to respond

ParamTypeDescription
messagestringThe prompt
optsPromptOptionsModel, Max Tokens, Temperature, and other options.

Example

prompt(`Filter these emails and pick out the most urgent: ${JSON.stringify($.data)}`);

Interfaces

PromptOptions

Options provided to Chat Completions Create (https://docs.anthropic.com/en/api/messages)

Properties

NameTypeDescription
modelstringWhich mode to use, i.e., claude-3-7-sonnet-20250219.
max_tokensstringThe maximum number of tokens to generate before stopping, i.e., 1024
temperaturenumberAmount of randomness injected into the response. Ranges from 0.0 to 1.0. Use temperature closer to 0.0 for analytical / multiple choice, and closer to 1.0 for creative and generative tasks.