mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-04-30 10:44:23 +00:00
fix: add defaults for LMStudio to work out of the box (#928)
Some checks are pending
Update Stable Branch / prepare-release (push) Waiting to run
Some checks are pending
Update Stable Branch / prepare-release (push) Waiting to run
This commit is contained in:
parent
4c81e154a0
commit
4c81cb02e1
@ -29,7 +29,12 @@ export abstract class BaseProvider implements ProviderInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const baseUrlKey = this.config.baseUrlKey || defaultBaseUrlKey;
|
const baseUrlKey = this.config.baseUrlKey || defaultBaseUrlKey;
|
||||||
let baseUrl = settingsBaseUrl || serverEnv?.[baseUrlKey] || process?.env?.[baseUrlKey] || manager.env?.[baseUrlKey];
|
let baseUrl =
|
||||||
|
settingsBaseUrl ||
|
||||||
|
serverEnv?.[baseUrlKey] ||
|
||||||
|
process?.env?.[baseUrlKey] ||
|
||||||
|
manager.env?.[baseUrlKey] ||
|
||||||
|
this.config.baseUrl;
|
||||||
|
|
||||||
if (baseUrl && baseUrl.endsWith('/')) {
|
if (baseUrl && baseUrl.endsWith('/')) {
|
||||||
baseUrl = baseUrl.slice(0, -1);
|
baseUrl = baseUrl.slice(0, -1);
|
||||||
|
@ -12,6 +12,7 @@ export default class LMStudioProvider extends BaseProvider {
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
baseUrlKey: 'LMSTUDIO_API_BASE_URL',
|
baseUrlKey: 'LMSTUDIO_API_BASE_URL',
|
||||||
|
baseUrl: 'http://localhost:1234/',
|
||||||
};
|
};
|
||||||
|
|
||||||
staticModels: ModelInfo[] = [];
|
staticModels: ModelInfo[] = [];
|
||||||
|
@ -28,5 +28,6 @@ export interface ProviderInfo {
|
|||||||
}
|
}
|
||||||
export interface ProviderConfig {
|
export interface ProviderConfig {
|
||||||
baseUrlKey?: string;
|
baseUrlKey?: string;
|
||||||
|
baseUrl?: string;
|
||||||
apiTokenKey?: string;
|
apiTokenKey?: string;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user