From 0fbb560e906f04e3bad1af43eba51a7e5b97e3ca Mon Sep 17 00:00:00 2001 From: butterfly Date: Sun, 7 Apr 2024 20:05:19 +0800 Subject: [PATCH] feat: delete returned models in modals function of ClaudeApi instance --- app/client/platforms/anthropic.ts | 72 +++++++++++++++---------------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/app/client/platforms/anthropic.ts b/app/client/platforms/anthropic.ts index 5b833dffd..25318d311 100644 --- a/app/client/platforms/anthropic.ts +++ b/app/client/platforms/anthropic.ts @@ -189,8 +189,6 @@ export class ClaudeApi implements LLMApi { "anthropic-version": accessStore.anthropicApiVersion, Authorization: getAuthKey(accessStore.anthropicApiKey), }, - // mode: (!clientConfig?.isApp && pathObj.hostname === location.hostname ? "same-origin" : "cors") as RequestMode, - // mode: "no-cors" as RequestMode, credentials: "include" as RequestCredentials, }; @@ -309,43 +307,43 @@ export class ClaudeApi implements LLMApi { }; } async models() { - const provider = { - id: "anthropic", - providerName: "Anthropic", - providerType: "anthropic", - }; + // const provider = { + // id: "anthropic", + // providerName: "Anthropic", + // providerType: "anthropic", + // }; return [ - { - name: "claude-instant-1.2", - available: true, - provider, - }, - { - name: "claude-2.0", - available: true, - provider, - }, - { - name: "claude-2.1", - available: true, - provider, - }, - { - name: "claude-3-opus-20240229", - available: true, - provider, - }, - { - name: "claude-3-sonnet-20240229", - available: true, - provider, - }, - { - name: "claude-3-haiku-20240307", - available: true, - provider, - }, + // { + // name: "claude-instant-1.2", + // available: true, + // provider, + // }, + // { + // name: "claude-2.0", + // available: true, + // provider, + // }, + // { + // name: "claude-2.1", + // available: true, + // provider, + // }, + // { + // name: "claude-3-opus-20240229", + // available: true, + // provider, + // }, + // { + // name: "claude-3-sonnet-20240229", + // available: true, + // provider, + // }, + // { + // name: "claude-3-haiku-20240307", + // available: true, + // provider, + // }, ]; } path(path: string): string {