solvers.imports

import_chat

Import chat history from exported data.

@solver
def import_chat(
    import_dir: str,
    input_folder: str = "chat",
    message_offset: int = 1,
) -> Solver
import_dir str

Directory containing the per-sample exports with a root config.yaml file

input_folder str

Name of the folder within import_dir containing a chat_history.json file

message_offset int

Number of initial messages to skip when injecting chat history (default: 1)

Returns

Solver that imports the chat history

import_sandbox_files

Import files into the sandbox.

@solver
def import_sandbox_files(
    import_dir: str,
    input_folder: str = "files",
    sandbox_path: str = "/workspace",
    setup_repo: bool = False,
) -> Solver
import_dir str

Directory containing the per-sample exports with a root config.yaml file

input_folder str

Name of the folder containing the files to import

sandbox_path str

Path to the sandbox workspace to import the files to (default: “/workspace”)

setup_repo bool

Whether to run the setup_repo solver after importing the files

Returns

Solver that imports the files into the sandbox

import_store

Import store data from a store_data.json or store_data.yaml file.

@solver
def import_store(
    import_dir: str,
    input_folder: str = "store",
    include_keys: Sequence[str] | None = None,
    exclude_keys: Sequence[str] | None = None,
) -> Solver
import_dir str

Directory containing the per-sample exports with a root config.yaml file

input_folder str

Name of the folder containing the store data to import

include_keys Sequence[str] | None

Sequence of store keys to include (if None, includes all available keys)

exclude_keys Sequence[str] | None

Sequence of store keys to exclude (default: None)

Returns

Solver that imports the store data