Update app/client/platforms/bedrock.ts

增加友好提示

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
glay 2024-12-08 23:47:16 +08:00 committed by GitHub
parent f5ae086d3c
commit fb3437ca01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 2 deletions

View File

@ -583,12 +583,24 @@ export class BedrockApi implements LLMApi {
}
}
/**
* Usage tracking is not supported for Bedrock API.
* @throws {Error} Always throws an error indicating the operation is not supported.
*/
async usage() {
return { used: 0, total: 0 };
throw new Error(
"Usage tracking is not supported for Bedrock API. Use AWS CloudWatch metrics instead."
);
}
/**
* Model listing is not supported for Bedrock API.
* @throws {Error} Always throws an error indicating the operation is not supported.
*/
async models() {
return [];
throw new Error(
"Model listing is not supported for Bedrock API. Configure available models in AWS Console."
);
}
}