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

Rerank 3.5 fixes #611

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Rerank 3.5 fixes #611

merged 1 commit into from
Dec 3, 2024

Conversation

billytrend-cohere
Copy link
Collaborator

@billytrend-cohere billytrend-cohere commented Dec 3, 2024

This pull request introduces changes to the src/cohere/aws_client.py file, primarily focusing on the _event_hook function and the addition of a new function, get_api_version.

  • The _event_hook function now extracts the api_version from the request URL's path, splitting it at the second-to-last slash. This version is then used to set the body["api_version"] when the endpoint is "rerank".
  • A new function, get_api_version, has been added. It takes a version string as input and returns the corresponding integer version. The function uses a dictionary to map string versions to integers, with a default value of 1 for unknown versions.
  • The get_endpoint_from_url function has been removed.

@billytrend-cohere billytrend-cohere merged commit 066bf3d into main Dec 3, 2024
3 checks passed
@billytrend-cohere billytrend-cohere deleted the billy/rr35 branch December 3, 2024 14:46
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.

1 participant