src / configSchematics.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"searxngBaseUrl",
"string",
{
displayName: "SearXNG Base URL",
hint: "The base URL for the local/self-hosted SearXNG instance. Used as the primary search provider.",
},
"http://192.168.66.2:8888",
)
.field(
"braveApiKey",
"string",
{
displayName: "Brave Search API Key",
hint: "API key for the Brave Search API. Used as a fallback when SearXNG is unavailable or errors out. Leave empty to disable the fallback.",
},
"",
)
.field(
"braveBaseUrl",
"string",
{
displayName: "Brave Search Base URL",
hint: "The base URL for the Brave Search API.",
},
"https://api.search.brave.com",
)
.field(
"defaultResultCount",
"numeric",
{
displayName: "Default Result Count",
hint: "The default number of search results to return when not otherwise specified.",
min: 1,
max: 20,
int: true,
},
5,
)
.field(
"fetchChunkSize",
"numeric",
{
displayName: "Fetch Chunk Size",
hint: "The maximum number of characters of extracted page content returned per fetch_page call.",
min: 500,
max: 100_000,
int: true,
},
8000,
)
.field(
"fetchTimeoutMs",
"numeric",
{
displayName: "Fetch Timeout (ms)",
hint: "Timeout in milliseconds for search and page fetch requests.",
min: 1000,
max: 120_000,
int: true,
},
15000,
)
.build();
src / configSchematics.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"searxngBaseUrl",
"string",
{
displayName: "SearXNG Base URL",
hint: "The base URL for the local/self-hosted SearXNG instance. Used as the primary search provider.",
},
"http://192.168.66.2:8888",
)
.field(
"braveApiKey",
"string",
{
displayName: "Brave Search API Key",
hint: "API key for the Brave Search API. Used as a fallback when SearXNG is unavailable or errors out. Leave empty to disable the fallback.",
},
"",
)
.field(
"braveBaseUrl",
"string",
{
displayName: "Brave Search Base URL",
hint: "The base URL for the Brave Search API.",
},
"https://api.search.brave.com",
)
.field(
"defaultResultCount",
"numeric",
{
displayName: "Default Result Count",
hint: "The default number of search results to return when not otherwise specified.",
min: 1,
max: 20,
int: true,
},
5,
)
.field(
"fetchChunkSize",
"numeric",
{
displayName: "Fetch Chunk Size",
hint: "The maximum number of characters of extracted page content returned per fetch_page call.",
min: 500,
max: 100_000,
int: true,
},
8000,
)
.field(
"fetchTimeoutMs",
"numeric",
{
displayName: "Fetch Timeout (ms)",
hint: "Timeout in milliseconds for search and page fetch requests.",
min: 1000,
max: 120_000,
int: true,
},
15000,
)
.build();