This documentation describes the integration of MindsDB with Anthropic, an AI research company.
The integration allows for the deployment of Anthropic models within MindsDB, providing the models with access to data from various data sources.
Create a model using anthropic_engine as an engine.
Copy
Ask AI
CREATE MODEL anthropic_modelPREDICT target_columnUSING engine = 'anthropic_engine', -- engine name as created via CREATE ML_ENGINE column = 'column_name', -- column that stores input/question to the model max_tokens = <integer>, -- max number of tokens to be generated by the model (default is 100) model = 'model_name'; -- choose one of 'claude-1' or 'claude-2' (default is 'claude-2')
The following usage examples utilize anthropic_engine to create a model with the CREATE MODEL statement.Create and deploy the Anthropic model within MindsDB to ask any question.
Copy
Ask AI
CREATE MODEL anthropic_modelPREDICT answerUSING engine = 'anthropic_engine', column = 'question';
Query the model to get predictions.
Copy
Ask AI
SELECT question, answerFROM anthropic_modelWHERE question = 'Where is Stockholm located?';
Here is the output:
Copy
Ask AI
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+| question | answer |+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+| Where is Stockholm located? | Stockholm is the capital and largest city of Sweden. It is located on Sweden's south-central east coast, where Lake Mälaren meets the Baltic Sea. |+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
Next StepsGo to the Use Cases section to see more examples.