diff --git a/src/api/providers.js b/src/api/providers.js index b636e70..0e9ba2d 100644 --- a/src/api/providers.js +++ b/src/api/providers.js @@ -4,9 +4,6 @@ import { Preferences } from "./preferences.js"; -/// For user-friendly names -import { preferences } from "../../package.json"; - /// Provider modules import { NexraProvider } from "./Providers/nexra.js"; import { DeepInfraProvider } from "./Providers/deepinfra.js"; @@ -81,12 +78,6 @@ export const providers_info = { CustomOpenAI: { provider: CustomOpenAIProvider, stream: true }, }; -/// Chat providers (user-friendly names) -// fetched from package.json for consistency and to avoid duplicate code -export const chat_providers_names = preferences - .find((x) => x.name === "gptProvider") - .data.map((x) => [x.title, x.value]); - /// Providers that support file uploads export const file_supported_providers = [GeminiProvider, DeepInfraProvider]; diff --git a/src/api/providers_react.jsx b/src/api/providers_react.jsx index d3f5f35..0106d70 100644 --- a/src/api/providers_react.jsx +++ b/src/api/providers_react.jsx @@ -1,5 +1,11 @@ import { Form } from "@raycast/api"; -import { chat_providers_names } from "./providers.js"; + +/// For user-friendly names +import { preferences } from "../../package.json"; + +/// Chat providers (user-friendly names) +// fetched from package.json for consistency and to avoid duplicate code +const chat_providers_names = preferences.find((x) => x.name === "gptProvider").data.map((x) => [x.title, x.value]); export const ChatProvidersReact = (() => { // Display custom APIs in a separate section for organization