Commit d36e8929 by feitianbubu

fix: seedance only one text

parent 3cd1ba46
...@@ -19,6 +19,7 @@ import ( ...@@ -19,6 +19,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/samber/lo"
) )
// ============================ // ============================
...@@ -241,13 +242,11 @@ func (a *TaskAdaptor) convertToRequestPayload(req *relaycommon.TaskSubmitReq) (* ...@@ -241,13 +242,11 @@ func (a *TaskAdaptor) convertToRequestPayload(req *relaycommon.TaskSubmitReq) (*
return nil, errors.Wrap(err, "unmarshal metadata failed") return nil, errors.Wrap(err, "unmarshal metadata failed")
} }
// Add text prompt r.Content = lo.Reject(r.Content, func(c ContentItem, _ int) bool { return c.Type == "text" })
if req.Prompt != "" { r.Content = append(r.Content, ContentItem{
r.Content = append(r.Content, ContentItem{ Type: "text",
Type: "text", Text: req.Prompt,
Text: req.Prompt, })
})
}
return &r, nil return &r, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment