mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-17 15:28:37 +00:00
Implement provider formatting improvements and fix client-side compatibility
- Add PROVIDER_INFO metadata to each provider file with proper display names - Create centralized PROVIDER_METADATA in index.ts for consistent reference - Update settings UI to use provider metadata for display names - Fix client/server compatibility for Node.js modules in config.ts
This commit is contained in:
@ -7,6 +7,7 @@ import { Switch } from '@headlessui/react';
|
||||
import ThemeSwitcher from '@/components/theme/Switcher';
|
||||
import { ImagesIcon, VideoIcon } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { PROVIDER_METADATA } from '@/lib/providers';
|
||||
|
||||
interface SettingsType {
|
||||
chatModelProviders: {
|
||||
@ -547,9 +548,8 @@ const Page = () => {
|
||||
options={Object.keys(config.chatModelProviders).map(
|
||||
(provider) => ({
|
||||
value: provider,
|
||||
label:
|
||||
provider.charAt(0).toUpperCase() +
|
||||
provider.slice(1),
|
||||
label: (PROVIDER_METADATA as any)[provider]?.displayName ||
|
||||
provider.charAt(0).toUpperCase() + provider.slice(1),
|
||||
}),
|
||||
)}
|
||||
/>
|
||||
@ -689,9 +689,8 @@ const Page = () => {
|
||||
options={Object.keys(config.embeddingModelProviders).map(
|
||||
(provider) => ({
|
||||
value: provider,
|
||||
label:
|
||||
provider.charAt(0).toUpperCase() +
|
||||
provider.slice(1),
|
||||
label: (PROVIDER_METADATA as any)[provider]?.displayName ||
|
||||
provider.charAt(0).toUpperCase() + provider.slice(1),
|
||||
}),
|
||||
)}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user