Skip to content

Commit

Permalink
Ensure default region
Browse files Browse the repository at this point in the history
  • Loading branch information
chezou committed Jan 21, 2024
1 parent 4426f64 commit fa9746f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions clients/js/src/embeddings/AmazonBedrockEmbeddingFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ let amazonBedrockApi: any;

export class AmazonBedrockEmbeddingFunction implements IEmbeddingFunction {
private model: string;
private readonly configuration: any; // Assume this is BedrockRuntimeClientConfig
private configuration: any; // Assume this is BedrockRuntimeClientConfig
private amazonBedrockApi?: any;
private invokeCommand?: any;

constructor({ config, model }: { config: any; model?: string }) {
constructor({ config, model }: { config: any; model?: string}) {
this.configuration = config;
if (!this.configuration.region) {
this.configuration.region = "us-east-1";
}
this.model = model || "amazon.titan-embed-text-v1";
}

Expand Down

0 comments on commit fa9746f

Please sign in to comment.