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
70d74d74
authored
Nov 26, 2025
by
feitianbubu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: gemini video veo3.1 add task fail check
parent
ff19082c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
relay/channel/task/gemini/adaptor.go
+11
-10
No files found.
relay/channel/task/gemini/adaptor.go
View file @
70d74d74
...
...
@@ -77,6 +77,8 @@ type operationResponse struct {
URI
string
`json:"uri"`
}
`json:"video"`
}
`json:"generatedSamples"`
RaiMediaFilteredCount
int
`json:"raiMediaFilteredCount"`
RaiMediaFilteredReasons
[]
string
`json:"raiMediaFilteredReasons"`
}
`json:"generateVideoResponse"`
}
`json:"response"`
Error
struct
{
...
...
@@ -256,20 +258,19 @@ func (a *TaskAdaptor) ParseTaskResult(respBody []byte) (*relaycommon.TaskInfo, e
return
ti
,
nil
}
ti
.
Status
=
model
.
TaskStatusSuccess
ti
.
Progress
=
"100%"
taskID
:=
encodeLocalTaskID
(
op
.
Name
)
ti
.
TaskID
=
taskID
ti
.
Url
=
fmt
.
Sprintf
(
"%s/v1/videos/%s/content"
,
system_setting
.
ServerAddress
,
taskID
)
// Extract URL from generateVideoResponse if available
if
len
(
op
.
Response
.
GenerateVideoResponse
.
GeneratedSamples
)
>
0
{
if
len
(
op
.
Response
.
GenerateVideoResponse
.
GeneratedSamples
)
==
0
{
ti
.
Status
=
model
.
TaskStatusFailure
ti
.
Reason
=
fmt
.
Sprintf
(
"no generated video url found: %s"
,
strings
.
Join
(
op
.
Response
.
GenerateVideoResponse
.
RaiMediaFilteredReasons
,
"; "
))
}
else
{
if
uri
:=
op
.
Response
.
GenerateVideoResponse
.
GeneratedSamples
[
0
]
.
Video
.
URI
;
uri
!=
""
{
ti
.
RemoteUrl
=
uri
}
ti
.
Status
=
model
.
TaskStatusSuccess
}
ti
.
Progress
=
"100%"
taskID
:=
encodeLocalTaskID
(
op
.
Name
)
ti
.
TaskID
=
taskID
ti
.
Url
=
fmt
.
Sprintf
(
"%s/v1/videos/%s/content"
,
system_setting
.
ServerAddress
,
taskID
)
return
ti
,
nil
}
...
...
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