Add type assertion for task_request in adaptor.go
This commit is contained in:
1 parent
3b14ecedaf
commit
8a9f4ac1aa
1 file changed
+4
-1
@@ -129,7 +129,10 @@ func (a *TaskAdaptor) BuildRequestBody(c *gin.Context, info *relaycommon.RelayIn
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("request not found in context")
|
return nil, fmt.Errorf("request not found in context")
|
||||||
}
|
}
|
||||||
req := v.(relaycommon.TaskSubmitReq)
|
req, ok := v.(relaycommon.TaskSubmitReq)
|
||||||
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("unexpected task_request type")
|
||||||
|
}
|
||||||
|
|
||||||
// Create structured video generation request
|
// Create structured video generation request
|
||||||
body := GeminiVideoPayload{
|
body := GeminiVideoPayload{
|
||||||
|
|||||||
Reference in new issue
Block a user