Skip to content

Class: CodeInterpreter

Sandboxed code interpreter (dspy.CodeInterpreter).

URI: dspy:CodeInterpreter

 classDiagram
    class CodeInterpreter
    click CodeInterpreter href "../CodeInterpreter/"
      Interpreter <|-- CodeInterpreter
        click Interpreter href "../Interpreter/"

      CodeInterpreter : description

      CodeInterpreter : enable_env_vars

      CodeInterpreter : enable_network_access

      CodeInterpreter : enable_read_paths

      CodeInterpreter : enable_write_paths

      CodeInterpreter : id

      CodeInterpreter : interpreter_kind

      CodeInterpreter : name

      CodeInterpreter : sync_files

Inheritance

Slots

Name Cardinality and Range Description Inheritance
interpreter_kind 1
String
Concrete code interpreter implementation (matches an InterpreterKind valu... Interpreter
enable_read_paths *
String
Interpreter
enable_write_paths *
String
Interpreter
enable_env_vars *
String
Interpreter
enable_network_access 0..1
Boolean
Interpreter
sync_files 0..1
Boolean
Interpreter
id 1
Identifier
Stable opaque identifier for an instance NamedThing
name 0..1
String
Short human-readable name NamedThing
description 0..1
String
Free-form description NamedThing

In Subsets

Identifier and Mapping Information

Annotations

property value
dspy_source_paths ['dspy/primitives/code_interpreter.py']
dspy_source_urls ['https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/code_interpreter.py']

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:CodeInterpreter
native dspy:CodeInterpreter
related uco_tool:AnalyticTool

LinkML Source

Direct

name: CodeInterpreter
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/primitives/code_interpreter.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/code_interpreter.py
description: Sandboxed code interpreter (``dspy.CodeInterpreter``).
in_subset:
- modules
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- uco_tool:AnalyticTool
is_a: Interpreter
slot_usage:
  interpreter_kind:
    name: interpreter_kind
    ifabsent: string(deno_sandbox)
    equals_string: deno_sandbox

Induced

name: CodeInterpreter
annotations:
  dspy_source_paths:
    tag: dspy_source_paths
    value:
    - dspy/primitives/code_interpreter.py
  dspy_source_urls:
    tag: dspy_source_urls
    value:
    - https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/code_interpreter.py
description: Sandboxed code interpreter (``dspy.CodeInterpreter``).
in_subset:
- modules
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- uco_tool:AnalyticTool
is_a: Interpreter
slot_usage:
  interpreter_kind:
    name: interpreter_kind
    ifabsent: string(deno_sandbox)
    equals_string: deno_sandbox
attributes:
  interpreter_kind:
    name: interpreter_kind
    description: Concrete code interpreter implementation (matches an ``InterpreterKind``
      value).
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: string(deno_sandbox)
    owner: CodeInterpreter
    domain_of:
    - ProgramOfThought
    - CodeAct
    - Interpreter
    range: string
    required: true
    equals_string: deno_sandbox
  enable_read_paths:
    name: enable_read_paths
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: CodeInterpreter
    domain_of:
    - Interpreter
    range: string
    multivalued: true
  enable_write_paths:
    name: enable_write_paths
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: CodeInterpreter
    domain_of:
    - Interpreter
    range: string
    multivalued: true
  enable_env_vars:
    name: enable_env_vars
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: CodeInterpreter
    domain_of:
    - Interpreter
    range: string
    multivalued: true
  enable_network_access:
    name: enable_network_access
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: boolean(False)
    owner: CodeInterpreter
    domain_of:
    - Interpreter
    range: boolean
  sync_files:
    name: sync_files
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    ifabsent: boolean(False)
    owner: CodeInterpreter
    domain_of:
    - Interpreter
    range: boolean
  id:
    name: id
    description: Stable opaque identifier for an instance.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: schema:identifier
    identifier: true
    owner: CodeInterpreter
    domain_of:
    - NamedThing
    range: Identifier
    required: true
  name:
    name: name
    description: Short human-readable name.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: rdfs:label
    owner: CodeInterpreter
    domain_of:
    - NamedThing
    - LMToolCallPart
    - LMMessage
    - LMToolSpec
    range: string
  description:
    name: description
    description: Free-form description.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    slot_uri: dct:description
    owner: CodeInterpreter
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string