瀏覽代碼

fix: add tenant_id to InvokeTTSSchema

Yeuoly 7 月之前
父節點
當前提交
9377e4b28c
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 5 1
      internal/core/dify_invocation/types.go
  2. 1 0
      internal/types/entities/requests/model.go

+ 5 - 1
internal/core/dify_invocation/types.go

@@ -51,7 +51,11 @@ type InvokeRerankRequest struct {
 }
 
 type InvokeTTSRequest struct {
-	BaseInvokeDifyRequest
+	// BaseInvokeDifyRequest
+	// # TODO: BaseInvokeDifyRequest has a duplicate field with InvokeTTSSchema,
+	// # we should consider to refactor it in the future
+	UserId string     `json:"user_id"`
+	Type   InvokeType `json:"type"`
 	requests.BaseRequestInvokeModel
 	requests.InvokeTTSSchema
 }

+ 1 - 0
internal/types/entities/requests/model.go

@@ -60,6 +60,7 @@ type RequestInvokeRerank struct {
 type InvokeTTSSchema struct {
 	ContentText string `json:"content_text"  validate:"required"`
 	Voice       string `json:"voice" validate:"required"`
+	TenantID    string `json:"tenant_id" validate:"required"`
 }
 
 type RequestInvokeTTS struct {