|
@@ -12,7 +12,7 @@ func InvokeLLM(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeLLM]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.InvokeLLM(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -25,7 +25,7 @@ func InvokeTextEmbedding(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeTextEmbedding]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.InvokeTextEmbedding(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -38,7 +38,7 @@ func InvokeRerank(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeRerank]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.InvokeRerank(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -51,7 +51,7 @@ func InvokeTTS(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeTTS]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.InvokeTTS(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -64,7 +64,7 @@ func InvokeSpeech2Text(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeSpeech2Text]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.InvokeSpeech2Text(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -77,7 +77,7 @@ func InvokeModeration(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestInvokeModeration]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.InvokeModeration(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -90,7 +90,7 @@ func ValidateProviderCredentials(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestValidateProviderCredentials]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.ValidateProviderCredentials(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -103,7 +103,7 @@ func ValidateModelCredentials(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestValidateModelCredentials]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.ValidateModelCredentials(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -116,7 +116,7 @@ func GetTTSModelVoices(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestGetTTSModelVoices]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.GetTTSModelVoices(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -129,7 +129,7 @@ func GetTextEmbeddingNumTokens(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestGetTextEmbeddingNumTokens]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.GetTextEmbeddingNumTokens(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -142,7 +142,7 @@ func GetLLMNumTokens(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestGetLLMNumTokens]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.GetLLMNumTokens(&itr, c, config.PluginMaxExecutionTimeout)
|
|
@@ -155,7 +155,7 @@ func GetAIModelSchema(config *app.Config) gin.HandlerFunc {
|
|
|
type request = plugin_entities.InvokePluginRequest[requests.RequestGetAIModelSchema]
|
|
|
|
|
|
return func(c *gin.Context) {
|
|
|
- BindRequest(
|
|
|
+ BindPluginDispatchRequest(
|
|
|
c,
|
|
|
func(itr request) {
|
|
|
service.GetAIModelSchema(&itr, c, config.PluginMaxExecutionTimeout)
|