File tree Expand file tree Collapse file tree 6 files changed +36
-15
lines changed
src/lib/services/integrations Expand file tree Collapse file tree 6 files changed +36
-15
lines changed Original file line number Diff line number Diff line change 99
1010const apiEndpoint = 'https://api.anthropic.com/v1/messages' ;
1111
12+ export const apiLabel = 'Anthropic API' ;
13+ export const developerURL = 'https://docs.claude.com/en/api/overview' ;
14+ export const apiKeyURL = 'https://platform.claude.com/settings/keys' ;
15+ export const apiKeyPattern = / s k - a n t - a p i 0 3 - [ a - z A - Z 0 - 9 - _ ] { 80 , } / ;
16+
1217/**
1318 * Send a message to the Anthropic Messages API and return the response text.
1419 * @param {AiCompletionOptions } options Options.
Original file line number Diff line number Diff line change 77 * @import { AiCompletionOptions } from '$lib/types/private';
88 */
99
10+ export const apiLabel = 'Google AI Studio API' ;
11+ export const developerURL = 'https://ai.google.dev/gemini-api/docs' ;
12+ export const apiKeyURL = 'https://aistudio.google.com/api-keys' ;
13+ export const apiKeyPattern = / A I z a [ a - z A - Z 0 - 9 _ - ] { 35 } / ;
14+
1015/**
1116 * Send a message to the Google Gemini API and return the response text.
1217 * @param {AiCompletionOptions & { responseFormat?: string } } options Options. Pass
Original file line number Diff line number Diff line change 99
1010const apiEndpoint = 'https://api.openai.com/v1/chat/completions' ;
1111
12+ export const apiLabel = 'OpenAI API' ;
13+ export const developerURL = 'https://platform.openai.com/docs/overview' ;
14+ export const apiKeyURL = 'https://platform.openai.com/api-keys' ;
15+ export const apiKeyPattern = / s k - [ a - z A - Z 0 - 9 - _ ] { 40 , } / ;
16+
1217/**
1318 * Send a message to the OpenAI Chat Completions API and return the response text.
1419 * @param {AiCompletionOptions } options Options.
Original file line number Diff line number Diff line change 1- import { complete } from '$lib/services/integrations/ai/anthropic' ;
1+ import {
2+ apiKeyPattern ,
3+ apiKeyURL ,
4+ apiLabel ,
5+ complete ,
6+ developerURL ,
7+ } from '$lib/services/integrations/ai/anthropic' ;
28
39import {
410 createTranslationSystemPrompt ,
@@ -13,10 +19,6 @@ import {
1319
1420const serviceId = 'anthropic' ;
1521const serviceLabel = 'Anthropic Claude' ;
16- const apiLabel = 'Anthropic API' ;
17- const developerURL = 'https://docs.claude.com/en/api/overview' ;
18- const apiKeyURL = 'https://platform.claude.com/settings/keys' ;
19- const apiKeyPattern = / s k - a n t - a p i 0 3 - [ a - z A - Z 0 - 9 - _ ] { 80 , } / ;
2022const model = 'claude-haiku-4-5' ;
2123
2224/**
Original file line number Diff line number Diff line change 1- import { complete } from '$lib/services/integrations/ai/google' ;
1+ import {
2+ apiKeyPattern ,
3+ apiKeyURL ,
4+ apiLabel ,
5+ complete ,
6+ developerURL ,
7+ } from '$lib/services/integrations/ai/google' ;
28
39import {
410 createTranslationSystemPrompt ,
@@ -13,10 +19,6 @@ import {
1319
1420const serviceId = 'google-ai' ;
1521const serviceLabel = 'Google Gemini' ;
16- const apiLabel = 'Google AI Studio API' ;
17- const developerURL = 'https://ai.google.dev/gemini-api/docs' ;
18- const apiKeyURL = 'https://aistudio.google.com/api-keys' ;
19- const apiKeyPattern = / A I z a [ a - z A - Z 0 - 9 _ - ] { 35 } / ;
2022const model = 'gemini-2.5-flash-lite' ;
2123
2224/**
Original file line number Diff line number Diff line change 1- import { complete } from '$lib/services/integrations/ai/openai' ;
1+ import {
2+ apiKeyPattern ,
3+ apiKeyURL ,
4+ apiLabel ,
5+ complete ,
6+ developerURL ,
7+ } from '$lib/services/integrations/ai/openai' ;
28
39import {
410 createTranslationSystemPrompt ,
@@ -13,10 +19,6 @@ import {
1319
1420const serviceId = 'openai' ;
1521const serviceLabel = 'OpenAI GPT' ;
16- const apiLabel = 'OpenAI API' ;
17- const developerURL = 'https://platform.openai.com/docs/overview' ;
18- const apiKeyURL = 'https://platform.openai.com/api-keys' ;
19- const apiKeyPattern = / s k - [ a - z A - Z 0 - 9 - _ ] { 40 , } / ;
2022const model = 'gpt-4o-mini' ;
2123
2224/**
You can’t perform that action at this time.
0 commit comments