Model Plugin
This Documentation is Being Deprecated
This page is being phased out as part of our documentation reorganization.
Click this card to be redirected to the updated version with the most current information.
If you notice any discrepancies or areas needing improvement in the new documentation, please use the “Report an issue” button at the bottom of the page.
Model type plugins enable the Dify platform to request models from specific model providers. For example, after installing the OpenAI model plugin, the Dify platform can request models like GPT-4, GPT-4o-2024-05-13, etc., provided by OpenAI.
Model Plugin Structure
To better understand the concepts involved in developing plugin models, here’s an example structure within model type plugins:
- Model Provider: Large model development companies, such as OpenAI, Anthropic, Google, etc.
- Model Categories: Depending on the provider, categories include Large Language Models (LLM), Text Embedding models, Speech-to-Text models, etc.
- Specific Models:
claude-3-5-sonnet
,gpt-4-turbo
, etc.
Code structure in plugin projects:
Taking Anthropic as an example, the model plugin structure looks like this:
Taking OpenAI as an example, which supports multiple model types:
Getting Started with Creating Model Plugins
Please follow these steps to create a model plugin, click the document titles for specific creation guides:
- Create Model Provider
- Integrate Predefined/Custom Models
- Debug Plugin