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

Set the braintrust proxy as the api url to facilitate caching #33

Merged
merged 11 commits into from
Nov 28, 2023

Conversation

ankrgyl
Copy link
Contributor

@ankrgyl ankrgyl commented Nov 28, 2023

No description provided.

@ankrgyl ankrgyl requested a review from manugoyal November 28, 2023 07:41
Copy link
Contributor

@manugoyal manugoyal left a comment

Choose a reason for hiding this comment

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

exciting

# OpenAI is very slow to import, so we only do it if we need it
complete, RateLimitError = prepare_openai_complete(is_async=False, api_key=api_key)
complete, RateLimitError = prepare_openai_complete(is_async=False, api_key=api_key, base_url=base_url)
print(kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦

complete, RateLimitError = prepare_openai_complete(is_async=True, api_key=api_key)
async def arun_cached_request(api_key=None, base_url=None, **kwargs):
complete, RateLimitError = prepare_openai_complete(is_async=True, api_key=api_key, base_url=base_url)
print(kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦

@ankrgyl ankrgyl merged commit 975fce7 into main Nov 28, 2023
3 checks passed
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.

2 participants