mirror of
https://github.com/langgenius/dify.git
synced 2026-02-22 19:15:47 +08:00
refactor tools
This commit is contained in:
@ -10,6 +10,7 @@ from core.plugin.backwards_invocation.app import PluginAppBackwardsInvocation
|
||||
from core.plugin.backwards_invocation.model import PluginModelBackwardsInvocation
|
||||
from core.plugin.entities.request import (
|
||||
RequestInvokeApp,
|
||||
RequestInvokeEncrypt,
|
||||
RequestInvokeLLM,
|
||||
RequestInvokeModeration,
|
||||
RequestInvokeNode,
|
||||
@ -132,6 +133,14 @@ class PluginInvokeAppApi(Resource):
|
||||
PluginAppBackwardsInvocation.convert_to_event_stream(response)
|
||||
)
|
||||
|
||||
class PluginInvokeEncryptApi(Resource):
|
||||
@setup_required
|
||||
@plugin_inner_api_only
|
||||
@get_tenant
|
||||
@plugin_data(payload_type=RequestInvokeEncrypt)
|
||||
def post(self, user_id: str, tenant_model: Tenant, payload: RequestInvokeEncrypt):
|
||||
""""""
|
||||
|
||||
api.add_resource(PluginInvokeLLMApi, '/invoke/llm')
|
||||
api.add_resource(PluginInvokeTextEmbeddingApi, '/invoke/text-embedding')
|
||||
api.add_resource(PluginInvokeRerankApi, '/invoke/rerank')
|
||||
|
||||
Reference in New Issue
Block a user