aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

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

Open xueyao-bai-mike opened this issue 6 months ago • 2 comments

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.

xueyao-bai-mike avatar May 24 '25 10:05 xueyao-bai-mike

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.

beqqrry-aws avatar May 28 '25 16:05 beqqrry-aws

removed folder python/cross_service/document_OCR_with_textract_bedrock/.

xueyao-bai-mike avatar May 29 '25 02:05 xueyao-bai-mike

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 :)

beqqrry-aws avatar Jul 09 '25 19:07 beqqrry-aws

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?

xueyao-bai-mike avatar Jul 10 '25 03:07 xueyao-bai-mike

@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.

beqqrry-aws avatar Jul 10 '25 16:07 beqqrry-aws

Hi @xueyao-bai-mike, have you had a chance to work on fixing the comments and the file path input?

beqqrry-aws avatar Aug 14 '25 16:08 beqqrry-aws

Hey @xueyao-bai-mike , I'm going to close this for now since it's been stale for so long. Feel free to re-open it or to ask questions about what is still required.

beqqrry-aws avatar Sep 02 '25 17:09 beqqrry-aws