The PR introduces changes related to adding support for a new RerankResponse in the aws_client.py module.
Summary
The aws_client.py module now includes support for a new RerankResponse.
This involves updating the import statement to include the RerankResponse class and modifying the stream_response_mapping dictionary to accommodate the new response type.
Additionally, the test_aws_client.py file has been updated to incorporate testing for the RerankResponse.
Code Changes
aws_client.py:
Added RerankResponse to the import statement.
Included "rerank": RerankResponse in the stream_response_mapping dictionary.
test_aws_client.py:
Introduced a new test case, test_rerank, to validate the functionality of the RerankResponse.
Adjusted the model mapping structure to include a "rerank_model" entry.
Skip the test_rerank test case for platforms other than sagemaker as only sagemaker supports reranking.
The PR introduces changes related to adding support for a new
RerankResponse
in theaws_client.py
module.Summary
aws_client.py
module now includes support for a newRerankResponse
.RerankResponse
class and modifying thestream_response_mapping
dictionary to accommodate the new response type.test_aws_client.py
file has been updated to incorporate testing for theRerankResponse
.Code Changes
aws_client.py
:RerankResponse
to the import statement."rerank": RerankResponse
in thestream_response_mapping
dictionary.test_aws_client.py
:test_rerank
, to validate the functionality of theRerankResponse
."rerank_model"
entry.test_rerank
test case for platforms other thansagemaker
as onlysagemaker
supports reranking.