Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/23japhone/HALO
/ functions
Functions
79 in github.com/23japhone/HALO
⨍
Functions
79
◇
Types & classes
12
↓ 31 callers
Function
add_response
(role: str, prompt: str, chat_history: list, image: list
utils/api.py:23
↓ 28 callers
Function
write_json
(file_path: str, input_data: dict | list, json_type: str = "dict")
utils/basic_operation.py:32
↓ 22 callers
Function
read_json
(file_path: str)
utils/basic_operation.py:25
↓ 14 callers
Function
inference_chat
(chat_history: list, model: str, endpoints: str, a
utils/api.py:77
↓ 13 callers
Function
extract_json_format_string
(text: str)
utils/basic_operation.py:144
↓ 10 callers
Method
forword
(self, user_init_query: str, match_signal: Optional[str] = None,
utils/agents.py:919
↓ 10 callers
Function
setup_logger
(log_path: str, log_name: str = 'my_logger')
utils/basic_operation.py:186
↓ 3 callers
Function
_strip_string
(string: str)
utils/basic_operation.py:445
↓ 3 callers
Function
extract_MATH_json_files
(file_dir: str, csv_filename: str = "math_dataset_summary.csv")
utils/basic_operation.py:613
↓ 3 callers
Function
get_MATH_prompt
Args: line: one row of dataframe, containing columns "problem" and "solution" Returns: prompt: the question string tr
utils/basic_operation.py:594
↓ 3 callers
Function
get_MATH_question_type
Args: total_count: total number of samples for the overall test set (because rounding might be slightly less)
utils/basic_operation.py:558
↓ 3 callers
Function
get_MMLU_qa
Return true label and prompt of MMMLU each line
utils/basic_operation.py:357
↓ 3 callers
Function
get_human_eval_qa
()
utils/basic_operation.py:233
↓ 3 callers
Function
get_subjects
Randomly return ratio of the subjects(57 in total) and corresponding prompt words used for testing and dev prompts
utils/basic_operation.py:268
↓ 2 callers
Method
__str__
(self)
utils/basic_operation.py:68
↓ 2 callers
Method
add_path_agent_response
(self, current_agent: ExecSubtaskAgent, path:
utils/agents.py:604
↓ 2 callers
Method
eval_ans_score
(self, model: str, endpoints: str, api_ke
utils/agents.py:526
↓ 2 callers
Function
find_math_answer
(solution_string: str)
utils/basic_operation.py:515
↓ 2 callers
Method
judge_ans
(self, model: str, endpoints: str, api_key: str,
utils/agents.py:535
↓ 2 callers
Method
optimize_prompt
(self, demand_type: str, info: list[str],
utils/agents.py:775
↓ 2 callers
Method
parse_answer
(self, model: str, endpoints: str, api_key: str
utils/agents.py:227
↓ 2 callers
Method
search
(self, untried_actions: list, task_type: str, core_intent: str,
utils/agents.py:719
↓ 2 callers
Method
set_parent
(self, agent: 'ExecSubtaskAgent')
utils/agents.py:551
↓ 2 callers
Method
solve_task
(self, model: str, endpoints: str, api_key: str,
utils/agents.py:563
↓ 2 callers
Method
ucb1
(self, exploration_weight: float = 1.4)
utils/agents.py:544
↓ 1 callers
Method
__init__
(self, key: str, cause: Optional[str] = None)
utils/basic_operation.py:61
↓ 1 callers
Function
_fix_a_slash_b
(string: str)
utils/basic_operation.py:396
↓ 1 callers
Function
_fix_fracs
(string: str)
utils/basic_operation.py:411
↓ 1 callers
Function
_fix_sqrt
(string: str)
utils/basic_operation.py:381
↓ 1 callers
Function
_remove_right_units
(string: str)
utils/basic_operation.py:371
↓ 1 callers
Method
add_other_agent_response
(self, agent_role: str, agent_response: str)
utils/agents.py:555
↓ 1 callers
Method
backpropagate
(self, path: list[tuple[int, ExecSubtaskAgent]], success: bool,
utils/agents.py:699
↓ 1 callers
Function
encode_image
(image_path: str)
utils/basic_operation.py:53
↓ 1 callers
Method
eval_score
(self, model: str, endpoints: str, api_key: str,
utils/agents.py:420
↓ 1 callers
Method
expand
(self, path: list[tuple[int, ExecSubtaskAgent]], leaf: ExecSubtaskAgent,
utils/agents.py:623
↓ 1 callers
Function
extract_function_body
(code: str, function_name: str)
utils/basic_operation.py:250
↓ 1 callers
Function
extract_python_code_block
(text: str)
utils/basic_operation.py:242
↓ 1 callers
Function
fix_common_json_issues
(json_str: str)
utils/basic_operation.py:121
↓ 1 callers
Function
format_example
format the subject example from a df into prompt, which conclude question, choices and correct choices
utils/basic_operation.py:304
↓ 1 callers
Function
format_subject
format the subject strings
utils/basic_operation.py:290
↓ 1 callers
Function
gen_prompt
generate the prompt for few-shot learning
utils/basic_operation.py:327
↓ 1 callers
Method
generate_agent_for_subtask
(self, task_type: str, core_intent: str,
utils/agents.py:799
↓ 1 callers
Method
generate_prompt
(self, model: str, endpoints: str, api
utils/agents.py:58
↓ 1 callers
Method
generate_role
(self, model: str, endpoints: str, api_key:
utils/agents.py:373
↓ 1 callers
Method
generate_subtask
(self, model: str, endpoints: str,
utils/agents.py:315
↓ 1 callers
Method
implement
(self, task_type: str, core_intent: str, key_details:
utils/agents.py:858
↓ 1 callers
Method
judge
(self, model: str, endpoints: str, api_key: str, consu
utils/agents.py:468
↓ 1 callers
Function
main
()
run.py:21
↓ 1 callers
Function
main
()
experiment/MATH/run.py:31
↓ 1 callers
Function
main
()
experiment/ablation_study/run_humaneval_w_o_prompt.py:27
↓ 1 callers
Function
main
()
experiment/ablation_study/run_humaneval_w_o_task.py:27
↓ 1 callers
Function
main
()
experiment/ablation_study/run_math_w_o_prompt.py:31
↓ 1 callers
Function
main
()
experiment/ablation_study/run_mmlu_w_o_task.py:29
↓ 1 callers
Function
main
()
experiment/ablation_study/run_math_w_o_task.py:31
↓ 1 callers
Function
main
()
experiment/ablation_study/run_mmlu_w_o_prompt.py:29
↓ 1 callers
Function
main
()
experiment/MMLU/run.py:29
↓ 1 callers
Function
main
()
experiment/human_eval/run.py:27
↓ 1 callers
Function
most_frequent
(agent_ans_list: list, cmp_func: Callable)
utils/basic_operation.py:210
↓ 1 callers
Method
parse_answer
(self, text: str, match_signal: Optional[str] = None)
utils/agents.py:809
↓ 1 callers
Function
read_MMLU_line
(line: pd.DataFrame)
utils/basic_operation.py:343
↓ 1 callers
Method
select
(self, root: ExecSubtaskAgent)
utils/agents.py:612
↓ 1 callers
Method
set_root_agent
(self, agent_role: str, untried_actions: list)
utils/agents.py:599
↓ 1 callers
Method
simulate
(self, leaf: ExecSubtaskAgent, current_depth: int, path: l
utils/agents.py:648
↓ 1 callers
Method
task_decompose
(self, task_type: str, core_intent: str,
utils/agents.py:789
↓ 1 callers
Function
track_usage
(res_json: dict)
utils/basic_operation.py:92
Method
__init__
(self, key: str, cause: Optional[str] = None)
utils/basic_operation.py:78
Method
__init__
(self, logger: logging.Logger, demand_type: str, info: list
utils/agents.py:48
Method
__init__
(self, logger: logging.Logger, answer: str)
utils/agents.py:221
Method
__init__
(self, logger: logging.Logger, answer: str)
utils/agents.py:264
Method
__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:301
Method
__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:359
Method
__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:400
Method
__init__
(self, logger: logging.Logger, task_type: str, core_intent:
utils/agents.py:449
Method
__init__
(self, logger: logging.Logger, agent_role: str, untried_act
utils/agents.py:495
Method
__init__
(self, logger: logging.Logger, model: str, endpoints: str,
utils/agents.py:585
Method
__init__
(self, logger: logging.Logger, model: str, endpoints: str,
utils/agents.py:750
Method
__str__
(self)
utils/basic_operation.py:85
Function
is_equiv
(str1: str, str2: str, verbose: bool = False)
utils/basic_operation.py:539
Method
parse_answer
(self, model: str, endpoints: str, api_key: str
utils/agents.py:270