Pārlūkot izejas kodu

fix: add tenant_id to InvokeTTSSchema

Yeuoly 7 mēneši atpakaļ
vecāks
revīzija
9377e4b28c

+ 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 {