Setup
MindsDB provides the Cohere handler that enables you to create Cohere models within MindsDB.AI Engine
Before creating a model, it is required to create an AI engine based on the provided handler.If you installed MindsDB locally, make sure to install all Cohere dependencies by running
pip install .[cohere]
or from the requirements.txt file.Please note that you need to provide your Cohere API key. Once you sign up for a Cohere account, an API key can be requested from the Cohere dashboard. Learn more here.
cohere_engine
) should be used as a value for the engine
parameter in the USING
clause of the CREATE MODEL
statement.
AI Model
TheCREATE MODEL
statement is used to create, train, and deploy models within MindsDB.
Name | Description |
---|---|
task | It defines the task to be accomplished. |
column | It defines the column with the text to be acted upon. |
engine | It defines the Cohere engine. |
api_key | It is used to provide your Cohere API key to gain access to the model. |
Usage
Once you have created an Cohere model, you can use it to make predictions.Supported Tasks
The following tasks are supported by the Cohere handler:language-detection
: detect the language of a given text.text-generation
: generate text based on a given prompt.text-summarization
: summarize a given text.
For more information about the Cohere handler, visit the repository here.