feat(app): lint & beautify

This commit is contained in:
ItzCrazyKns
2025-12-25 18:58:33 +05:30
parent 60dd7a8108
commit ae132ebee8
6 changed files with 131 additions and 127 deletions

View File

@@ -1,4 +1,4 @@
import OpenAILLM from "../openai/openaiLLM"; import OpenAILLM from '../openai/openaiLLM';
class AnthropicLLM extends OpenAILLM {} class AnthropicLLM extends OpenAILLM {}

View File

@@ -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',
}); });
} }

View File

@@ -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 =

View File

@@ -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,

View File

@@ -1,4 +1,4 @@
import OpenAIEmbedding from "../openai/openaiEmbedding"; import OpenAIEmbedding from '../openai/openaiEmbedding';
class LemonadeEmbedding extends OpenAIEmbedding {} class LemonadeEmbedding extends OpenAIEmbedding {}

View File

@@ -1,4 +1,4 @@
import OpenAILLM from "../openai/openaiLLM"; import OpenAILLM from '../openai/openaiLLM';
class LemonadeLLM extends OpenAILLM {} class LemonadeLLM extends OpenAILLM {}