# Anthropic AI

Category: AI
|
Runtime: 3.4
|
Available: Free

# Overview

AnthropicAI node can be used to ask simple questions with the AnthropicAI platform.

# Setup

# Prerequisites

# Installation

  1. Go to your project workspace where you can see package.json file.
  2. Run the below npm command:
   npm i @kumologica/kumologica-contrib-anthropicai

# Technical Details

# Properties

  • Operation - (Required). Type of operation to perform with the AnthropicAI Platform. Currently only supports "Simple Q&A" interaction.
  • Model - (Required). The AnthropicAI Platform Model to use. Following models are supported:
    • claude-3-opus-20240229 - The most capable model, best for highly complex tasks.
    • claude-3-sonnet-20240229 - A balance of intelligence and speed, suitable for a wide range of tasks.
    • claude-3-haiku-20240307 - The fastest model, good for simpler tasks and real-time interactions.
    • claude-2.1 - Previous generation model, still capable but not as advanced as Claude 3.
    • claude-2.0 - Previous generation model, still capable but not as advanced as Claude 3.
    • claude-instant-1.2 - A faster, lighter model from the previous generation.
  • Max Tokens - (Optional). The maximum number of tokens (roughly 4 characters or 3/4 of a word in English) that Claude can generate in its response. It serves as an upper limit for response length, helping to manage computational resources, control API usage costs, and prevent overly long outputs. Default 1000 if not provided.
  • Context - (Required). System Context to be used.
  • Question - (Required). Question to ask the AnthropicAI Platform.
  • API Key - (Optional). AnthropicAI Platform API_Key to use. If not provided, fetches from env.ANTHROPICAI_API_KEY

# Throws

  • AnthropicAIError - when AnthropicAI client setup failed. Possible cause is invalid api key or not enough tokens available.

# Returns

msg.payload is overwritten by the response from this node. The node return an answer to the question passed.