refactor: repartition server-side and client-side code
This commit is contained in:
17
app/.server/modules/constants.ts
Normal file
17
app/.server/modules/constants.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { LLMManager } from '~/.server/modules/llm/manager.server';
|
||||
|
||||
const llmManager = LLMManager.getInstance();
|
||||
|
||||
export const DEFAULT_MODEL = llmManager.getDefaultModel();
|
||||
export const MINOR_MODEL = llmManager.getMinorModel();
|
||||
export const DEFAULT_PROVIDER = llmManager.getDefaultProvider();
|
||||
|
||||
export const DEFAULT_MODEL_DETAILS = DEFAULT_PROVIDER.staticModels.find((m) => m.name === DEFAULT_MODEL);
|
||||
export const MINOR_MODEL_DETAILS = DEFAULT_PROVIDER.staticModels.find((m) => m.name === MINOR_MODEL);
|
||||
|
||||
export const getModel = (model: string) => {
|
||||
return DEFAULT_PROVIDER.getModelInstance({
|
||||
model,
|
||||
providerSettings: llmManager.getConfiguredProviderSettings(),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user