From 6dd20be25c4c9925a74af98f8ba462e47198f090 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Thu, 14 Nov 2024 21:45:12 +0900 Subject: [PATCH] Add setup instructions for Claude API integration --- src/lang/en.ts | 1 + src/lib/Others/WelcomeRisu.svelte | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/lang/en.ts b/src/lang/en.ts index 046b6ddc..6b1a11fa 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -186,6 +186,7 @@ export const languageEnglish = { hordeProvider: "Horde is a free provider, but the response time is long and the quality is low.", setProviderLater: "There are other providers, but you can set it later in settings. select this if you want to set it later.", setupOpenAI: "To use OpenAI, you need to get an API key. \n1. go to https://beta.openai.com/ \n2. login with your account \n3. go to https://beta.openai.com/account/api-keys \n4. click 'Create New API Key' and name your key whatever you want. \n5. copy the key in the website.\n6. go back to RisuAI\n7. paste it, and click send button.", + setupClaude: "To use Claude, you need to get an API key. \n1. go to https://antropic.com/ \n2. click 'Get Started' \n3. sign up with your account \n4. go to https://antropic.com/keys \n5. click 'Create Key' and name your key whatever you want. \n6. copy the key in the website.\n7. go back to RisuAI\n8. paste it, and click send button.", setupOpenrouter: "To use Openrouter, you need to get an API key. \n1. go to https://openrouter.ai/keys\n2. click 'Create Key'\n3. set key name whatever you want.\n4. copy the key in the website\n5. go back to RisuAI\n6. paste it, and click send button.", allDone: "All Done! please wait a moment.", setupLaterMessage: "Welcome {username}! do you want me to guide you to setup or do it yourself?", diff --git a/src/lib/Others/WelcomeRisu.svelte b/src/lib/Others/WelcomeRisu.svelte index 815f28c6..c4a871a0 100644 --- a/src/lib/Others/WelcomeRisu.svelte +++ b/src/lib/Others/WelcomeRisu.svelte @@ -58,6 +58,13 @@ input = '' } } + if(provider === 'claude'){ + if(input.length > 0 && input.startsWith('sk-')){ + DBState.db.claudeAPIKey = input + step = 5 + input = '' + } + } } } } @@ -263,6 +270,9 @@ {#if provider === 'openrouter'} {/if} + {#if provider === 'claude'} + + {/if} {/if} {#if step >= 5}