mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-12-26 05:28:14 +00:00
Compare commits
1 Commits
60dd7a8108
...
feat/impro
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae132ebee8 |
@@ -1,4 +1,4 @@
|
|||||||
import OpenAILLM from "../openai/openaiLLM";
|
import OpenAILLM from '../openai/openaiLLM';
|
||||||
|
|
||||||
class AnthropicLLM extends OpenAILLM {}
|
class AnthropicLLM extends OpenAILLM {}
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class AnthropicProvider extends BaseModelProvider<AnthropicConfig> {
|
|||||||
return new AnthropicLLM({
|
return new AnthropicLLM({
|
||||||
apiKey: this.config.apiKey,
|
apiKey: this.config.apiKey,
|
||||||
model: key,
|
model: key,
|
||||||
baseURL: 'https://api.anthropic.com/v1'
|
baseURL: 'https://api.anthropic.com/v1',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const providers: Record<string, ProviderConstructor<any>> = {
|
|||||||
transformers: TransformersProvider,
|
transformers: TransformersProvider,
|
||||||
groq: GroqProvider,
|
groq: GroqProvider,
|
||||||
lemonade: LemonadeProvider,
|
lemonade: LemonadeProvider,
|
||||||
anthropic: AnthropicProvider
|
anthropic: AnthropicProvider,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getModelProvidersUIConfigSection =
|
export const getModelProvidersUIConfigSection =
|
||||||
|
|||||||
@@ -46,13 +46,17 @@ class LemonadeProvider extends BaseModelProvider<LemonadeConfig> {
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
...this.config.apiKey ? {'Authorization': `Bearer ${this.config.apiKey}`} : {}
|
...(this.config.apiKey
|
||||||
|
? { Authorization: `Bearer ${this.config.apiKey}` }
|
||||||
|
: {}),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
|
|
||||||
const models: Model[] = data.data.filter((m: any) => m.recipe === 'llamacpp').map((m: any) => {
|
const models: Model[] = data.data
|
||||||
|
.filter((m: any) => m.recipe === 'llamacpp')
|
||||||
|
.map((m: any) => {
|
||||||
return {
|
return {
|
||||||
name: m.id,
|
name: m.id,
|
||||||
key: m.id,
|
key: m.id,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import OpenAIEmbedding from "../openai/openaiEmbedding";
|
import OpenAIEmbedding from '../openai/openaiEmbedding';
|
||||||
|
|
||||||
class LemonadeEmbedding extends OpenAIEmbedding {}
|
class LemonadeEmbedding extends OpenAIEmbedding {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import OpenAILLM from "../openai/openaiLLM";
|
import OpenAILLM from '../openai/openaiLLM';
|
||||||
|
|
||||||
class LemonadeLLM extends OpenAILLM {}
|
class LemonadeLLM extends OpenAILLM {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user