Skip to content

add AWS Go SDK v2 converse stream API sample to handle image input #7458

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

xueyao-bai-mike
Copy link
Contributor

This pull request add AWS Go SDK v2 converse stream API sample to handle image input


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added Go-v2 This issue relates to the AWS SDK for Go V2 Python This issue relates to the AWS SDK for Python (boto3) labels May 24, 2025
@rlhagerm rlhagerm requested a review from beqqrry-aws May 27, 2025 12:54
@beqqrry-aws
Copy link
Member

Why is there a Go file and a Python file in here? That's not very well explained. It is a Go example, so I would expect everything to be written in Go unless there was a specific reason to include another language.

@github-actions github-actions bot removed the Python This issue relates to the AWS SDK for Python (boto3) label May 29, 2025
@xueyao-bai-mike
Copy link
Contributor Author

removed folder python/cross_service/document_OCR_with_textract_bedrock/.

@brmur brmur added the Single action example A new (or significant update to a) small example, label Jun 24, 2025
@beqqrry-aws
Copy link
Member

Hey @xueyao-bai-mike,
Please review our code standards: https://github.com/awsdocs/aws-doc-sdk-examples/wiki/general-code-example-standards
Could this example be reworked to prompt and/or provide baseline files for some of these arguments? All our examples should be runnable so they can go in our automated testing framework.
Also, please review your comments and fix for relevancy and consistency.
Thanks for submitting this example :)

@xueyao-bai-mike
Copy link
Contributor Author

Hey @xueyao-bai-mike, Please review our code standards: https://github.com/awsdocs/aws-doc-sdk-examples/wiki/general-code-example-standards Could this example be reworked to prompt and/or provide baseline files for some of these arguments? All our examples should be runnable so they can go in our automated testing framework. Also, please review your comments and fix for relevancy and consistency. Thanks for submitting this example :)

Hi Jason, I read through the General Code Example Standards but still confusing what kind of baseline file I need to provide?

I previously contributed another PR https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/python/example_code/bedrock-runtime/models/anthropic_claude/converse_stream_pdf.py, which take PDF as input. Do you mean the code should take a file path input from console?

@beqqrry-aws
Copy link
Member

@xueyao-bai-mike
Yes, there are a few different ways to accomplish that, but the simplest is probably to ask for input from the console. You could also pass in the variable to the function and load that data from the environment. If you're going to have the file path directly in the code, then it needs to point to a real file in the resources folder at the top level in the repo. Requiring the user to modify the files given precludes us from having an automated test runner run the file. We can have the runner pass in console data or env data, but it can't edit the files directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Go-v2 This issue relates to the AWS SDK for Go V2 Single action example A new (or significant update to a) small example,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants