Skip to main content

claude@1.0.2

prompt(message, opts)

This adaptor exports the following from common:

cursor()
dataPath()
dataValue()
dateFns
each()
field()
fields()
fn()
lastReferenceValue()
merge()
sourceValue()

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('Write a haiku about surfing.');

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.