feat(singleagent): chatflow with agent chat

This commit is contained in:
lijunwen.gigoo
2025-08-12 13:52:30 +08:00
parent c89695c1b8
commit 2279f56fc5
5 changed files with 194 additions and 24 deletions

View File

@ -116,7 +116,7 @@ func (s *OpenAuthApplicationService) ImpersonateCozeUserAccessToken(ctx context.
resp := new(bot_open_api.ImpersonateCozeUserResponse)
userID := ctxutil.GetUIDFromCtx(ctx)
expiredSecond := time.Second * 60 * 10
expiredSecond := time.Second * 60 * 15
appReq := &entity.CreateApiKey{
UserID: *userID,
}
@ -128,8 +128,8 @@ func (s *OpenAuthApplicationService) ImpersonateCozeUserAccessToken(ctx context.
}
resp.Data = &bot_open_api.ImpersonateCozeUserResponseData{
AccessToken: apiKeyResp.ApiKey,
ExpiresIn: time.Now().Add(time.Duration(expiredSecond) * time.Hour * 24).Unix(),
TokenType: "",
ExpiresIn: time.Now().Add(time.Duration(expiredSecond)).Unix(),
TokenType: "Bearer",
}
return resp, nil
}