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

Fix: Default max comparison pairs in resolve.py #147

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

staru09
Copy link
Contributor

@staru09 staru09 commented Nov 5, 2024

This PR closes #130
I have added a custom rate limit for different models which can be edited by the user.
The OpenAI limits need to be updated though.

Sample usage is as follows:

pipeline = Pipeline(
    name="resolution_pipeline",
    datasets={...},
    operations=[...],
    steps=[...],
    output=...,
    rate_limits={
        "claude-3.5-sonnet": 300,  # Custom lower limit
        "gpt-4o": 800,
        "my-custom-model": 100
    }
)

# Check different models
models = ["claude-3-sonnet", "gpt-4o", "my-custom-model", "unknown-model"]
for model in models:
    limit_info = pipeline.get_rate_limits(model)
    print(f"{model}: {limit_info}")

# Output:
claude-3-sonnet: {'requests_per_minute': 300, 'source': 'custom'}
gpt-4o: {'requests_per_minute': 800, 'source': 'custom'}
my-custom-model: {'requests_per_minute': 100, 'source': 'custom'}
unknown-model: {'requests_per_minute': 200, 'source': 'fallback'}

@shreyashankar
Copy link
Collaborator

Discussing offline in Discord

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

Successfully merging this pull request may close these issues.

Fix the default max comparison pairs in resolve.py
2 participants