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

Error running npx @ailly/cli --prompt 'Tell me a joke' #148

Closed
tkhill-AWS opened this issue May 31, 2024 · 2 comments
Closed

Error running npx @ailly/cli --prompt 'Tell me a joke' #148

tkhill-AWS opened this issue May 31, 2024 · 2 comments

Comments

@tkhill-AWS
Copy link

Following the CLI instructions, led to:

b0be835864fc :: ~/ailly » npx @ailly/cli --prompt 'Tell me a joke'
(node:44640) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

There was an error calling Bedrock. Please enable model access to model with id anthropic.claude-3-haiku-20240307-v1:0 in the AWS region async () => {
    if (runtimeConfig.region === void 0) {
      throw new Error("Region is missing from runtimeConfig");
    }
    const region = runtimeConfig.region;
    if (typeof region === "string") {
      return region;
    }
    return region();
  }.
There were errors when generating responses:
  stdout: There was an error calling Bedrock. Please enable model access to model with id anthropic.claude-3-haiku-20240307-v1:0 in the AWS region async () => {
    if (runtimeConfig.region === void 0) {
      throw new Error("Region is missing from runtimeConfig");
    }
    const region = runtimeConfig.region;
    if (typeof region === "string") {
      return region;
    }
    return region();
  }.
b0be835864fc :: ~/ailly »

Node version: v21.6.2
Mac: OS version 14.5
Shell: zsh
Terminal: iTerm, Build 3.5.0

@DavidSouther
Copy link
Owner

Looks like there's three issues in here:

  1. Something uses "punycode" which Ailly users don't care about, and got deprecated in 21 so isn't showing up in 20.
  2. When AWS_REGION isn't set, the Bedrock Client's config.region function isn't getting called.
  3. When running stdout, it's printing both individual and summary errors. It only needs to print individual errors.

@DavidSouther
Copy link
Owner

2 and 3 closed in #150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants