Skip to content

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.

2 participants