import { ArrowSquareOut, Info } from "@phosphor-icons/react"; import { AWS_REGIONS } from "./regions"; import { useState } from "react"; export default function AwsBedrockLLMOptions({ settings }) { const [connectionMethod, setConnectionMethod] = useState( settings?.AwsBedrockLLMConnectionMethod ?? "iam" ); return (
{!settings?.credentialsOnly && connectionMethod !== "apiKey" && (

You should use a properly defined IAM user for inferencing.
Read more on how to use AWS Bedrock in AnythingLLM

)}

Select the method to authenticate with AWS Bedrock.

{["iam", "sessionToken"].includes(connectionMethod) && ( <>
)} {connectionMethod === "sessionToken" && (
)} {connectionMethod === "apiKey" && (
)}
{!settings?.credentialsOnly && ( <>
e.target.blur()} defaultValue={settings?.AwsBedrockLLMTokenLimit} required={true} autoComplete="off" />
e.target.blur()} defaultValue={settings?.AwsBedrockLLMMaxOutputTokens} required={true} autoComplete="off" />
)}
); }