-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Bedrock Titan Validation Malformed input request: string does not match pattern ^(\|+|User:)$ #3993
Comments
I am running into this issue as well. The official Titan documentation says that
but then goes on to say that the stop sequences should be concatenated using the
which seems strange - if |
+1, same issue here. The only |
Same issue here, this makes using CoT prompting methods or Langchain agents impossible to use with Bedrock because of what is likely a mistyped regular expression and confusing documentation. Please fix the validation to allow for stop sequences other than |
Thank you for providing your use cases and more details. I've reached out to the service team about the following issues.
As this is a service team issue (not unique to the Python SDK), I've created a tracking issue in our cross-SDK repository (aws/aws-sdk#692). Please continue to discuss your use cases and other details in the new issue. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
The AWS Bedrock Inference docs only specify the stopSequence parameter for titan models as an array of strings.
https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-text.html
The following code:
Returns an error:
ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: string [Human:] does not match pattern ^(\|+|User:)$, please reformat your input and try again.
This validation is not required in any of the documentation.
Expected Behavior
Should produce a LLM Response from the Bedrock Runtime
Current Behavior
Reproduction Steps
Run the following in a python environment:
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.34.21
Environment details (OS name and version, etc.)
Mac Sonoma M1 Chip
The text was updated successfully, but these errors were encountered: