Fixes model arguments for amazon models (#5896)

Fixes #5713 
#### Who can review?

Tag maintainers/contributors who might be interested:
@hwchase17
@agola11
@aarora79
@rsgrewal-aws
This commit is contained in:
Piyush Jain 2023-06-08 14:16:01 -07:00 committed by GitHub
parent 767fa91eae
commit a6ebffb695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,10 @@ class LLMInputOutputAdapter:
input_body = {**model_kwargs} input_body = {**model_kwargs}
if provider == "anthropic" or provider == "ai21": if provider == "anthropic" or provider == "ai21":
input_body["prompt"] = prompt input_body["prompt"] = prompt
elif provider == "amazon":
input_body = dict()
input_body["inputText"] = prompt
input_body["textGenerationConfig"] = {**model_kwargs}
else: else:
input_body["inputText"] = prompt input_body["inputText"] = prompt