feat: 会话 Get 按 exec_chat/exec_workflow 混排返回结果
This commit is contained in:
@@ -3,17 +3,18 @@ package session
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
sessionDto "ai-agent/workflow/model/dto/session"
|
||||
sessionService "ai-agent/workflow/service/session"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
type session struct{}
|
||||
|
||||
var Session = new(session)
|
||||
|
||||
func (c *session) Create(ctx context.Context, req *sessionDto.CreateSessionReq) (res *sessionDto.CreateSessionRes, err error) {
|
||||
return sessionService.SessionService.Create(ctx, req)
|
||||
func (c *session) Get(ctx context.Context, req *sessionDto.GetSessionInfoReq) (res *sessionDto.GetSessionInfoRes, err error) {
|
||||
return sessionService.SessionService.Get(ctx, req)
|
||||
}
|
||||
|
||||
func (c *session) List(ctx context.Context, req *sessionDto.ListSessionReq) (res *sessionDto.ListSessionRes, err error) {
|
||||
@@ -26,18 +27,3 @@ func (c *session) Delete(ctx context.Context, req *sessionDto.DeleteSessionReq)
|
||||
}
|
||||
return &beans.ResponseEmpty{}, nil
|
||||
}
|
||||
|
||||
func (c *session) Results(ctx context.Context, req *sessionDto.ListSessionResultsReq) (res *sessionDto.ListSessionResultsRes, err error) {
|
||||
return sessionService.SessionService.ListSessionResults(ctx, req)
|
||||
}
|
||||
|
||||
func (c *session) ResultDelete(ctx context.Context, req *sessionDto.DeleteSessionResultReq) (res *beans.ResponseEmpty, err error) {
|
||||
if err = sessionService.SessionService.DeleteResult(ctx, req); err != nil {
|
||||
return
|
||||
}
|
||||
return &beans.ResponseEmpty{}, nil
|
||||
}
|
||||
|
||||
func (c *session) WorkflowResults(ctx context.Context, req *sessionDto.ListWorkflowResultsReq) (res *sessionDto.ListWorkflowResultsRes, err error) {
|
||||
return sessionService.SessionService.ListWorkflowResults(ctx, req)
|
||||
}
|
||||
Reference in New Issue
Block a user