feat: Support LMStudio models
Adds support for LMStudio models, allowing users to access and use them within the application. This involves: - Adding new functions to `db/models.ts` to handle LMStudio model IDs and fetch their information from the OpenAI API. - Modifying the `ollamaFormatAllCustomModels` function to include LMStudio models in the list of available models. - Introducing a timeout mechanism in `libs/openai.ts` to prevent API requests from hanging. This change enhances the model selection experience, providing users with a wider range of models to choose from.
This commit is contained in:
@@ -40,7 +40,7 @@ export const pageAssistModel = async ({
|
||||
if (isCustom) {
|
||||
const modelInfo = await getModelInfo(model)
|
||||
const providerInfo = await getOpenAIConfigById(modelInfo.provider_id)
|
||||
|
||||
console.log(modelInfo, providerInfo)
|
||||
return new ChatOpenAI({
|
||||
modelName: modelInfo.model_id,
|
||||
openAIApiKey: providerInfo.apiKey || "temp",
|
||||
|
||||
Reference in New Issue
Block a user