Skip to content
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

config is missing and const makes the example hard to use #6624

Closed
rvernica opened this issue Nov 5, 2024 · 3 comments
Closed

config is missing and const makes the example hard to use #6624

rvernica opened this issue Nov 5, 2024 · 3 comments
Assignees
Labels
closed-for-staleness documentation This is a problem with documentation. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.

Comments

@rvernica
Copy link

rvernica commented Nov 5, 2024

Describe the issue

Example code uses const for all the variables which makes the example hard to use with Copy & Paste. Also, the config variable is used and not declared nor is any reference provided on how it should be declared.

import { BedrockRuntimeClient, InvokeModelCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import
// const { BedrockRuntimeClient, InvokeModelCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import
const client = new BedrockRuntimeClient(config);

Links

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-runtime/command/InvokeModelCommand/

@rvernica rvernica added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Nov 5, 2024
@aBurmeseDev aBurmeseDev self-assigned this Nov 5, 2024
@aBurmeseDev
Copy link
Member

Hi @rvernica - thanks for reaching out and your feedback.

For the client config, it would depend on the client but the essential inputs are usually the credentials and the region. However, these can also be provided through environment variables or a configuration file, eliminating the need to include them in the code initialization. Apart from credentials and region, developers can also specify custom options like endpoint URLs and request handlers.

Here's the documentation you can refer to: https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md

Hope that helps and we'll consider improving our code example addressing your feedback.
Best,
John

@aBurmeseDev aBurmeseDev added response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Nov 6, 2024
Copy link

This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Nov 17, 2024
Copy link

github-actions bot commented Dec 5, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
closed-for-staleness documentation This is a problem with documentation. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants