Skip to content

Claude Node

The Claude Node allows you to interact with Anthropic’s Claude models for various natural language processing tasks. It supports both text and image inputs, enabling multimodal conversations with Claude.


Inputs

user_prompt: A string representing the user’s input or query.

system_prompt: A string representing the system-level instruction or context for the conversation.

images: An array of image URLs or base64-encoded image data.


Outputs

output: The generated response from the Claude model based on the provided inputs.


Properties

Model: The Claude model to use for generating responses. Available options include Claude 2 and Claude 3 models.

Secret: The API key required to access the Claude API.

Max Tokens: The maximum number of tokens to generate in the response (default: 300).

Top P: The cumulative probability threshold for nucleus sampling (default: 1).

Temperature: The sampling temperature to control the randomness of the generated response (default: 1).

Frequency Penalty: The penalty factor to reduce the likelihood of repeating tokens (default: 0).

Presence Penalty: The penalty factor to encourage the model to discuss new topics (default: 0).


Usage

1. Select the desired Claude model from the dropdown.

2. Provide the API key in the Secret field to authenticate with the Claude API.

3. Connect the user_prompt and optional system_prompt inputs to specify the user’s query and system-level context.

4. If using image inputs, connect an array of image URLs or base64-encoded image data to the images input.

5. Adjust the properties such as Max Tokens, Top P, Temperature, Frequency Penalty, and Presence Penalty as needed.

6. The generated response will be available at the output of the node.


Tips

- Experiment with different Claude models to find the one that best suits your use case.

- Provide clear and concise user prompts to guide the conversation effectively.

- Use the system_prompt input to set the overall context or instruction for the conversation.

- When using image inputs, ensure that the images are properly formatted as URLs or base64-encoded data.

- Adjust the Max Tokens property to control the length of the generated responses.

- Fine-tune the Top P, Temperature, Frequency Penalty, and Presence Penalty properties to achieve the desired balance between coherence and diversity in the generated responses.

`