diff --git a/backend/application/workflow/workflow.go b/backend/application/workflow/workflow.go index cc32d68e..64d4d8e7 100644 --- a/backend/application/workflow/workflow.go +++ b/backend/application/workflow/workflow.go @@ -1379,7 +1379,9 @@ func (w *ApplicationService) OpenAPIStreamRun(ctx context.Context, req *workflow } var appID, agentID *int64 - if req.IsSetProjectID() { + if req.IsSetAppID() { + appID = ptr.Of(mustParseInt64(req.GetAppID())) + } else if req.IsSetProjectID() { appID = ptr.Of(mustParseInt64(req.GetProjectID())) } if req.IsSetBotID() { @@ -1526,7 +1528,9 @@ func (w *ApplicationService) OpenAPIRun(ctx context.Context, req *workflow.OpenA } var appID, agentID *int64 - if req.IsSetProjectID() { + if req.IsSetAppID() { + appID = ptr.Of(mustParseInt64(req.GetAppID())) + } else if req.IsSetProjectID() { appID = ptr.Of(mustParseInt64(req.GetProjectID())) } if req.IsSetBotID() { diff --git a/backend/domain/workflow/internal/repo/execute_history_store.go b/backend/domain/workflow/internal/repo/execute_history_store.go index 12c9e1ca..d4214461 100644 --- a/backend/domain/workflow/internal/repo/execute_history_store.go +++ b/backend/domain/workflow/internal/repo/execute_history_store.go @@ -303,7 +303,7 @@ func (e *executeHistoryStoreImpl) UpdateNodeExecutionStreaming(ctx context.Conte key := fmt.Sprintf(nodeExecOutputKey, execution.ID) - if err := e.redis.Set(ctx, key, execution.Output, nodeExecDataExpiry).Err(); err != nil { + if err := e.redis.Set(ctx, key, *execution.Output, nodeExecDataExpiry).Err(); err != nil { return vo.WrapError(errno.ErrRedisError, err) }