mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
feat: added improved llm model selector
This commit is contained in:
parent
dc19b43967
commit
a3cd598e01
23 changed files with 14733 additions and 126 deletions
|
|
@ -10,6 +10,7 @@ import {
|
|||
getDefaultSystemInstructionsResponse,
|
||||
getGlobalNewLLMConfigsResponse,
|
||||
getLLMPreferencesResponse,
|
||||
getModelListResponse,
|
||||
getNewLLMConfigRequest,
|
||||
getNewLLMConfigResponse,
|
||||
getNewLLMConfigsRequest,
|
||||
|
|
@ -145,6 +146,13 @@ class NewLLMConfigApiService {
|
|||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the dynamic LLM model catalogue (sourced from OpenRouter API)
|
||||
*/
|
||||
getModels = async () => {
|
||||
return baseApiService.get(`/api/v1/models`, getModelListResponse);
|
||||
};
|
||||
|
||||
/**
|
||||
* Update LLM preferences for a search space
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export const cacheKeys = {
|
|||
preferences: (searchSpaceId: number) => ["llm-preferences", searchSpaceId] as const,
|
||||
defaultInstructions: () => ["new-llm-configs", "default-instructions"] as const,
|
||||
global: () => ["new-llm-configs", "global"] as const,
|
||||
modelList: () => ["models", "catalogue"] as const,
|
||||
},
|
||||
imageGenConfigs: {
|
||||
all: (searchSpaceId: number) => ["image-gen-configs", searchSpaceId] as const,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue