ui: move js sandbox setting out of "developer" (#32054)
* ui: move js sandbox setting out of "developer" * make js sandbox enabled by default
This commit is contained in:
1 parent
dd00306bcf
commit
7bcbc04fbf
3 files changed
+5
-16
No files matched your search
@@ -33,7 +33,6 @@ export const SETTINGS_KEYS = {
|
||||
FREQUENCY_PENALTY: 'frequency_penalty',
|
||||
FULL_HEIGHT_CODE_BLOCKS: 'fullHeightCodeBlocks',
|
||||
GROUP_MODELS_BY_FAMILY: 'groupModelsByFamily',
|
||||
JS_SANDBOX_ENABLED: 'jsSandboxEnabled',
|
||||
LIVE_MARKDOWN_PREVIEW: 'liveMarkdownPreview',
|
||||
MAX_IMAGE_RESOLUTION: 'maxImageMPixels',
|
||||
MAX_TOKENS: 'max_tokens',
|
||||
|
||||
@@ -678,15 +678,7 @@ export const SETTINGS_REGISTRY: SettingsSectionEntry[] = [
|
||||
},
|
||||
{
|
||||
defaultValue: false,
|
||||
help: 'Expose a run_javascript tool to the model. Code runs in a Web Worker inside a sandboxed iframe with an opaque origin, isolated from the WebUI and its API, with a hard timeout.',
|
||||
key: SETTINGS_KEYS.JS_SANDBOX_ENABLED,
|
||||
label: 'JavaScript sandbox tool',
|
||||
type: SettingsFieldType.CHECKBOX
|
||||
},
|
||||
{
|
||||
defaultValue: false,
|
||||
dependsOn: SETTINGS_KEYS.JS_SANDBOX_ENABLED,
|
||||
help: 'Pre-load nerdamer in the sandbox for symbolic computation: simplify, diff, integrate, solve, and more. Requires "JavaScript sandbox tool" to be enabled.',
|
||||
help: 'Pre-load nerdamer in the run_javascript sandbox for symbolic computation: simplify, diff, integrate, solve, and more.',
|
||||
key: SETTINGS_KEYS.SYMBOLIC_MATH_ENABLED,
|
||||
label: 'Symbolic math (nerdamer)',
|
||||
type: SettingsFieldType.CHECKBOX
|
||||
|
||||
@@ -112,12 +112,10 @@ class ToolsStore {
|
||||
}
|
||||
|
||||
get browserTools(): OpenAIToolDefinition[] {
|
||||
const tools: OpenAIToolDefinition[] = [buildGetDatetimeToolDefinition()];
|
||||
|
||||
if (settingsStore.config.jsSandboxEnabled) {
|
||||
tools.push(buildSandboxToolDefinition(!!settingsStore.config.symbolicMathEnabled));
|
||||
}
|
||||
|
||||
const tools: OpenAIToolDefinition[] = [
|
||||
buildGetDatetimeToolDefinition(),
|
||||
buildSandboxToolDefinition(!!settingsStore.config.symbolicMathEnabled)
|
||||
];
|
||||
const readMedia = this.readMediaTool();
|
||||
|
||||
if (readMedia) tools.push(readMedia);
|
||||
|
||||
Reference in new issue
Block a user