Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support ak/sk auth #269

Merged
merged 14 commits into from
Feb 22, 2024
Merged

feat: support ak/sk auth #269

merged 14 commits into from
Feb 22, 2024

Conversation

ZingLix
Copy link
Collaborator

@ZingLix ZingLix commented Feb 7, 2024

@ZingLix ZingLix marked this pull request as ready for review February 20, 2024 09:39

var _authManager *AuthManager

func GetAuthManager() *AuthManager {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有没有场景,AuthManager 的 Requestor 需要一些特殊设置?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

貌似没有,python目前没遇到,需要设置的参数都走GetConfig()获取

func (s *ModelResponseStream) checkResponseError() error {
tokenRefreshed := false
var apiError *APIError
for retryCount := 0; retryCount < s.Options.LLMRetryCount || s.Options.LLMRetryCount == 0; retryCount++ {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s.Options.LLMRetryCount == 0 这个重试条件建议注释一下,不然看的有点吓人

if err != nil {
return err
}
if err = checkResponseError(modelApiResponse); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

圈复杂度有些高了,解下。看起来有点头晕

Copy link
Collaborator

@danielhjz danielhjz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danielhjz danielhjz merged commit bb72e8d into main Feb 22, 2024
26 checks passed
@ZingLix ZingLix deleted the go_iam branch February 23, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants