Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or use MindsDB Cloud.
- To use Anthropic within MindsDB, install the required dependencies following this instruction.
- Obtain the Anthropic API key required to deploy and use Anthropic models within MindsDB. Follow the instructions for obtaining the API key.
Setup
Create an AI engine from the Anthropic handler.anthropic_engine
as an engine.
Usage
The following usage examples utilizeanthropic_engine
to create a model with the CREATE MODEL
statement.
Create and deploy the Anthropic model within MindsDB to ask any question.
Name | Description |
---|---|
column | It defines the prompt to the model. |
engine | It defines the Anthropic engine. |
max_tokens | It defines the maximum number of tokens to generate before stopping. |
model | It defines model that will complete your prompt. |
Default Model
When you create an Anthropic model in MindsDB, it uses the
claude-2
model by default. But you can use the claude-1
model as well by passing it to the model
parameter in the USING
clause of the CREATE MODEL
statement.Default Max Tokens
When you create an Anthropic model in MindsDB, it uses 100 tokens as the maximum by default. But you can adjust this value by passing it to the
max_tokens
parameter in the USING
clause of the CREATE MODEL
statement.Usage
Once you have created an Anthropic model, you can use it to make predictions.Next StepsGo to the Use Cases section to see more examples.