Give message to user instead of sending request if Anthropic API key not set
This commit is contained in:
parent
e932dba75c
commit
90fd901091
2 changed files with 7 additions and 1 deletions
|
|
@ -145,6 +145,12 @@ class Anthropic extends BaseLLM {
|
|||
signal: AbortSignal,
|
||||
options: CompletionOptions,
|
||||
): AsyncGenerator<ChatMessage> {
|
||||
if (!this.apiKey || this.apiKey === "") {
|
||||
throw new Error(
|
||||
"Request not sent. You have an Anthropic model configured in your config.json, but the API key is not set.",
|
||||
);
|
||||
}
|
||||
|
||||
const shouldCacheSystemMessage =
|
||||
!!this.systemMessage && this.cacheBehavior?.cacheSystemMessage;
|
||||
const systemMessage: string = stripImages(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "0.9.269",
|
||||
"version": "0.9.272",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue