ModelConfig type parameter. Its structure is defined in the General Specifications Definition and varies slightly by model type.
For example, LLM type models also require completion_params and mode parameters. You can construct this structure manually or use model-selector type parameters or configurations.
Invoke LLM
Entry Point
Interface
tool_call capability, the tools passed here will not take effect.
Use Case
This example invokes OpenAI’sgpt-4o-mini model within a Tool:
query parameter from tool_parameters.
Best Practice
Avoid constructingLLMModelConfig manually. Instead, let users select the model they want in the UI by adding a model parameter to the tool’s parameter list:
scope of the model parameter is llm, users can only select llm type models. The previous use case then becomes:
Invoke Summary
This interface summarizes a piece of text using the system model within your current workspace.Entry Point
Interface
text: The text to summarize.instruction: Additional instructions, letting you control the style of the summary.
Invoke TextEmbedding
Entry Point
Interface
Invoke Rerank
Entry Point
Interface
Invoke TTS
Entry Point
Interface
bytes stream returned by the tts interface is an mp3 audio byte stream, and each iteration returns a complete audio segment. For more in-depth processing, choose an appropriate audio library.
Invoke Speech2Text
Entry Point
Interface
file is an audio file encoded in mp3 format.
Invoke Moderation
Entry Point
Interface
true indicates that the text contains sensitive content.
Related Resources
- Reverse Invocation of Dify Services - Understand the fundamental concepts of reverse invocation
- Reverse Invocation of App - Learn how to invoke Apps within the platform
- Reverse Invocation of Tool - Learn how to invoke other plugins
- Model Plugin Development Guide - Learn how to develop custom model plugins
- Model Designing Rules - Understand the design principles of model plugins
Edit this page | Report an issue