feat: frontend support claude (#573)

Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
Joel
2023-07-17 00:14:32 +08:00
committed by GitHub
parent 7599f79a17
commit 8e11200306
17 changed files with 401 additions and 35 deletions

View File

@@ -59,14 +59,19 @@ export type Member = Pick<UserProfileResponse, 'id' | 'name' | 'email' | 'last_l
export enum ProviderName {
OPENAI = 'openai',
AZURE_OPENAI = 'azure_openai',
ANTHROPIC = 'anthropic',
}
export type ProviderAzureToken = {
openai_api_base?: string
openai_api_key?: string
}
export type ProviderAnthropicToken = {
anthropic_api_key?: string
}
export type ProviderTokenType = {
[ProviderName.OPENAI]: string
[ProviderName.AZURE_OPENAI]: ProviderAzureToken
[ProviderName.ANTHROPIC]: ProviderAnthropicToken
}
export type Provider = {
[Name in ProviderName]: {