Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Nardien/agent-distillation
/ functions
Functions
494 in github.com/Nardien/agent-distillation
⨍
Functions
494
◇
Types & classes
93
↳
Endpoints
1
↓ 1 callers
Method
forward
(self, *args, **kwargs)
src/smolagents/tools.py:172
↓ 1 callers
Method
forward
Sends the inputs through the `model`.
src/smolagents/tools.py:1059
↓ 1 callers
Method
from_folder
Loads an agent from a local folder. Args: folder (`str` or `Path`): The folder where the agent is saved. **kwargs: Ad
src/smolagents/agents.py:979
↓ 1 callers
Method
from_space
Creates a [`Tool`] from a Space given its id on the Hub. Args: space_id (`str`): The id of the Space on
src/smolagents/tools.py:472
↓ 1 callers
Function
get_answered_questions
Get set of questions that have already been answered Args: file_path: Path to results file Returns: Set of alre
exps_research/unified_framework/utils.py:70
↓ 1 callers
Function
get_current_value
(target: ast.AST)
src/smolagents/local_python_executor.py:613
↓ 1 callers
Function
get_experiment_processor
Factory function to get the appropriate experiment processor class Args: experiment_type: Type of experiment ("reasoning" or "ag
exps_research/unified_framework/processors/factory.py:12
↓ 1 callers
Function
get_imports
Extracts all the libraries (not relative imports) that are imported in a code. Args: code (`str`): Code text to inspect. Return
src/smolagents/_function_type_hints_utils.py:44
↓ 1 callers
Function
get_json_schema
This function generates a JSON schema for a given function, based on its docstring and type hints. This is mostly used for passing lists of t
src/smolagents/_function_type_hints_utils.py:82
↓ 1 callers
Method
get_most_common_output_code
(self, pairs)
src/smolagents/agents.py:1461
↓ 1 callers
Function
get_retriever
(config)
search/retriever_server.py:282
↓ 1 callers
Function
get_tools_definition_code
(tools: Dict[str, Tool])
src/smolagents/tools.py:1097
↓ 1 callers
Function
get_user_input
()
examples/quick_start.py:32
↓ 1 callers
Function
initialize_agent
Initialize the CodeAgent with the specified model.
src/smolagents/vision_web_browser.py:114
↓ 1 callers
Function
initialize_driver
Initialize the Selenium WebDriver.
src/smolagents/vision_web_browser.py:104
↓ 1 callers
Function
inner_evaluate
(generators: List[ast.comprehension], index: int, current_state: Dict[str, Any])
src/smolagents/local_python_executor.py:1018
↓ 1 callers
Function
is_same_method
Compare two methods by their source code.
src/smolagents/utils.py:271
↓ 1 callers
Function
is_static_int
(node)
src/smolagents/local_python_executor.py:202
↓ 1 callers
Function
is_valid_name
(name: str)
src/smolagents/utils.py:456
↓ 1 callers
Method
launch
(self, share: bool = True, **kwargs)
src/smolagents/gradio_ui.py:264
↓ 1 callers
Function
load_api_key
Load API key from file
exps_research/unified_framework/models.py:11
↓ 1 callers
Function
load_api_key
Load OpenAI API key from file
exps_research/unified_framework/score_answers.py:24
↓ 1 callers
Function
load_model
(model_path: str, use_fp16: bool = False)
search/retriever_server.py:47
↓ 1 callers
Function
load_prompt
Load the system prompt from YAML file
exps_research/train_utils/preprocess.py:56
↓ 1 callers
Function
load_prompt
Load system prompt from YAML file Args: prompt_name: Name of the prompt file (without extension) Returns: Syste
exps_research/unified_framework/experiment.py:22
↓ 1 callers
Method
log_code
(self, title: str, content: str, level: int = LogLevel.INFO)
src/smolagents/monitoring.py:128
↓ 1 callers
Function
main
()
serve_vllm.py:6
↓ 1 callers
Function
main
( prompt: str, tools: list[str], model_type: str, model_id: str, api_base: str | None = No
src/smolagents/cli.py:106
↓ 1 callers
Function
main
(prompt: str, model_type: str, model_id: str)
src/smolagents/vision_web_browser.py:190
↓ 1 callers
Function
main
()
examples/quick_start.py:58
↓ 1 callers
Function
main
(args)
exps_research/build_prefix_memory.py:19
↓ 1 callers
Function
main
(args)
exps_research/finetune_sft.py:104
↓ 1 callers
Function
main
(args)
exps_research/first_thought_prefix/build_prefix_memory.py:19
↓ 1 callers
Function
main
(args)
exps_research/unified_framework/filter_reasoning_training_data.py:6
↓ 1 callers
Function
main
(args)
exps_research/unified_framework/filter_agent_training_data.py:106
↓ 1 callers
Function
make_image_url
(base64_image)
src/smolagents/utils.py:445
↓ 1 callers
Function
make_serializable
Convert non-serializable types to serializable formats.
exps_research/unified_framework/utils.py:106
↓ 1 callers
Method
make_stopping_criteria
(self, stop_sequences: List[str], tokenizer)
src/smolagents/models.py:752
↓ 1 callers
Function
open_jsonl
(datapath)
exps_research/build_prefix_memory.py:10
↓ 1 callers
Function
open_jsonl
(datapath)
exps_research/first_thought_prefix/build_prefix_memory.py:10
↓ 1 callers
Function
parse_arguments
()
src/smolagents/cli.py:29
↓ 1 callers
Function
parse_arguments
()
src/smolagents/vision_web_browser.py:27
↓ 1 callers
Function
parse_json_blob
Extracts the JSON blob from the input and returns the JSON data and the rest of the input.
src/smolagents/utils.py:153
↓ 1 callers
Function
pooling
( pooler_output, last_hidden_state, attention_mask = None, pooling_method = "mean" )
search/retriever_server.py:57
↓ 1 callers
Function
prepare_output_path
Prepare output path for experiment results Args: dataset_file: Path to dataset file model_id: Model ID log_folde
exps_research/unified_framework/utils.py:140
↓ 1 callers
Function
preprocess_cot_dataset
(datapath)
exps_research/train_utils/preprocess.py:130
↓ 1 callers
Function
preprocess_logs
(log_path)
exps_research/train_utils/preprocess.py:175
↓ 1 callers
Function
print_pretty_messages
(messages)
exps_research/train_utils/preprocess.py:36
↓ 1 callers
Method
process_dataset
Process a dataset of entries Args: entries: List of dataset entries output_file: Path to output file
exps_research/unified_framework/processors/base.py:167
↓ 1 callers
Function
process_entry
Process a single entry with its own model instance
exps_research/unified_framework/score_answers.py:135
↓ 1 callers
Function
process_qa_experiment
Process a QA experiment using the appropriate processor Args: dataset_file: Path to dataset file model_kwargs: Model con
exps_research/unified_framework/experiment.py:38
↓ 1 callers
Method
provide_final_answer
Provide the final answer to the task, based on the logs of the agent's interactions. Args: task (`str`): Task to perform
src/smolagents/agents.py:554
↓ 1 callers
Function
pull_messages_from_step
Extract ChatMessage objects from agent steps with proper nesting
src/smolagents/gradio_ui.py:40
↓ 1 callers
Method
register_prefix
Register the prefix of thought, which will be used only in the first step.
src/smolagents/agents.py:1455
↓ 1 callers
Function
remove_reference_tags
(text)
exps_research/train_utils/preprocess.py:76
↓ 1 callers
Function
remove_stop_sequences
(content: str, stop_sequences: List[str])
src/smolagents/models.py:168
↓ 1 callers
Function
remove_think_tags
(text)
src/smolagents/models.py:249
↓ 1 callers
Function
remove_think_tokens
(messages: List[Dict[str, str]])
src/smolagents/models.py:253
↓ 1 callers
Method
reset
Reset cost tracker state Args: cost_threshold: Maximum cost allowed before stopping (in USD)
exps_research/unified_framework/processors/cost_tracker.py:29
↓ 1 callers
Function
robust_serialize
Attempt to serialize an object to JSON. If it fails, convert to string.
exps_research/unified_framework/utils.py:94
↓ 1 callers
Function
run_agent_experiment
Compatibility wrapper for agent experiments
exps_research/unified_framework/run_agent.py:15
↓ 1 callers
Function
run_reasoning_experiment
Compatibility wrapper for reasoning experiments
exps_research/unified_framework/run_reasoning.py:15
↓ 1 callers
Method
save
Saves the relevant code files for your agent. This will copy the code of your agent in `output_dir` as well as autogenerate: - a `to
src/smolagents/agents.py:764
↓ 1 callers
Method
save_memory_to_logs
Save the agent's memory to a log file in the logs directory. Args: task (`str`): The task that was executed, used for the log fil
src/smolagents/agents.py:639
↓ 1 callers
Method
send_tools
(self, tools: Dict[str, Tool])
src/smolagents/remote_executors.py:55
↓ 1 callers
Method
send_variables
Send variables to the kernel namespace using pickle.
src/smolagents/remote_executors.py:70
↓ 1 callers
Method
setup
Instantiates the `pre_processor`, `model` and `post_processor` if necessary.
src/smolagents/tools.py:1017
↓ 1 callers
Function
setup_agent
()
examples/quick_start.py:37
↓ 1 callers
Function
setup_savedir
(args)
exps_research/finetune_sft.py:50
↓ 1 callers
Function
setup_scoring_model
Initialize the OpenAI model for scoring
exps_research/unified_framework/score_answers.py:29
↓ 1 callers
Method
step
To be implemented in children classes. Should return either None if the step is not final.
src/smolagents/agents.py:606
↓ 1 callers
Method
step
Perform one step in the ReAct framework: the agent thinks, acts, and observes the result. Returns None if the step is not final.
src/smolagents/agents.py:1476
↓ 1 callers
Function
str_to_pmatrix
(input_str)
exps_research/unified_framework/math_utils/qwen_math_parser.py:621
↓ 1 callers
Function
str_to_pmatrix
(input_str)
exps_research/unified_framework/math_utils/qwen_math_grader.py:60
↓ 1 callers
Function
str_to_pmatrix
(input_str)
exps_research/unified_framework/processors/qwen_math_parser.py:621
↓ 1 callers
Function
stream_to_gradio
Runs an agent with the given task and streams the messages from the agent as gradio ChatMessages.
src/smolagents/gradio_ui.py:160
↓ 1 callers
Function
strip_string
(string, skip_unit=False)
exps_research/unified_framework/processors/qwen_math_parser.py:238
↓ 1 callers
Method
to_dict
Convert the agent to a dictionary representation. Returns: `dict`: Dictionary representation of the agent.
src/smolagents/agents.py:882
↓ 1 callers
Method
to_raw
Returns the "raw" version of that object. In the case of an AgentImage, it is a PIL.Image.Image.
src/smolagents/agent_types.py:118
↓ 1 callers
Method
to_string
Returns the stringified version of that object. In the case of an AgentImage, it is a path to the serialized version of the image.
src/smolagents/agent_types.py:135
↓ 1 callers
Method
to_string
Returns the stringified version of that object. In the case of an AgentAudio, it is a path to the serialized version of the audio.
src/smolagents/agent_types.py:236
↓ 1 callers
Function
validate_after_init
(cls)
src/smolagents/tools.py:54
↓ 1 callers
Method
validate_arguments
(self)
src/smolagents/tools.py:116
↓ 1 callers
Method
visualize_agent_tree
(self, agent)
src/smolagents/monitoring.py:177
Method
__call__
Adds additional prompting for the managed agent, runs it, and wraps the output. This method is called only by a managed agent.
src/smolagents/agents.py:619
Method
__call__
(self, code_action: str)
src/smolagents/local_python_executor.py:1627
Method
__call__
Process the input messages and return the model's response. Parameters: messages (`List[Dict[str, str]]`): A list
src/smolagents/models.py:336
Method
__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:478
Method
__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:606
Method
__call__
(self, input_ids, scores, **kwargs)
src/smolagents/models.py:764
Method
__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:773
Method
__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:921
Method
__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:1022
Method
__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:1102
Method
__call__
( self, messages: List[Dict[str, str]], stop_sequences: Optional[List[str]] = None,
src/smolagents/models.py:1241
Method
__call__
Check if code is a final answer and run it accordingly
src/smolagents/remote_executors.py:82
Method
__call__
(self, *args, sanitize_inputs_outputs: bool = False, **kwargs)
src/smolagents/tools.py:175
Method
__call__
(self, *args, sanitize_inputs_outputs: bool = False, **kwargs)
src/smolagents/tools.py:1074
Method
__iadd__
Implements the += operator
src/smolagents/local_python_executor.py:140
Method
__init__
(self, model_name, model_path, pooling_method, max_length, use_fp16)
search/retriever_server.py:74
← previous
next →
201–300 of 494, ranked by callers