Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6b028bfe
authored
Sep 15, 2025
by
feitianbubu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 支持即梦视频3.0,新增10s(frames=241)支持
parent
5fd74c34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
relay/channel/task/jimeng/adaptor.go
+10
-4
No files found.
relay/channel/task/jimeng/adaptor.go
View file @
6b028bfe
...
...
@@ -36,6 +36,7 @@ type requestPayload struct {
Prompt
string
`json:"prompt,omitempty"`
Seed
int64
`json:"seed"`
AspectRatio
string
`json:"aspect_ratio"`
Frames
int
`json:"frames,omitempty"`
}
type
responsePayload
struct
{
...
...
@@ -311,10 +312,15 @@ func hmacSHA256(key []byte, data []byte) []byte {
func
(
a
*
TaskAdaptor
)
convertToRequestPayload
(
req
*
relaycommon
.
TaskSubmitReq
)
(
*
requestPayload
,
error
)
{
r
:=
requestPayload
{
ReqKey
:
"jimeng_vgfm_i2v_l20"
,
Prompt
:
req
.
Prompt
,
AspectRatio
:
"16:9"
,
// Default aspect ratio
Seed
:
-
1
,
// Default to random
ReqKey
:
req
.
Model
,
Prompt
:
req
.
Prompt
,
}
switch
req
.
Duration
{
case
10
:
r
.
Frames
=
241
// 24*10+1 = 241
default
:
r
.
Frames
=
121
// 24*5+1 = 121
}
// Handle one-of image_urls or binary_data_base64
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment