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

openai.error.RateLimitError 대처 방안 #1

Closed
hi-jin opened this issue Jun 20, 2023 · 2 comments
Closed

openai.error.RateLimitError 대처 방안 #1

hi-jin opened this issue Jun 20, 2023 · 2 comments

Comments

@hi-jin
Copy link
Owner

hi-jin commented Jun 20, 2023

대량의 데이터에 대한 결과를 확인하려 할 때 max token limit을 넘는 경우 openai.error.RateLimitError를 내며 종료되는데, 이에 대한 대처 방안은?

@hi-jin
Copy link
Owner Author

hi-jin commented Jun 20, 2023

  1. csv 파일로 저장할 때, 완료된 index 함께 저장해서 다음 번 predict.py 실행할 때 복구하는 방식
    try except로 RateLimitError 잡아서, RateLimitError 걸리면 특정 시간 뒤 자동으로 다시 시도하도록 하면 편할 것 같다.

@hi-jin
Copy link
Owner Author

hi-jin commented Jun 21, 2023

우선 10분마다 요청 다시 보내도록해서 해결.
더 좋은 방법 생각나면 고치면 될 것 같다.

@hi-jin hi-jin closed this as completed Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant