You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Amazon Bedrock Generator and Chat Generator produces an error when running inference. I think its failing to invoke the model.
To Reproduce
To reproduce the error:
After installing haystack-ai and importing the Amazon Bedrock Generator.
Initialise AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION as global variables.
AWS_DEFAULT_REGION is set to 'eu-west-2'
Run:
generator = AmazonBedrockGenerator(model="anthropic.claude-3-sonnet-20240229-v1:0")
result = generator.run("Who is the best American actor?")
for reply in result["replies"]:
print(reply)
Error produced:
TypeError: sequence item 0: expected str instance, NoneType found
from Line 208 in .haystack_integrations/components/generators/amazon_bedrock/generator.py
Describe your environment (please complete the following information):
importosfromhaystack_integrations.components.generators.amazon_bedrockimportAmazonBedrockGeneratoros.environ["AWS_ACCESS_KEY_ID"]="..."os.environ["AWS_SECRET_ACCESS_KEY"]="..."os.environ["AWS_DEFAULT_REGION"]="eu-west-3"generator=AmazonBedrockGenerator(model="anthropic.claude-3-sonnet-20240229-v1:0")
result=generator.run("Who is the best American actor?")
print(result)
Please note that not all models are supported in all AWS regions. -> Detailed information
Describe the bug
The Amazon Bedrock Generator and Chat Generator produces an error when running inference. I think its failing to invoke the model.
To Reproduce
To reproduce the error:
After installing haystack-ai and importing the Amazon Bedrock Generator.
Initialise AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION as global variables.
AWS_DEFAULT_REGION is set to 'eu-west-2'
Run:
generator = AmazonBedrockGenerator(model="anthropic.claude-3-sonnet-20240229-v1:0")
result = generator.run("Who is the best American actor?")
for reply in result["replies"]:
print(reply)
Error produced:
TypeError: sequence item 0: expected str instance, NoneType found
from Line 208 in .haystack_integrations/components/generators/amazon_bedrock/generator.py
Describe your environment (please complete the following information):
Happy to add more details if needed.
The text was updated successfully, but these errors were encountered: