mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
feat(core): add anthropic provider (#11911)
Close [AI-40](https://linear.app/affine-design/issue/AI-40). ### What changed? - Add anthropic provider. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for Anthropic as a new provider option in Copilot, enabling integration with Anthropic's text generation models. - Users can now configure Anthropic provider settings, including API key management, through the admin interface. - **Chores** - Updated dependencies to include the Anthropic SDK for backend operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
StorageJSONSchema,
|
||||
StorageProviderConfig,
|
||||
} from '../../base';
|
||||
import { AnthropicConfig } from './providers/anthropic';
|
||||
import type { FalConfig } from './providers/fal';
|
||||
import { GeminiConfig } from './providers/gemini';
|
||||
import { OpenAIConfig } from './providers/openai';
|
||||
@@ -21,6 +22,7 @@ declare global {
|
||||
fal: ConfigItem<FalConfig>;
|
||||
gemini: ConfigItem<GeminiConfig>;
|
||||
perplexity: ConfigItem<PerplexityConfig>;
|
||||
anthropic: ConfigItem<AnthropicConfig>;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -56,6 +58,12 @@ defineModuleConfig('copilot', {
|
||||
apiKey: '',
|
||||
},
|
||||
},
|
||||
'providers.anthropic': {
|
||||
desc: 'The config for the anthropic provider.',
|
||||
default: {
|
||||
apiKey: '',
|
||||
},
|
||||
},
|
||||
unsplash: {
|
||||
desc: 'The config for the unsplash key.',
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user