Project Files
src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"modelKey",
"string",
{
displayName: "Model Key",
subtitle:
"The key of the model you want to use. Leave empty to use the currently loaded model.",
},
"",
)
.field(
"temperature",
"numeric",
{
displayName: "Temperature",
min: 0,
step: 0.01,
slider: { min: 0, max: 1, step: 0.01 },
precision: 2,
shortHand: "temp",
},
0.8,
)
.build();
export const globalConfigSchematics = createConfigSchematics()
.field(
"baseUrl",
"string",
{
displayName: "Remote LM Studio Base URL",
placeholder: "e.g. ws://127.0.0.1:1234",
},
"ws://127.0.0.1:1234", // Default Value
)
.field(
"clientIdentifier",
"string",
{
displayName: "Client Identifier",
subtitle: "The client identifier you want to use. Leave empty for auto generation.",
placeholder: "<Random>",
},
"",
)
.field(
"clientPasskey",
"string",
{
displayName: "Client Passkey",
subtitle: "The client passkey you want to use. Leave empty for auto generation.",
placeholder: "<Random>",
isProtected: true,
},
"",
)
.build();
src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"modelKey",
"string",
{
displayName: "Model Key",
subtitle:
"The key of the model you want to use. Leave empty to use the currently loaded model.",
},
"",
)
.field(
"temperature",
"numeric",
{
displayName: "Temperature",
min: 0,
step: 0.01,
slider: { min: 0, max: 1, step: 0.01 },
precision: 2,
shortHand: "temp",
},
0.8,
)
.build();
export const globalConfigSchematics = createConfigSchematics()
.field(
"baseUrl",
"string",
{
displayName: "Remote LM Studio Base URL",
placeholder: "e.g. ws://127.0.0.1:1234",
},
"ws://127.0.0.1:1234", // Default Value
)
.field(
"clientIdentifier",
"string",
{
displayName: "Client Identifier",
subtitle: "The client identifier you want to use. Leave empty for auto generation.",
placeholder: "<Random>",
},
"",
)
.field(
"clientPasskey",
"string",
{
displayName: "Client Passkey",
subtitle: "The client passkey you want to use. Leave empty for auto generation.",
placeholder: "<Random>",
isProtected: true,
},
"",
)
.build();