Merge main

This commit is contained in:
Yeuoly
2024-09-14 02:47:01 +08:00
959 changed files with 25695 additions and 24057 deletions

View File

@ -38,6 +38,7 @@ class PluginInvokeLLMApi(Resource):
return compact_generate_response(generator())
class PluginInvokeTextEmbeddingApi(Resource):
@setup_required
@plugin_inner_api_only
@ -113,6 +114,7 @@ class PluginInvokeNodeApi(Resource):
def post(self, user_id: str, tenant_model: Tenant, payload: RequestInvokeNode):
pass
class PluginInvokeAppApi(Resource):
@setup_required
@plugin_inner_api_only
@ -134,6 +136,7 @@ class PluginInvokeAppApi(Resource):
PluginAppBackwardsInvocation.convert_to_event_stream(response)
)
class PluginInvokeEncryptApi(Resource):
@setup_required
@plugin_inner_api_only
@ -145,6 +148,7 @@ class PluginInvokeEncryptApi(Resource):
"""
return PluginEncrypter.invoke_encrypt(tenant_model, payload)
api.add_resource(PluginInvokeLLMApi, '/invoke/llm')
api.add_resource(PluginInvokeTextEmbeddingApi, '/invoke/text-embedding')
api.add_resource(PluginInvokeRerankApi, '/invoke/rerank')