Skip to content

Commit

Permalink
rm duplicating code
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieJCJ committed Dec 4, 2024
1 parent d9b3cf4 commit ec1a1e9
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ def __init__(
self.api_key = api_key
self.token_encoding = tiktoken.get_encoding(get_token_encoding_name(model))

# Set resource limits for file descriptors
soft, hard = resource.getrlimit(resource.RLIMIT_NOFILE)
resource.setrlimit(
resource.RLIMIT_NOFILE, (min(hard, 10 * 3000), hard)
) # default to 3000 rpm

def get_rate_limits(self) -> dict:
"""Get rate limits from OpenAI API headers.
Expand Down

0 comments on commit ec1a1e9

Please sign in to comment.