mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-20 06:18:14 +00:00
Merge branch 'master' of https://github.com/ItzCrazyKns/Perplexica
This commit is contained in:
@@ -10,6 +10,8 @@ import {
|
||||
getDeepseekApiKey,
|
||||
getAimlApiKey,
|
||||
getLMStudioApiEndpoint,
|
||||
getLemonadeApiEndpoint,
|
||||
getLemonadeApiKey,
|
||||
updateConfig,
|
||||
getOllamaApiKey,
|
||||
} from '@/lib/config';
|
||||
@@ -56,6 +58,8 @@ export const GET = async (req: Request) => {
|
||||
config['ollamaApiUrl'] = getOllamaApiEndpoint();
|
||||
config['ollamaApiKey'] = getOllamaApiKey();
|
||||
config['lmStudioApiUrl'] = getLMStudioApiEndpoint();
|
||||
config['lemonadeApiUrl'] = getLemonadeApiEndpoint();
|
||||
config['lemonadeApiKey'] = getLemonadeApiKey();
|
||||
config['anthropicApiKey'] = getAnthropicApiKey();
|
||||
config['groqApiKey'] = getGroqApiKey();
|
||||
config['geminiApiKey'] = getGeminiApiKey();
|
||||
@@ -106,6 +110,10 @@ export const POST = async (req: Request) => {
|
||||
LM_STUDIO: {
|
||||
API_URL: config.lmStudioApiUrl,
|
||||
},
|
||||
LEMONADE: {
|
||||
API_URL: config.lemonadeApiUrl,
|
||||
API_KEY: config.lemonadeApiKey,
|
||||
},
|
||||
CUSTOM_OPENAI: {
|
||||
API_URL: config.customOpenaiApiUrl,
|
||||
API_KEY: config.customOpenaiApiKey,
|
||||
|
@@ -23,6 +23,8 @@ interface SettingsType {
|
||||
ollamaApiUrl: string;
|
||||
ollamaApiKey: string;
|
||||
lmStudioApiUrl: string;
|
||||
lemonadeApiUrl: string;
|
||||
lemonadeApiKey: string;
|
||||
deepseekApiKey: string;
|
||||
aimlApiKey: string;
|
||||
customOpenaiApiKey: string;
|
||||
@@ -953,6 +955,48 @@ const Page = () => {
|
||||
</div>
|
||||
</div>
|
||||
</SettingsSection>
|
||||
|
||||
<SettingsSection title="Lemonade">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div className="flex flex-col space-y-1">
|
||||
<p className="text-black/70 dark:text-white/70 text-sm">
|
||||
Lemonade API URL
|
||||
</p>
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="Lemonade API URL"
|
||||
value={config.lemonadeApiUrl}
|
||||
isSaving={savingStates['lemonadeApiUrl']}
|
||||
onChange={(e) => {
|
||||
setConfig((prev) => ({
|
||||
...prev!,
|
||||
lemonadeApiUrl: e.target.value,
|
||||
}));
|
||||
}}
|
||||
onSave={(value) => saveConfig('lemonadeApiUrl', value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col space-y-1">
|
||||
<p className="text-black/70 dark:text-white/70 text-sm">
|
||||
Lemonade API Key (Optional)
|
||||
</p>
|
||||
<Input
|
||||
type="password"
|
||||
placeholder="Lemonade API Key"
|
||||
value={config.lemonadeApiKey}
|
||||
isSaving={savingStates['lemonadeApiKey']}
|
||||
onChange={(e) => {
|
||||
setConfig((prev) => ({
|
||||
...prev!,
|
||||
lemonadeApiKey: e.target.value,
|
||||
}));
|
||||
}}
|
||||
onSave={(value) => saveConfig('lemonadeApiKey', value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</SettingsSection>
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
|
Reference in New Issue
Block a user