Portkey
This documentation describes the integration of MindsDB with Portkey, an AI Gateway that allows developers to connect to All the AI models in the world with a single API. Portkey also brings in observability, caching, and other features that are useful for building production-grade AI applications.
Prerequisites
Before proceeding, ensure the following prerequisites are met:
- Install MindsDB locally via Docker or Docker Desktop.
- To use Portkey within MindsDB, install the required dependencies following this instruction.
- Obtain the Portkey API key required to deploy and use Portkey within MindsDB. Follow the instructions for obtaining the API key.
Setup
Create an AI engine from the Portkey handler.
You can pass all the parameters that are supported by Portkey inside the USING
clause.
Create a model using portkey_engine
as an engine.
You can pass all the parameters supported by Portkey Chat completions here inside the USING
clause.
refer Portkey Chat completions for more details.
The integrations between Portkey and MindsDB was implemented using Portkey Python SDK.
Query the model to get predictions.
Here is the output:
Next Steps
Go to the Use Cases section to see more examples.
Was this page helpful?