SYMBOL INDEX (1125 symbols across 206 files) FILE: benchmark/code_interpreter/code_interpreter.py function fix_matplotlib_cjk_font_issue (line 36) | def fix_matplotlib_cjk_font_issue(): function start_kernel (line 44) | def start_kernel(pid): function escape_ansi (line 91) | def escape_ansi(line): function publish_image_to_local (line 96) | def publish_image_to_local(image_base64: str): function code_interpreter (line 140) | def code_interpreter(action_input_list: list, timeout=30, clear=False): function _code_interpreter (line 157) | def _code_interpreter(code: str, timeout, clear=False): function get_multiline_input (line 226) | def get_multiline_input(hint): FILE: benchmark/code_interpreter/config.py function get_react_prompt (line 49) | def get_react_prompt(model_name, query, lang, upload_fname_list): function get_react_parser (line 54) | def get_react_parser(model_name): function get_model (line 59) | def get_model(model_name): FILE: benchmark/code_interpreter/inference_and_execute.py function llm_with_plugin (line 43) | def llm_with_plugin(args, query, item=None, exec_limit=3): function text_completion (line 86) | def text_completion(llm, input_text, stop_words=[]): function call_tool (line 98) | def call_tool(plugin_name, plugin_args_list, clear=False): function process_code_interpreter (line 106) | def process_code_interpreter(item, writer): function process_gsm8k (line 116) | def process_gsm8k(doc, writer): function sequential_processing (line 127) | def sequential_processing(args, data_list, process_func, writer): function gather_eval_result (line 135) | def gather_eval_result(model_name): function eval_metrics (line 148) | def eval_metrics(args, test_set, full_output_fname): function main (line 166) | def main(args): function parse_args (line 206) | def parse_args(): FILE: benchmark/code_interpreter/metrics/code_execution.py function exec_limit_time (line 49) | def exec_limit_time(text): function exec_code (line 53) | def exec_code(text, timelimit=False): function postprocess_code (line 60) | def postprocess_code(gen_code, line): function get_action_input_code (line 81) | def get_action_input_code(text, model_name='qwen-14b-chat', extract_firs... function eval_code_execution_rate (line 100) | def eval_code_execution_rate(output_fname, function log_result (line 184) | def log_result(data_list, verbose=True): FILE: benchmark/code_interpreter/metrics/gsm8k.py function extract_answer (line 11) | def extract_answer(completion): function is_correct (line 32) | def is_correct(completion, answer): function eval_gsm8k_acc (line 38) | def eval_gsm8k_acc(output_fname): FILE: benchmark/code_interpreter/metrics/visualization.py function encode_image (line 26) | def encode_image(image_path): function judger_model_inference (line 32) | def judger_model_inference(judger_model_name, judger_model, imgs=[], pro... function extract_images (line 73) | def extract_images(text): function check_images_observation (line 84) | def check_images_observation(text, images, model_name): function eval_visualization_acc (line 107) | def eval_visualization_acc(output_fname, model_name, judger_model_name='... FILE: benchmark/code_interpreter/models/base.py class HFModel (line 5) | class HFModel(object): method __init__ (line 7) | def __init__(self, model_path): FILE: benchmark/code_interpreter/models/dashscope.py class QwenDashscopeVLModel (line 9) | class QwenDashscopeVLModel(object): method __init__ (line 11) | def __init__(self, model, api_key): method generate (line 16) | def generate(self, prompt, stop_words=[]): FILE: benchmark/code_interpreter/models/llm.py class LLM (line 5) | class LLM(HFModel): method __init__ (line 7) | def __init__(self, model_path): method generate (line 10) | def generate(self, input_text, stop_words=[], max_new_tokens=512): FILE: benchmark/code_interpreter/models/qwen.py class Qwen (line 5) | class Qwen(HFModel): method __init__ (line 7) | def __init__(self, model_path): method generate (line 10) | def generate(self, input_text, stop_words=[]): class QwenVL (line 26) | class QwenVL(HFModel): method __init__ (line 28) | def __init__(self, model_path): method generate (line 31) | def generate(self, inputs: list): FILE: benchmark/code_interpreter/parser/internlm_parser.py class InternLMReActParser (line 4) | class InternLMReActParser(ReActParser): method __init__ (line 6) | def __init__(self): FILE: benchmark/code_interpreter/parser/react_parser.py class ReActParser (line 1) | class ReActParser(object): method __init__ (line 3) | def __init__(self): method parse_latest_plugin_call (line 10) | def parse_latest_plugin_call(self, text): method _extract_first_target (line 29) | def _extract_first_target(self, text, start_flag, end_flag): method get_first_observation (line 40) | def get_first_observation(self, text): method get_first_action_input (line 43) | def get_first_action_input(self, text): FILE: benchmark/code_interpreter/prompt/internlm_react.py class InternLMReAct (line 66) | class InternLMReAct(ReAct): method __init__ (line 68) | def __init__(self, query, lang='en', upload_file_paths=[]): method build_prompt (line 72) | def build_prompt(self): method _build_tools_text (line 88) | def _build_tools_text(self): method _build_tools_name_text (line 91) | def _build_tools_name_text(self): method build_observation (line 94) | def build_observation(self, observation): method get_stop_words_list (line 97) | def get_stop_words_list(self): FILE: benchmark/code_interpreter/prompt/llama_react.py class LlamaReAct (line 4) | class LlamaReAct(ReAct): method __init__ (line 6) | def __init__(self, query, lang='en', upload_file_paths=[]): method build_prompt (line 9) | def build_prompt(self): FILE: benchmark/code_interpreter/prompt/qwen_react.py class QwenReAct (line 23) | class QwenReAct(ReAct): method __init__ (line 25) | def __init__(self, query, lang='en', upload_file_paths=[]): method build_prompt (line 36) | def build_prompt(self): method _build_tools_text (line 53) | def _build_tools_text(self): method _build_tools_name_text (line 73) | def _build_tools_name_text(self): FILE: benchmark/code_interpreter/prompt/react.py class ReAct (line 42) | class ReAct(object): method __init__ (line 44) | def __init__(self, query, lang='en', upload_file_paths=[]): method build_prompt (line 53) | def build_prompt(self): method _format_upload_fname (line 64) | def _format_upload_fname(self): method _build_tools_text (line 73) | def _build_tools_text(self): method _build_tools_name_text (line 76) | def _build_tools_name_text(self): method build_observation (line 79) | def build_observation(self, observation): method get_stop_words_list (line 82) | def get_stop_words_list(self): FILE: benchmark/code_interpreter/utils/code_utils.py function replace_upload_fname (line 7) | def replace_upload_fname(text, upload_fname_list): function extract_code (line 14) | def extract_code(text): FILE: benchmark/code_interpreter/utils/data_utils.py function load_jsonl (line 7) | def load_jsonl(path): function save_jsonl (line 20) | def save_jsonl(data, path, progress=False, enabled=True): FILE: benchmark/deepplanning/aggregate_results.py function load_shopping_statistics (line 14) | def load_shopping_statistics(domain_dir: Path, model_name: str) -> Optio... function load_travel_statistics (line 53) | def load_travel_statistics(domain_dir: Path, model_name: str, output_dir... function aggregate_model_results (line 133) | def aggregate_model_results(model_name: str, project_root: Path, travel_... function main (line 263) | def main(): FILE: benchmark/deepplanning/shoppingplanning/agent/call_llm.py function load_model_config (line 14) | def load_model_config(model_name: str) -> Dict[str, Any]: function create_client (line 64) | def create_client(model_name: str, model_config: Optional[Dict[str, Any]... function call_llm (line 94) | def call_llm( FILE: benchmark/deepplanning/shoppingplanning/agent/prompts.py class PromptLib (line 124) | class PromptLib: FILE: benchmark/deepplanning/shoppingplanning/agent/shopping_agent.py class ShoppingFnAgent (line 27) | class ShoppingFnAgent: method __init__ (line 35) | def __init__(self, method _build_tool_config (line 75) | def _build_tool_config(self) -> Dict[str, Any]: method _load_tool_instances (line 92) | def _load_tool_instances(self) -> Dict[str, Any]: method _load_env_from_dotenv (line 148) | def _load_env_from_dotenv(self) -> None: method _load_tool_schemas (line 183) | def _load_tool_schemas(self) -> List[Dict[str, Any]]: method _build_openai_tools (line 188) | def _build_openai_tools(self, schemas: List[Dict[str, Any]]) -> List[D... method _exec_tool (line 200) | def _exec_tool(self, name: str, arguments_json: str) -> str: method _call_llm (line 211) | def _call_llm(self, messages: List[Dict[str, Any]], tools: Optional[Li... method _detect_tool_calls (line 219) | def _detect_tool_calls(self, assistant_message) -> List[Dict[str, Any]]: method _add_to_cart (line 243) | def _add_to_cart(self, history_messages: List[Any]) -> List[Any]: method run (line 256) | def run(self, user_query: str, system_prompt: str | None = None, max_l... method _save_messages (line 374) | def _save_messages(self, messages: List[Any], filepath: Path, step: in... function run_agent_inference (line 388) | def run_agent_inference( FILE: benchmark/deepplanning/shoppingplanning/evaluation/evaluation_pipeline.py function load_validation_cases (line 11) | def load_validation_cases(json_path: Path) -> Dict[str, Any]: function load_cart (line 27) | def load_cart(cart_path: Path) -> Dict[str, Any]: function check_case_completion (line 40) | def check_case_completion(messages_path: Path) -> bool: function evaluate_single_case (line 85) | def evaluate_single_case(case_dir: Path) -> Dict[str, Any]: function generate_case_report (line 243) | def generate_case_report(evaluation_result: Dict[str, Any], output_dir: ... function generate_summary_report (line 279) | def generate_summary_report(all_results: List[Dict[str, Any]], output_di... function main (line 365) | def main(): FILE: benchmark/deepplanning/shoppingplanning/evaluation/score_statistics.py function parse_folder_name (line 18) | def parse_folder_name(folder_name: str) -> Optional[tuple]: function read_summary_report (line 35) | def read_summary_report(report_path: Path) -> Optional[Dict[str, Any]]: function calculate_model_statistics (line 64) | def calculate_model_statistics(model_name: str, result_report_dir: Path)... function main (line 203) | def main(): FILE: benchmark/deepplanning/shoppingplanning/run.py function parse_args (line 19) | def parse_args(): function setup_paths (line 51) | def setup_paths(args): function print_config (line 82) | def print_config(args): function run_step_inference (line 96) | def run_step_inference(args): function main (line 142) | def main(): FILE: benchmark/deepplanning/shoppingplanning/tools/add_coupon_to_cart.py class AddCouponToCartTool (line 21) | class AddCouponToCartTool(BaseShoppingTool): method __init__ (line 26) | def __init__(self, cfg: Dict = None): method _load_cart (line 46) | def _load_cart(self, path: Path): method _load_user (line 80) | def _load_user(self, path: Path): method _save_cart (line 97) | def _save_cart(self): method _parse_coupon (line 102) | def _parse_coupon(self, coupon_name: str) -> Tuple[float, float]: method _calculate_base_total (line 122) | def _calculate_base_total(self) -> float: method _calculate_max_coupon_usage (line 132) | def _calculate_max_coupon_usage(self, coupon_name: str, base_total: fl... method _calculate_total_discount (line 146) | def _calculate_total_discount(self, used_coupons: List[Dict]) -> float: method _validate_coupon_combination (line 157) | def _validate_coupon_combination(self, base_total: float, used_coupons... method _update_summary (line 188) | def _update_summary(self): method call (line 203) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/add_product_to_cart.py class AddProductToCartTool (line 7) | class AddProductToCartTool(BaseShoppingTool): method __init__ (line 12) | def __init__(self, cfg: Dict = None): method _load_cart (line 32) | def _load_cart(self, path: Path): method _load_products (line 63) | def _load_products(self, path: Path): method _save_cart (line 74) | def _save_cart(self): method _update_summary (line 79) | def _update_summary(self): method call (line 91) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/base_shopping_tool.py function load_tool_schemas (line 19) | def load_tool_schemas(schema_file: str = 'shopping_tool_schema.json') ->... function get_tool_schema (line 53) | def get_tool_schema(tool_name: str, schemas: Optional[Dict[str, dict]] =... function get_cached_tool_schemas (line 79) | def get_cached_tool_schemas() -> Dict[str, dict]: function register_tool (line 92) | def register_tool(name: str, allow_overwrite: bool = False): class BaseShoppingTool (line 145) | class BaseShoppingTool(ABC): method __init__ (line 174) | def __init__(self, cfg: Optional[Dict] = None): method _load_schema_from_json (line 212) | def _load_schema_from_json(self): method _is_valid_schema (line 237) | def _is_valid_schema(schema: dict) -> bool: method call (line 252) | def call(self, params: Union[str, dict], **kwargs) -> str: method _verify_json_format_args (line 270) | def _verify_json_format_args(self, params: Union[str, dict], strict_js... method load_json_database (line 306) | def load_json_database(self, path: str) -> dict: method load_csv_database (line 325) | def load_csv_database(self, path: str): method format_result_as_json (line 372) | def format_result_as_json(self, result: Union[dict, list]) -> str: method openai_schema (line 387) | def openai_schema(self) -> Dict: method function (line 404) | def function(self) -> Dict: method get_schema (line 417) | def get_schema(self, format: str = "openai") -> Dict: method get_openai_schema_from_class (line 444) | def get_openai_schema_from_class(cls) -> Dict: FILE: benchmark/deepplanning/shoppingplanning/tools/calculate_transport_time_tool.py class CalculateTransportTimeTool (line 88) | class CalculateTransportTimeTool(BaseShoppingTool): method __init__ (line 96) | def __init__(self, cfg: Dict = None): method _load_database (line 114) | def _load_database(self, path: str): method _normalize_province (line 126) | def _normalize_province(self, address_str: str) -> str: method call (line 143) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/delete_coupon_from_cart.py class DeleteCouponFromCartTool (line 23) | class DeleteCouponFromCartTool(BaseShoppingTool): method __init__ (line 27) | def __init__(self, cfg: Dict = None): method _load_cart (line 41) | def _load_cart(self, path: Path): method _save_cart (line 74) | def _save_cart(self): method _parse_coupon (line 79) | def _parse_coupon(self, coupon_name: str): method _calculate_base_total (line 96) | def _calculate_base_total(self) -> float: method _calculate_total_discount (line 107) | def _calculate_total_discount(self, used_coupons: List[Dict]) -> float: method _update_summary (line 131) | def _update_summary(self): method _cleanup_zero_quantity_coupons (line 144) | def _cleanup_zero_quantity_coupons(self): method call (line 163) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/delete_product_from_cart.py class DeleteProductFromCartTool (line 7) | class DeleteProductFromCartTool(BaseShoppingTool): method __init__ (line 12) | def __init__(self, cfg: Dict = None): method _load_cart (line 31) | def _load_cart(self, path: Path): method _load_products (line 61) | def _load_products(self, path: Path): method _save_cart (line 72) | def _save_cart(self): method _update_summary (line 77) | def _update_summary(self): method _cleanup_zero_quantity_items (line 89) | def _cleanup_zero_quantity_items(self): method call (line 94) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/filter_by_applicable_coupons_tool.py class FilterByApplicableCouponsTool (line 22) | class FilterByApplicableCouponsTool(BaseShoppingTool): method __init__ (line 29) | def __init__(self, cfg: Dict = None): method _load_database (line 45) | def _load_database(self, path: str): method call (line 59) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/filter_by_brand_tool.py class FilterByBrandTool (line 12) | class FilterByBrandTool(BaseShoppingTool): method __init__ (line 20) | def __init__(self, cfg: Dict = None): method _load_database (line 40) | def _load_database(self, path: str): method call (line 54) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/filter_by_color_tool.py class FilterByColorTool (line 8) | class FilterByColorTool(BaseShoppingTool): method __init__ (line 16) | def __init__(self, cfg: Dict = None): method _load_database (line 32) | def _load_database(self, path: str): method call (line 46) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/filter_by_range_tool.py class FilterByRangeTool (line 10) | class FilterByRangeTool(BaseShoppingTool): method __init__ (line 17) | def __init__(self, cfg: Dict = None): method _load_database (line 33) | def _load_database(self, path: str): method _get_nested_value (line 47) | def _get_nested_value(self, obj: Dict, key_path: str) -> Any: method call (line 60) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/filter_by_size_tool.py class FilterBySizeTool (line 8) | class FilterBySizeTool(BaseShoppingTool): method __init__ (line 16) | def __init__(self, cfg: Dict = None): method _load_database (line 32) | def _load_database(self, path: str): method call (line 46) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/get_cart_info.py class GetCartInfoTool (line 8) | class GetCartInfoTool(BaseShoppingTool): method __init__ (line 13) | def __init__(self, cfg: Dict = None): method _load_database (line 26) | def _load_database(self, path: Path): method call (line 84) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/get_product_details_tool.py class GetProductDetailsTool (line 8) | class GetProductDetailsTool(BaseShoppingTool): method __init__ (line 13) | def __init__(self, cfg: Dict = None): method _load_database (line 29) | def _load_database(self, path: str): method call (line 43) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/get_user_info.py class GetUserInfoTool (line 7) | class GetUserInfoTool(BaseShoppingTool): method __init__ (line 12) | def __init__(self, cfg: Dict = None): method _load_database (line 25) | def _load_database(self, path: Path): method call (line 56) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/search_products_tool.py class SearchProductsTool (line 17) | class SearchProductsTool(BaseShoppingTool): method __init__ (line 23) | def __init__(self, cfg: Dict = None): method _load_and_prepare_database (line 43) | def _load_and_prepare_database(self, path: str): method call (line 77) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/shoppingplanning/tools/sort_product_tool.py class SortProductsTool (line 9) | class SortProductsTool(BaseShoppingTool): method __init__ (line 17) | def __init__(self, cfg: Dict = None): method _load_database (line 33) | def _load_database(self, path: str): method _get_nested_value (line 45) | def _get_nested_value(self, obj: Dict, key_path: str) -> Any: method call (line 52) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/travelplanning/agent/call_llm.py function load_model_config (line 14) | def load_model_config(model_name: str) -> Dict[str, Any]: function create_client (line 64) | def create_client(model_name: str, model_config: Optional[Dict[str, Any]... function call_llm (line 99) | def call_llm( FILE: benchmark/deepplanning/travelplanning/agent/prompts.py function get_system_prompt (line 923) | def get_system_prompt(language: str = 'zh') -> str: function get_format_convert_prompt (line 933) | def get_format_convert_prompt(language: str = 'zh') -> str: FILE: benchmark/deepplanning/travelplanning/agent/tools_fn_agent.py class ToolsFnAgent (line 21) | class ToolsFnAgent: method __init__ (line 29) | def __init__(self, method _load_env_from_dotenv (line 67) | def _load_env_from_dotenv(self) -> None: method _load_tool_schemas (line 102) | def _load_tool_schemas(self) -> List[Dict[str, Any]]: method _build_openai_tools (line 113) | def _build_openai_tools(self, schemas: List[Dict[str, Any]]) -> List[D... method _build_tool_config (line 135) | def _build_tool_config(self, tool_cls) -> Dict[str, Any]: method _load_tool_instances (line 166) | def _load_tool_instances(self) -> Dict[str, Any]: method _exec_tool (line 201) | def _exec_tool(self, name: str, arguments_json: str) -> str: method _call_llm (line 218) | def _call_llm(self, messages: List[Any], tools: Optional[List[Dict[str... method _detect_tool_calls (line 227) | def _detect_tool_calls(self, assistant_message) -> List[Dict[str, Any]]: method _extract_plan_content (line 253) | def _extract_plan_content(self, text: str) -> str: method _message_to_dict (line 272) | def _message_to_dict(self, msg) -> Dict[str, Any]: method _serialize_messages (line 322) | def _serialize_messages(self, messages: List[Any]) -> List[Dict[str, A... method run (line 329) | def run(self, function run_agent_inference (line 379) | def run_agent_inference( FILE: benchmark/deepplanning/travelplanning/evaluation/constraints_commonsense.py function check_valid_days (line 153) | def check_valid_days(daily_plans: List[Dict[str, Any]], meta: Dict[str, ... function check_route_closed_loop (line 160) | def check_route_closed_loop(daily_plans: List[Dict[str, Any]], meta: Dic... function check_intercity_transportation_consistency (line 177) | def check_intercity_transportation_consistency(daily_plans: List[Dict[st... function check_hotels_from_search (line 289) | def check_hotels_from_search(daily_plans: List[Dict[str, Any]], hotels_i... function check_attractions_from_search (line 342) | def check_attractions_from_search(daily_plans: List[Dict[str, Any]], att... function check_meals_from_search (line 372) | def check_meals_from_search(daily_plans: List[Dict[str, Any]], restauran... function check_intercity_public_from_search (line 409) | def check_intercity_public_from_search( function check_accommodation_traceable (line 504) | def check_accommodation_traceable(daily_plans: List[Dict[str, Any]]) -> ... function check_last_activity_is_hotel (line 538) | def check_last_activity_is_hotel(daily_plans: List[Dict[str, Any]]) -> T... function check_meal_necessity (line 556) | def check_meal_necessity(daily_plans: List[Dict[str, Any]], meta: Dict[s... function check_attraction_necessity (line 706) | def check_attraction_necessity(daily_plans: List[Dict[str, Any]], meta: ... function check_time_no_overlap (line 877) | def check_time_no_overlap(daily_plans: List[Dict[str, Any]]) -> Tuple[bo... function check_transfer_time_reasonable (line 901) | def check_transfer_time_reasonable(daily_plans: List[Dict[str, Any]], lo... function check_attractions_in_opening_hours (line 1057) | def check_attractions_in_opening_hours(daily_plans: List[Dict[str, Any]]... function check_meals_in_business_hours (line 1088) | def check_meals_in_business_hours(daily_plans: List[Dict[str, Any]], res... function check_attractions_not_closed (line 1127) | def check_attractions_not_closed( function check_attractions_duration_reasonable (line 1202) | def check_attractions_duration_reasonable(daily_plans: List[Dict[str, An... function check_meal_duration_reasonable (line 1230) | def check_meal_duration_reasonable(daily_plans: List[Dict[str, Any]]) ->... function check_budget_accuracy (line 1283) | def check_budget_accuracy(plan: Dict[str, Any], daily_plans: List[Dict[s... function check_diverse_restaurants (line 1423) | def check_diverse_restaurants(daily_plans: List[Dict[str, Any]]) -> Tupl... function check_diverse_attractions (line 1439) | def check_diverse_attractions(daily_plans: List[Dict[str, Any]]) -> Tupl... function calculate_dimension_scores (line 1458) | def calculate_dimension_scores(check_results: Dict[str, Tuple[bool, Opti... function get_dimension_summary (line 1530) | def get_dimension_summary(dimension_result: Dict[str, Any]) -> str: function eval_commonsense (line 1572) | def eval_commonsense(plan: Dict[str, Any], meta: Dict[str, Any], databas... function eval_commonsense_with_dimensions (line 1673) | def eval_commonsense_with_dimensions( function get_all_check_names (line 1719) | def get_all_check_names() -> List[str]: FILE: benchmark/deepplanning/travelplanning/evaluation/constraints_hard.py function eval_hard (line 10) | def eval_hard(plan: Dict[str, Any], meta: Dict[str, Any]) -> Dict[str, T... function _eval_flight_constraint (line 61) | def _eval_flight_constraint(constraint_key: str, constraint_data: Dict, ... function _eval_train_constraint (line 110) | def _eval_train_constraint(constraint_key: str, constraint_data: Dict, p... function _eval_hotel_constraint (line 157) | def _eval_hotel_constraint(constraint_key: str, constraint_data: Dict, p... function _eval_restaurant_constraint (line 223) | def _eval_restaurant_constraint(constraint_key: str, constraint_data: Di... function _eval_attraction_constraint (line 283) | def _eval_attraction_constraint(constraint_key: str, constraint_data: Di... function _extract_flights_from_plan (line 343) | def _extract_flights_from_plan(plan: Dict) -> List[Dict]: function _extract_trains_from_plan (line 368) | def _extract_trains_from_plan(plan: Dict) -> List[Dict]: function _extract_hotels_from_plan (line 392) | def _extract_hotels_from_plan(plan: Dict) -> List[Dict]: function _extract_restaurants_from_plan (line 409) | def _extract_restaurants_from_plan(plan: Dict) -> List[Dict]: function _extract_attractions_from_plan (line 430) | def _extract_attractions_from_plan(plan: Dict) -> List[Dict]: function _eval_budget_constraint (line 455) | def _eval_budget_constraint(constraint_data: Dict, plan: Dict, meta: Dic... FILE: benchmark/deepplanning/travelplanning/evaluation/convert_report.py function _load_env_from_dotenv (line 27) | def _load_env_from_dotenv() -> None: function extract_json_from_response (line 65) | def extract_json_from_response(text: str) -> Optional[str]: function process_single_report (line 79) | def process_single_report( function convert_reports (line 208) | def convert_reports( FILE: benchmark/deepplanning/travelplanning/evaluation/eval_converted.py function calculate_weighted_score (line 19) | def calculate_weighted_score(commonsense_results: Dict[str, Tuple[bool, ... function calculate_hard_score (line 84) | def calculate_hard_score(hard_results: Dict[str, Tuple[bool, Optional[st... function process_single_evaluation (line 124) | def process_single_evaluation( function evaluate_plans (line 247) | def evaluate_plans( FILE: benchmark/deepplanning/travelplanning/evaluation/utils.py function extract_from_to (line 19) | def extract_from_to(text: str) -> Tuple[Optional[str], Optional[str]]: function normalize_city (line 27) | def normalize_city(text: Optional[str]) -> Optional[str]: function parse_lonlat_string (line 34) | def parse_lonlat_string(text: Optional[str]) -> Tuple[Optional[float], O... function parse_time_hhmm (line 54) | def parse_time_hhmm(t: Optional[str]) -> Optional[time]: function parse_time_slot (line 72) | def parse_time_slot(slot: Optional[str]) -> Tuple[Optional[time], Option... function is_within_business_hours (line 84) | def is_within_business_hours(slot_start: time, slot_end: time, open_t: t... function slot_to_minutes (line 106) | def slot_to_minutes(slot: Optional[str]) -> Tuple[Optional[int], Optiona... function haversine_km (line 122) | def haversine_km(lat1: float, lon1: float, lat2: float, lon2: float) -> ... function get_base_dir (line 137) | def get_base_dir() -> Path: function get_database_dir (line 180) | def get_database_dir(database_dir: Optional[Path] = None) -> Path: function load_restaurant_index (line 211) | def load_restaurant_index(csv_path: str) -> Dict[str, Dict[str, Any]]: function load_hotel_index (line 236) | def load_hotel_index(csv_path: str) -> Dict[str, Dict[str, Any]]: function load_attraction_index (line 258) | def load_attraction_index(csv_path: str) -> Dict[str, Dict[str, Any]]: function load_locations_index (line 286) | def load_locations_index(csv_path: str) -> Dict[str, Dict[str, Any]]: function load_flights_index (line 314) | def load_flights_index(csv_path: str) -> Dict[str, List[Dict[str, Any]]]: function load_trains_index (line 353) | def load_trains_index(csv_path: str) -> Dict[str, List[Dict[str, Any]]]: function load_station_to_city_mapping (line 400) | def load_station_to_city_mapping(database_dir: Optional[Path] = None) ->... function get_station_to_city_map (line 463) | def get_station_to_city_map(database_dir: Optional[Path] = None) -> Dict... function extract_city_from_location (line 483) | def extract_city_from_location(location: str, database_dir: Optional[Pat... function get_location_coords (line 521) | def get_location_coords(name: str, locations_index: Dict[str, Dict[str, ... function resolve_name_coords (line 538) | def resolve_name_coords(name: str, locations_index: Optional[Dict[str, D... function parse_duration_hours (line 565) | def parse_duration_hours(val: Any) -> Optional[float]: function is_all_day (line 575) | def is_all_day(opening: Optional[str], closing: Optional[str]) -> bool: function calculate_day_of_week (line 588) | def calculate_day_of_week(depart_weekday: int, day_index: int) -> int: function parse_closing_dates (line 610) | def parse_closing_dates(closing_dates_str: Optional[str]) -> List[int]: function is_attraction_closed_on_day (line 668) | def is_attraction_closed_on_day(closing_dates: Optional[str], weekday: i... function day_cities (line 687) | def day_cities(current_city: str) -> List[str]: function iter_meal_acts (line 695) | def iter_meal_acts(daily_plans: List[Dict[str, Any]]): function iter_hotel_acts (line 708) | def iter_hotel_acts(daily_plans: List[Dict[str, Any]]): function iter_attraction_acts (line 721) | def iter_attraction_acts(daily_plans: List[Dict[str, Any]]): function iter_intercity_public_acts (line 734) | def iter_intercity_public_acts(daily_plans: List[Dict[str, Any]]): function end_city_of_day (line 746) | def end_city_of_day(current_city: str) -> Optional[str]: function get_day_accommodation_city (line 754) | def get_day_accommodation_city(day: Dict[str, Any], hotels_index: Option... function iter_accommodation_entries (line 772) | def iter_accommodation_entries(daily_plans: List[Dict[str, Any]]): function get_intercity_arrival_time (line 795) | def get_intercity_arrival_time(day: Dict[str, Any]) -> Optional[float]: function get_intercity_departure_time (line 815) | def get_intercity_departure_time(day: Dict[str, Any]) -> Optional[float]: FILE: benchmark/deepplanning/travelplanning/run.py function detect_missing_ids (line 27) | def detect_missing_ids(directory: Path, file_pattern: str, total_ids: in... function parse_id_list (line 59) | def parse_id_list(id_str: str) -> list: function get_agent_inference_function (line 101) | def get_agent_inference_function(model: str): function parse_args (line 116) | def parse_args(): function setup_paths (line 161) | def setup_paths(args): function print_config (line 199) | def print_config(args): function run_step_inference (line 228) | def run_step_inference(args): function run_step_conversion (line 295) | def run_step_conversion(args): function run_step_evaluation (line 344) | def run_step_evaluation(args): function print_final_summary (line 383) | def print_final_summary(args, inference_results, conversion_results, eva... function run_single_language (line 403) | def run_single_language(args, language): function main (line 446) | def main(): FILE: benchmark/deepplanning/travelplanning/tools/attraction_query_tool.py class AttractionDetailsQueryTool (line 11) | class AttractionDetailsQueryTool(BaseTravelTool): method __init__ (line 68) | def __init__(self, cfg: Optional[Dict] = None): method call (line 83) | def call(self, params: Union[str, dict], **kwargs) -> str: class AttractionRecommendTool (line 172) | class AttractionRecommendTool(BaseTravelTool): method __init__ (line 195) | def __init__(self, cfg: Optional[Dict] = None): method call (line 210) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/travelplanning/tools/base_travel_tool.py function load_tool_schemas (line 17) | def load_tool_schemas(schema_file: str = 'tool_schema.json', language: s... function get_tool_schema (line 64) | def get_tool_schema(tool_name: str, schemas: Dict[str, dict] = None) -> ... function get_cached_tool_schemas (line 87) | def get_cached_tool_schemas(language: str = 'en') -> Dict[str, dict]: class BaseTravelTool (line 101) | class BaseTravelTool(BaseTool): method __init__ (line 123) | def __init__(self, cfg: Optional[Dict] = None): method _load_schema_from_json (line 150) | def _load_schema_from_json(self): method load_json_database (line 176) | def load_json_database(self, path: str) -> dict: method load_csv_database (line 195) | def load_csv_database(self, path: str): method format_result_as_json (line 245) | def format_result_as_json(self, result: Union[dict, list]) -> str: method openai_schema (line 260) | def openai_schema(self) -> Dict: method get_schema (line 289) | def get_schema(self, format: str = "openai") -> Dict: method get_openai_schema_from_class (line 320) | def get_openai_schema_from_class(cls) -> Dict: FILE: benchmark/deepplanning/travelplanning/tools/flight_query_tool.py class FlightQueryTool (line 11) | class FlightQueryTool(BaseTravelTool): method __init__ (line 36) | def __init__(self, cfg: Optional[Dict] = None): method call (line 51) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/travelplanning/tools/hotel_query_tool.py class HotelQueryTool (line 11) | class HotelQueryTool(BaseTravelTool): method __init__ (line 30) | def __init__(self, cfg: Optional[Dict] = None): method call (line 45) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/travelplanning/tools/location_search_tool.py class LocationSearchTool (line 11) | class LocationSearchTool(BaseTravelTool): method __init__ (line 30) | def __init__(self, cfg: Optional[Dict] = None): method call (line 45) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/travelplanning/tools/restaurant_query_tool.py class RestaurantRecommendTool (line 11) | class RestaurantRecommendTool(BaseTravelTool): method __init__ (line 30) | def __init__(self, cfg: Optional[Dict] = None): method call (line 45) | def call(self, params: Union[str, dict], **kwargs) -> str: class RestaurantDetailsQueryTool (line 105) | class RestaurantDetailsQueryTool(BaseTravelTool): method __init__ (line 124) | def __init__(self, cfg: Optional[Dict] = None): method call (line 139) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: benchmark/deepplanning/travelplanning/tools/roadroute_query_tool.py class RoadRouteInfoQueryTool (line 11) | class RoadRouteInfoQueryTool(BaseTravelTool): method __init__ (line 32) | def __init__(self, cfg: Optional[Dict] = None): method call (line 47) | def call(self, params: Union[str, dict], **kwargs) -> str: method _check_coordinate_existence (line 94) | def _check_coordinate_existence(self, origin: str, destination: str) -... FILE: benchmark/deepplanning/travelplanning/tools/train_query_tool.py class TrainQueryTool (line 11) | class TrainQueryTool(BaseTravelTool): method __init__ (line 38) | def __init__(self, cfg: Optional[Dict] = None): method call (line 54) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: browser_qwen/background.js function send_data (line 19) | function send_data(msg){ FILE: browser_qwen/src/content.js function getPageTextContent (line 18) | function getPageTextContent() { function cache_browser (line 23) | function cache_browser(){ FILE: examples/assistant_add_custom_tool.py class MyImageGen (line 32) | class MyImageGen(BaseTool): method call (line 41) | def call(self, params: str, **kwargs) -> str: function init_agent_service (line 50) | def init_agent_service(): function test (line 72) | def test(query: str = 'draw a dog'): function app_tui (line 82) | def app_tui(): function app_gui (line 97) | def app_gui(): FILE: examples/assistant_audio.py function test (line 19) | def test(): function app_gui (line 34) | def app_gui(): FILE: examples/assistant_mcp_sqlite_bot.py function init_agent_service (line 27) | def init_agent_service(): function test (line 53) | def test(query='数据库里有几张表', file: Optional[str] = os.path.join(ROOT_RESOU... function app_tui (line 69) | def app_tui(): function app_gui (line 94) | def app_gui(): FILE: examples/assistant_omni.py function test (line 19) | def test(): function app_gui (line 51) | def app_gui(): FILE: examples/assistant_qwen3.5.py function init_agent_service (line 22) | def init_agent_service(): function test (line 77) | def test(query: str = 'What time is it?'): function app_tui (line 88) | def app_tui(): function app_gui (line 104) | def app_gui(): FILE: examples/assistant_qwen3.py function init_agent_service (line 22) | def init_agent_service(): function test (line 87) | def test(query: str = 'What time is it?'): function app_tui (line 98) | def app_tui(): function app_gui (line 114) | def app_gui(): FILE: examples/assistant_qwen3_coder.py function init_agent_service (line 22) | def init_agent_service(): function test (line 77) | def test(query: str = 'What time is it?'): function app_tui (line 88) | def app_tui(): function app_gui (line 104) | def app_gui(): FILE: examples/assistant_qwen3vl.py function init_agent_service (line 21) | def init_agent_service(): function test (line 43) | def test(pic_url: str, query: str): FILE: examples/assistant_qwq.py function init_agent_service (line 26) | def init_agent_service(): function test (line 53) | def test(query: str = '画一只猫,再画一只狗,最后画他们一起玩的画面,给我三张图'): function app_tui (line 64) | def app_tui(): function app_gui (line 80) | def app_gui(): FILE: examples/assistant_rag.py function test (line 19) | def test(): function app_gui (line 26) | def app_gui(): FILE: examples/assistant_weather_bot.py function init_agent_service (line 26) | def init_agent_service(): function test (line 43) | def test(query='海淀区天气', file: Optional[str] = os.path.join(ROOT_RESOURCE... function app_tui (line 59) | def app_tui(): function app_gui (line 84) | def app_gui(): FILE: examples/function_calling.py function get_current_weather (line 24) | def get_current_weather(location, unit='fahrenheit'): function test (line 36) | def test(fncall_prompt_type: str = 'qwen'): FILE: examples/function_calling_in_parallel.py function get_current_weather (line 25) | def get_current_weather(location, unit='fahrenheit'): function test (line 37) | def test(): FILE: examples/gpt_mentions.py function init_agent_service (line 22) | def init_agent_service(): function app_gui (line 44) | def app_gui(): FILE: examples/group_chat_chess.py function test (line 55) | def test(query: str = '<1,1>'): function app_tui (line 63) | def app_tui(): function app_gui (line 77) | def app_gui(): FILE: examples/group_chat_demo.py function init_agent_service (line 26) | def init_agent_service(cfgs): function init_agent_service_create (line 32) | def init_agent_service_create(): function app (line 87) | def app(cfgs): function test (line 162) | def test(): function app_create (line 166) | def app_create(history, now_cfgs): function _get_display_history_from_message (line 215) | def _get_display_history_from_message(): function get_name_of_current_user (line 231) | def get_name_of_current_user(cfgs): function add_text (line 238) | def add_text(text, cfgs): function chat_clear (line 250) | def chat_clear(): function chat_clear_create (line 255) | def chat_clear_create(): function add_file (line 260) | def add_file(file): function add_text_create (line 266) | def add_text_create(history, text): FILE: examples/llm_quick_chat_oai.py function test (line 19) | def test(): FILE: examples/llm_riddles.py class LLMRiddles (line 26) | class LLMRiddles(Agent): method __init__ (line 29) | def __init__(self, llm: Optional[Union[Dict, BaseChatModel]] = None): method _run (line 41) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... function test (line 45) | def test(): function app_tui (line 65) | def app_tui(): FILE: examples/llm_vl_mix_text.py function test (line 20) | def test(): FILE: examples/long_dialogue.py function test (line 19) | def test(): function app_tui (line 31) | def app_tui(): function app_gui (line 45) | def app_gui(): FILE: examples/multi_agent_router.py function init_agent_service (line 26) | def init_agent_service(): function test (line 51) | def test( function app_tui (line 75) | def app_tui(): function app_gui (line 105) | def app_gui(): FILE: examples/parallel_doc_qa.py function test (line 19) | def test(): function app_gui (line 38) | def app_gui(): FILE: examples/qwen2vl_assistant_tooluse.py class ExpressTracking (line 36) | class ExpressTracking(BaseToolWithFileAccess): method call (line 54) | def call(self, params: Union[str, dict], files: List[str] = None, **kw... class Area2Weather (line 101) | class Area2Weather(BaseToolWithFileAccess): method call (line 143) | def call(self, params: Union[str, dict], files: List[str] = None, **kw... class WeatherHour24 (line 172) | class WeatherHour24(BaseToolWithFileAccess): method call (line 184) | def call(self, params: Union[str, dict], files: List[str] = None, **kw... class CropResize (line 208) | class CropResize(BaseToolWithFileAccess): method _extract_coordinates (line 225) | def _extract_coordinates(self, text): method _expand_box (line 240) | def _expand_box(self, x1, y1, x2, y2, factor=1): method call (line 249) | def call(self, params: Union[str, dict], files: List[str] = None, **kw... function init_agent_service (line 288) | def init_agent_service(): function test (line 346) | def test(): function app_gui (line 368) | def app_gui(): FILE: examples/qwen2vl_assistant_video.py function test (line 18) | def test(): FILE: examples/qwen2vl_function_calling.py function image_gen (line 24) | def image_gen(prompt: str) -> str: function test (line 31) | def test(): FILE: examples/react_data_analysis.py function init_agent_service (line 26) | def init_agent_service(): function test (line 43) | def test(query: str = 'pd.head the file first and then help me draw a li... function app_tui (line 60) | def app_tui(): function app_gui (line 85) | def app_gui(): FILE: examples/tir_math.py function init_agent_service (line 33) | def init_agent_service(): function test (line 40) | def test(query: str = '斐波那契数列前10个数字'): function app_tui (line 50) | def app_tui(): function app_gui (line 66) | def app_gui(): FILE: examples/virtual_memory_qa.py function init_agent_service (line 25) | def init_agent_service(): function test (line 36) | def test(query='简单列出这篇文章的贡献https://qianwen-res.oss-cn-beijing.aliyuncs.c... function app_tui (line 47) | def app_tui(): function app_gui (line 72) | def app_gui(): FILE: examples/visual_storytelling.py class VisualStorytelling (line 27) | class VisualStorytelling(Agent): method __init__ (line 30) | def __init__(self, method _run (line 45) | def _run(self, messages: List[Message], lang: str = 'zh', **kwargs) ->... function test (line 66) | def test(query: Optional[str] = '看图说话', function app_tui (line 80) | def app_tui(): function app_gui (line 104) | def app_gui(): FILE: qwen-agent-docs/website/app/[lang]/[[...mdxPath]]/page.jsx function generateStaticParams (line 8) | async function generateStaticParams() { function generateMetadata (line 28) | async function generateMetadata(props) { FILE: qwen-agent-docs/website/app/[lang]/layout.tsx type LayoutProps (line 8) | type LayoutProps = Readonly<{ constant SUPPORTED_LOCALES (line 16) | const SUPPORTED_LOCALES = ['en']; function generateStaticParams (line 19) | async function generateStaticParams() { FILE: qwen-agent-docs/website/app/layout.tsx constant SITE_NAME (line 9) | const SITE_NAME = "Qwen Agent"; constant DEFAULT_TITLE (line 10) | const DEFAULT_TITLE = "Qwen Agent: AI Agent Framework Documentation"; constant DESCRIPTION (line 11) | const DESCRIPTION = constant KEYWORDS (line 14) | const KEYWORDS = [ function getSiteUrl (line 33) | function getSiteUrl(): string { type LayoutProps (line 100) | type LayoutProps = Readonly<{ FILE: qwen-agent-docs/website/app/page.tsx function HomePage (line 3) | function HomePage() { FILE: qwen-agent-docs/website/app/robots.ts function getSiteUrl (line 3) | function getSiteUrl(): string { function robots (line 16) | function robots(): MetadataRoute.Robots { FILE: qwen-agent-docs/website/app/sitemap.ts constant LOCALES (line 5) | const LOCALES = ["en", "zh"] as const; function getSiteUrl (line 7) | function getSiteUrl(): string { function walkDir (line 20) | function walkDir(dir: string): string[] { function toDocPath (line 42) | function toDocPath(locale: string, markdownFile: string): string { function safeExists (line 57) | function safeExists(p: string): boolean { function sitemap (line 66) | function sitemap(): MetadataRoute.Sitemap { FILE: qwen-agent-docs/website/src/components/leaderboard.tsx type ModelScore (line 5) | interface ModelScore { type VersionKey (line 23) | type VersionKey = "v1.1" | "v1.0"; function RankBadge (line 86) | function RankBadge({ rank }: { rank: number }) { function ModelIcon (line 119) | function ModelIcon({ icon }: { icon: string }) { function sortByScore (line 137) | function sortByScore(models: ModelScore[]): ModelScore[] { function findBestValues (line 141) | function findBestValues(models: ModelScore[]) { function ScoreCell (line 159) | function ScoreCell({ value, isBest }: { value: number | null; isBest: bo... function Leaderboard (line 174) | function Leaderboard() { FILE: qwen-agent-docs/website/src/components/locale-anchor.tsx constant LOCALES (line 8) | const LOCALES = ["en", "zh", "de", "fr", "ru", "ja", "pt-BR"] as const; type Locale (line 9) | type Locale = (typeof LOCALES)[number]; function LinkArrowIcon (line 11) | function LinkArrowIcon(props: React.SVGProps) { function isExternalUrl (line 31) | function isExternalUrl(href: string) { function getLocaleFromPathname (line 41) | function getLocaleFromPathname(pathname: string | null): Locale | null { function hasLocalePrefix (line 50) | function hasLocalePrefix(path: string) { function LocaleAnchor (line 56) | function LocaleAnchor( FILE: qwen_agent/agent.py class Agent (line 31) | class Agent(ABC): method __init__ (line 38) | def __init__(self, method run_nonstream (line 71) | def run_nonstream(self, messages: List[Union[Dict, Message]], **kwargs... method run (line 78) | def run(self, messages: List[Union[Dict, Message]], method _run (line 134) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... method _call_llm (line 150) | def _call_llm( method _call_tool (line 178) | def _call_tool(self, tool_name: str, tool_args: Union[str, dict] = '{}... method _init_tool (line 212) | def _init_tool(self, tool: Union[str, Dict, BaseTool]): method _detect_tool (line 239) | def _detect_tool(self, message: Message) -> Tuple[bool, str, str, str]: class BasicAgent (line 263) | class BasicAgent(Agent): method _run (line 265) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... FILE: qwen_agent/agents/article_agent.py class ArticleAgent (line 23) | class ArticleAgent(Assistant): method _run (line 29) | def _run(self, FILE: qwen_agent/agents/assistant.py function format_knowledge_to_source_and_content (line 52) | def format_knowledge_to_source_and_content(result: Union[str, List[dict]... class Assistant (line 81) | class Assistant(FnCallAgent): method __init__ (line 84) | def __init__(self, method _run (line 100) | def _run(self, method _prepend_knowledge_prompt (line 116) | def _prepend_knowledge_prompt(self, function get_current_date_str (line 152) | def get_current_date_str( FILE: qwen_agent/agents/dialogue_retrieval_agent.py class DialogueRetrievalAgent (line 40) | class DialogueRetrievalAgent(Assistant): method _run (line 43) | def _run(self, FILE: qwen_agent/agents/dialogue_simulator.py class DialogueSimulator (line 23) | class DialogueSimulator(Agent): method __init__ (line 25) | def __init__(self, user_agent: HumanSimulator, assistant_agent: Agent,... method _run (line 31) | def _run(self, messages: List[Message] = None, **kwargs) -> Iterator[L... function _swap_roles (line 55) | def _swap_roles(messages: List[Message]) -> List[Message]: FILE: qwen_agent/agents/doc_qa/basic_doc_qa.py class BasicDocQA (line 40) | class BasicDocQA(Assistant): method __init__ (line 43) | def __init__(self, method _run (line 59) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... FILE: qwen_agent/agents/doc_qa/parallel_doc_qa.py class ParallelDocQA (line 48) | class ParallelDocQA(Assistant): method __init__ (line 50) | def __init__(self, method _get_files (line 76) | def _get_files(self, messages: List[Message]): method _parse_and_chunk_files (line 85) | def _parse_and_chunk_files(self, messages: List[Message]): method _retrieve_according_to_member_responses (line 97) | def _retrieve_according_to_member_responses( method _is_none_response (line 163) | def _is_none_response(self, text: str) -> bool: method _extract_text_from_output (line 170) | def _extract_text_from_output(self, output): method _parser_json (line 177) | def _parser_json(self, content): method _run (line 189) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... method _ask_member_agent (line 254) | def _ask_member_agent(self, FILE: qwen_agent/agents/doc_qa/parallel_doc_qa_member.py class ParallelDocQAMember (line 116) | class ParallelDocQAMember(Agent): method __init__ (line 118) | def __init__(self, method _run (line 129) | def _run(self, FILE: qwen_agent/agents/doc_qa/parallel_doc_qa_summary.py class ParallelDocQASummary (line 69) | class ParallelDocQASummary(Agent): method _run (line 71) | def _run(self, messages: List[Message], knowledge: str = '', lang: str... FILE: qwen_agent/agents/fncall_agent.py class FnCallAgent (line 27) | class FnCallAgent(Agent): method __init__ (line 30) | def __init__(self, method _run (line 73) | def _run(self, messages: List[Message], lang: Literal['en', 'zh'] = 'e... method _call_tool (line 110) | def _call_tool(self, tool_name: str, tool_args: Union[str, dict] = '{}... FILE: qwen_agent/agents/group_chat.py class GroupChat (line 29) | class GroupChat(Agent, MultiAgentHub): method __init__ (line 37) | def __init__(self, method _run (line 81) | def _run(self, method _gen_batch_response (line 110) | def _gen_batch_response(self, method _gen_one_response (line 153) | def _gen_one_response(self, method _select_agent (line 168) | def _select_agent(self, method _manage_messages (line 214) | def _manage_messages(self, messages: List[Message], name: str) -> List... method _init_agents_from_config (line 265) | def _init_agents_from_config(self, cfgs: Dict, llm: Optional[Union[Dic... FILE: qwen_agent/agents/group_chat_auto_router.py class GroupChatAutoRouter (line 25) | class GroupChatAutoRouter(Agent): method __init__ (line 50) | def __init__(self, method _run (line 72) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... FILE: qwen_agent/agents/group_chat_creator.py class GroupChatCreator (line 69) | class GroupChatCreator(Agent): method __init__ (line 71) | def __init__(self, method _run (line 84) | def _run(self, method _preprocess_messages (line 95) | def _preprocess_messages(self, messages: List[Message]) -> List[Message]: method _postprocess_messages (line 113) | def _postprocess_messages(self, messages: List[Message]) -> List[Messa... method _extract_role_config_and_answer (line 127) | def _extract_role_config_and_answer(self, text: str) -> Tuple[str, Lis... FILE: qwen_agent/agents/human_simulator.py class HumanSimulator (line 36) | class HumanSimulator(Agent): method __init__ (line 38) | def __init__(self, method _run (line 54) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... FILE: qwen_agent/agents/keygen_strategies/gen_keyword.py class GenKeyword (line 25) | class GenKeyword(Agent): method __init__ (line 69) | def __init__(self, method _run (line 80) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... FILE: qwen_agent/agents/keygen_strategies/gen_keyword_with_knowledge.py class GenKeywordWithKnowledge (line 26) | class GenKeywordWithKnowledge(GenKeyword): method __init__ (line 58) | def __init__(self, method _run (line 65) | def _run(self, FILE: qwen_agent/agents/keygen_strategies/split_query.py class SplitQuery (line 25) | class SplitQuery(GenKeyword): method __init__ (line 79) | def __init__(self, method _run (line 92) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... FILE: qwen_agent/agents/keygen_strategies/split_query_then_gen_keyword.py class SplitQueryThenGenKeyword (line 28) | class SplitQueryThenGenKeyword(Agent): method __init__ (line 30) | def __init__(self, method _run (line 39) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... FILE: qwen_agent/agents/keygen_strategies/split_query_then_gen_keyword_with_knowledge.py class SplitQueryThenGenKeywordWithKnowledge (line 24) | class SplitQueryThenGenKeywordWithKnowledge(SplitQueryThenGenKeyword): method __init__ (line 26) | def __init__(self, FILE: qwen_agent/agents/memo_assistant.py class MemoAssistant (line 41) | class MemoAssistant(Assistant): method __init__ (line 43) | def __init__(self, method _run (line 58) | def _run(self, messages: List[Message], lang: str = 'zh', knowledge: s... method _prepend_storage_info_to_sys (line 65) | def _prepend_storage_info_to_sys(self, messages: List[Message]) -> Lis... method _truncate_dialogue_history (line 93) | def _truncate_dialogue_history(self, messages: List[Message]) -> List[... FILE: qwen_agent/agents/react_chat.py class ReActChat (line 50) | class ReActChat(FnCallAgent): method __init__ (line 53) | def __init__(self, method _run (line 73) | def _run(self, messages: List[Message], lang: Literal['en', 'zh'] = 'e... method _prepend_react_prompt (line 109) | def _prepend_react_prompt(self, messages: List[Message], lang: Literal... method _detect_tool (line 134) | def _detect_tool(self, text: str) -> Tuple[bool, str, str, str]: FILE: qwen_agent/agents/router.py class Router (line 36) | class Router(Assistant, MultiAgentHub): method __init__ (line 38) | def __init__(self, method _run (line 61) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... method supplement_name_special_token (line 93) | def supplement_name_special_token(message: Message) -> Message: FILE: qwen_agent/agents/tir_agent.py function extract_program (line 33) | def extract_program(result: str, last_only=True): class TIRMathAgent (line 56) | class TIRMathAgent(FnCallAgent): method __init__ (line 59) | def __init__(self, method _run (line 76) | def _run(self, messages: List[Message], lang: Literal['en', 'zh'] = 'e... method _detect_tool (line 130) | def _detect_tool(self, text: str) -> Tuple[bool, str, str, str]: FILE: qwen_agent/agents/user_agent.py class UserAgent (line 23) | class UserAgent(Agent): method _run (line 25) | def _run(self, messages: List[Message], **kwargs) -> Iterator[List[Mes... FILE: qwen_agent/agents/virtual_memory_agent.py class VirtualMemoryAgent (line 28) | class VirtualMemoryAgent(Assistant): method __init__ (line 30) | def __init__(self, method _run (line 48) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... method _format_file (line 80) | def _format_file(self, messages: List[Message], lang: str = 'en') -> L... FILE: qwen_agent/agents/write_from_scratch.py function is_roman_numeral (line 28) | def is_roman_numeral(s): class WriteFromScratch (line 34) | class WriteFromScratch(Agent): method _run (line 36) | def _run(self, messages: List[Message], knowledge: str = '', lang: str... FILE: qwen_agent/agents/writing/continue_writing.py class ContinueWriting (line 46) | class ContinueWriting(Agent): method _run (line 48) | def _run(self, messages: List[Message], knowledge: str = '', lang: str... FILE: qwen_agent/agents/writing/expand_writing.py class ExpandWriting (line 54) | class ExpandWriting(Agent): method _run (line 56) | def _run(self, FILE: qwen_agent/agents/writing/outline_writing.py class OutlineWriting (line 48) | class OutlineWriting(Agent): method _run (line 50) | def _run(self, messages: List[Message], knowledge: str = '', lang: str... FILE: qwen_agent/gui/gradio_utils.py function covert_image_to_base64 (line 18) | def covert_image_to_base64(image_path): function format_cover_html (line 34) | def format_cover_html(bot_name, bot_description, bot_avatar): FILE: qwen_agent/gui/utils.py function get_avatar_image (line 43) | def get_avatar_image(name: str = 'user') -> str: function convert_history_to_chatbot (line 50) | def convert_history_to_chatbot(messages): function convert_fncall_to_text (line 67) | def convert_fncall_to_text(messages: List[Dict]) -> List[Dict]: FILE: qwen_agent/gui/web_ui.py class WebUI (line 29) | class WebUI: method __init__ (line 32) | def __init__(self, agent: Union[Agent, MultiAgentHub, List[Agent]], ch... method run (line 83) | def run(self, method change_agent (line 214) | def change_agent(self, agent_selector): method add_text (line 218) | def add_text(self, _input, _audio_input, _chatbot, _history): method add_mention (line 252) | def add_mention(self, _chatbot, _agent_selector): method agent_run (line 268) | def agent_run(self, _chatbot, _history, _agent_selector=None): method flushed (line 325) | def flushed(self): method _get_agent_index_by_name (line 330) | def _get_agent_index_by_name(self, agent_name): method _create_agent_info_block (line 344) | def _create_agent_info_block(self, agent_index=0): method _create_agent_plugins_block (line 356) | def _create_agent_plugins_block(self, agent_index=0): FILE: qwen_agent/llm/__init__.py function get_chat_model (line 31) | def get_chat_model(cfg: Union[dict, str] = 'qwen-plus') -> BaseChatModel: FILE: qwen_agent/llm/azure.py class TextChatAtAzure (line 25) | class TextChatAtAzure(TextChatAtOAI): method __init__ (line 27) | def __init__(self, cfg: Optional[Dict] = None): FILE: qwen_agent/llm/base.py function register_llm (line 35) | def register_llm(model_type): class ModelServiceError (line 44) | class ModelServiceError(Exception): method __init__ (line 46) | def __init__(self, class BaseChatModel (line 61) | class BaseChatModel(ABC): method support_multimodal_input (line 65) | def support_multimodal_input(self) -> bool: method support_multimodal_output (line 70) | def support_multimodal_output(self) -> bool: method support_audio_input (line 75) | def support_audio_input(self) -> bool: method __init__ (line 78) | def __init__(self, cfg: Optional[Dict] = None): method quick_chat (line 111) | def quick_chat(self, prompt: str) -> str: method chat (line 118) | def chat( method _chat (line 292) | def _chat( method _chat_with_functions (line 305) | def _chat_with_functions( method _continue_assistant_response (line 316) | def _continue_assistant_response( method _chat_stream (line 325) | def _chat_stream( method _chat_no_stream (line 334) | def _chat_no_stream( method _preprocess_messages (line 341) | def _preprocess_messages( method _postprocess_messages (line 364) | def _postprocess_messages( method _postprocess_messages_iterator (line 381) | def _postprocess_messages_iterator( method _convert_messages_to_target_type (line 392) | def _convert_messages_to_target_type(self, messages: List[Message], method _convert_messages_iterator_to_target_type (line 401) | def _convert_messages_iterator_to_target_type( method raw_chat (line 407) | def raw_chat( method _conv_qwen_agent_messages_to_oai (line 422) | def _conv_qwen_agent_messages_to_oai(messages: List[Union[Message, Dic... method quick_chat_oai (line 452) | def quick_chat_oai(self, messages: List[dict], tools: Optional[list] =... function _format_as_text_messages (line 536) | def _format_as_text_messages(messages: List[Message]) -> List[Message]: function _postprocess_stop_words (line 547) | def _postprocess_stop_words(messages: List[Message], stop: List[str]) ->... function _truncate_at_stop_word (line 592) | def _truncate_at_stop_word(text: str, stop: List[str]): function _truncate_input_messages_roughly (line 602) | def _truncate_input_messages_roughly(messages: List[Message], max_tokens... function retry_model_service (line 807) | def retry_model_service( function retry_model_service_iterator (line 822) | def retry_model_service_iterator( function _raise_or_delay (line 839) | def _raise_or_delay( function _rm_think (line 878) | def _rm_think(text: str) -> str: FILE: qwen_agent/llm/fncall_prompts/base_fncall_prompt.py class BaseFnCallPrompt (line 21) | class BaseFnCallPrompt(object): method preprocess_fncall_messages (line 24) | def preprocess_fncall_messages(messages: List[Message], method postprocess_fncall_messages (line 38) | def postprocess_fncall_messages(messages: List[Message], method format_plaintext_train_samples (line 48) | def format_plaintext_train_samples( FILE: qwen_agent/llm/fncall_prompts/nous_fncall_prompt.py class NousFnCallPrompt (line 27) | class NousFnCallPrompt(BaseFnCallPrompt): method preprocess_fncall_messages (line 29) | def preprocess_fncall_messages(self, method postprocess_fncall_messages (line 103) | def postprocess_fncall_messages( function remove_incomplete_special_tokens (line 294) | def remove_incomplete_special_tokens(text: str) -> str: function extract_fn (line 300) | def extract_fn(text: str): FILE: qwen_agent/llm/fncall_prompts/qwen_fncall_prompt.py class QwenFnCallPrompt (line 24) | class QwenFnCallPrompt(BaseFnCallPrompt): method preprocess_fncall_messages (line 27) | def preprocess_fncall_messages(messages: List[Message], method postprocess_fncall_messages (line 113) | def postprocess_fncall_messages(messages: List[Message], function get_function_description (line 335) | def get_function_description(function: Dict, lang: Literal['en', 'zh']) ... function remove_incomplete_special_tokens (line 369) | def remove_incomplete_special_tokens(text: str) -> str: function remove_trailing_comment_of_fn_args (line 389) | def remove_trailing_comment_of_fn_args(fn_args: str): FILE: qwen_agent/llm/function_calling.py class BaseFnCallModel (line 23) | class BaseFnCallModel(BaseChatModel, ABC): method __init__ (line 25) | def __init__(self, cfg: Optional[Dict] = None): method _preprocess_messages (line 41) | def _preprocess_messages( method _postprocess_messages (line 68) | def _postprocess_messages( method _remove_fncall_messages (line 84) | def _remove_fncall_messages(self, messages: List[Message], lang: Liter... method _chat_with_functions (line 120) | def _chat_with_functions( method _continue_assistant_response (line 138) | def _continue_assistant_response( function simulate_response_completion_with_chat (line 148) | def simulate_response_completion_with_chat(messages: List[Message]) -> L... function validate_num_fncall_results (line 167) | def validate_num_fncall_results(messages: List[Message], support_multimo... FILE: qwen_agent/llm/oai.py class TextChatAtOAI (line 37) | class TextChatAtOAI(BaseFnCallModel): method __init__ (line 39) | def __init__(self, cfg: Optional[Dict] = None): method _chat_stream (line 98) | def _chat_stream( method _chat_no_stream (line 161) | def _chat_no_stream( method convert_messages_to_dicts (line 180) | def convert_messages_to_dicts(self, messages: List[Message]) -> List[d... FILE: qwen_agent/llm/openvino.py class OpenVINO (line 28) | class OpenVINO(BaseFnCallModel): method __init__ (line 56) | def __init__(self, cfg: Optional[Dict] = None): method _get_stopping_criteria (line 82) | def _get_stopping_criteria(self, generate_cfg: dict): method _chat_stream (line 108) | def _chat_stream( method _chat_no_stream (line 142) | def _chat_no_stream( FILE: qwen_agent/llm/qwen_dashscope.py class QwenChatAtDS (line 30) | class QwenChatAtDS(BaseFnCallModel): method __init__ (line 32) | def __init__(self, cfg: Optional[Dict] = None): method _chat_stream (line 37) | def _chat_stream( method _chat_no_stream (line 60) | def _chat_no_stream( method _continue_assistant_response (line 88) | def _continue_assistant_response( method _delta_stream_output (line 97) | def _delta_stream_output(response) -> Iterator[List[Message]]: method _full_stream_output (line 110) | def _full_stream_output(response) -> Iterator[List[Message]]: function initialize_dashscope (line 162) | def initialize_dashscope(cfg: Optional[Dict] = None) -> None: FILE: qwen_agent/llm/qwenaudio_dashscope.py class QwenAudioChatAtDS (line 22) | class QwenAudioChatAtDS(QwenVLChatAtDS): method support_multimodal_input (line 25) | def support_multimodal_input(self) -> bool: method __init__ (line 28) | def __init__(self, cfg: Optional[Dict] = None): FILE: qwen_agent/llm/qwenomni_oai.py class QwenOmniChatAtOAI (line 22) | class QwenOmniChatAtOAI(QwenVLChatAtOAI): method support_audio_input (line 25) | def support_audio_input(self) -> bool: method __init__ (line 28) | def __init__(self, cfg: Optional[Dict] = None): FILE: qwen_agent/llm/qwenvl_dashscope.py class QwenVLChatAtDS (line 35) | class QwenVLChatAtDS(BaseFnCallModel): method support_multimodal_input (line 38) | def support_multimodal_input(self) -> bool: method __init__ (line 41) | def __init__(self, cfg: Optional[Dict] = None): method _chat_stream (line 46) | def _chat_stream( method _chat_no_stream (line 182) | def _chat_no_stream( method _continue_assistant_response (line 221) | def _continue_assistant_response( function _format_local_files (line 233) | def _format_local_files(messages: List[Message]) -> List[Message]: function _conv_fname (line 254) | def _conv_fname(fname: str) -> str: function rm_unsupported_modality (line 274) | def rm_unsupported_modality(messages: List[Message]) -> List[Message]: FILE: qwen_agent/llm/qwenvl_oai.py class QwenVLChatAtOAI (line 30) | class QwenVLChatAtOAI(TextChatAtOAI): method support_multimodal_input (line 33) | def support_multimodal_input(self) -> bool: method convert_messages_to_dicts (line 36) | def convert_messages_to_dicts(self, messages: List[Message]) -> List[d... function conv_multimodel_value (line 103) | def conv_multimodel_value(t, v): FILE: qwen_agent/llm/qwenvlo_dashscope.py class QwenVLoChatAtDS (line 8) | class QwenVLoChatAtDS(QwenVLChatAtDS): method support_multimodal_output (line 11) | def support_multimodal_output(self) -> bool: method __init__ (line 14) | def __init__(self, cfg: Optional[Dict] = None): FILE: qwen_agent/llm/schema.py class BaseModelCompatibleDict (line 37) | class BaseModelCompatibleDict(BaseModel): method __getitem__ (line 39) | def __getitem__(self, item): method __setitem__ (line 42) | def __setitem__(self, key, value): method model_dump (line 45) | def model_dump(self, **kwargs): method model_dump_json (line 50) | def model_dump_json(self, **kwargs): method get (line 55) | def get(self, key, default=None): method __str__ (line 65) | def __str__(self): class FunctionCall (line 69) | class FunctionCall(BaseModelCompatibleDict): method __init__ (line 73) | def __init__(self, name: str, arguments: str): method __repr__ (line 76) | def __repr__(self): class ContentItem (line 80) | class ContentItem(BaseModelCompatibleDict): method __init__ (line 87) | def __init__(self, method check_exclusivity (line 96) | def check_exclusivity(self): method __repr__ (line 113) | def __repr__(self): method get_type_and_value (line 116) | def get_type_and_value(self) -> Tuple[Literal['text', 'image', 'file',... method type (line 122) | def type(self) -> Literal['text', 'image', 'file', 'audio', 'video']: method value (line 127) | def value(self) -> str: class Message (line 132) | class Message(BaseModelCompatibleDict): method __init__ (line 140) | def __init__(self, method __repr__ (line 157) | def __repr__(self): method role_checker (line 161) | def role_checker(cls, value: str) -> str: FILE: qwen_agent/llm/transformers_llm.py class Transformers (line 28) | class Transformers(BaseFnCallModel): method __init__ (line 40) | def __init__(self, cfg: Optional[Dict] = None): method support_multimodal_input (line 74) | def support_multimodal_input(self) -> bool: method support_audio_input (line 78) | def support_audio_input(self) -> bool: method _get_streamer (line 81) | def _get_streamer(self): method _get_inputs (line 86) | def _get_inputs(self, messages: List[Message]): method _chat_stream (line 135) | def _chat_stream( method _chat_no_stream (line 169) | def _chat_no_stream( FILE: qwen_agent/log.py function setup_logger (line 19) | def setup_logger(level=None): FILE: qwen_agent/memory/memory.py class Memory (line 32) | class Memory(Agent): method __init__ (line 38) | def __init__(self, method _run (line 81) | def _run(self, messages: List[Message], lang: str = 'en', **kwargs) ->... method get_rag_files (line 146) | def get_rag_files(self, messages: List[Message]): FILE: qwen_agent/multi_agent_hub.py class MultiAgentHub (line 22) | class MultiAgentHub(ABC): method agents (line 25) | def agents(self) -> List[Agent]: method agent_names (line 44) | def agent_names(self) -> List[str]: method nonuser_agents (line 48) | def nonuser_agents(self): FILE: qwen_agent/tools/amap_weather.py class AmapWeather (line 24) | class AmapWeather(BaseTool): method __init__ (line 37) | def __init__(self, cfg: Optional[Dict] = None): method get_city_adcode (line 51) | def get_city_adcode(self, city_name): method call (line 59) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: qwen_agent/tools/base.py class ToolServiceError (line 27) | class ToolServiceError(Exception): method __init__ (line 29) | def __init__(self, function register_tool (line 44) | def register_tool(name, allow_overwrite=False): function is_tool_schema (line 62) | def is_tool_schema(obj: dict) -> bool: class BaseTool (line 109) | class BaseTool(ABC): method __init__ (line 114) | def __init__(self, cfg: Optional[dict] = None): method call (line 126) | def call(self, params: Union[str, dict], **kwargs) -> Union[str, list,... method _verify_json_format_args (line 140) | def _verify_json_format_args(self, params: Union[str, dict], strict_js... method function (line 165) | def function(self) -> dict: # Bad naming. It should be `function_info`. method name_for_human (line 175) | def name_for_human(self) -> str: method args_format (line 179) | def args_format(self) -> str: method file_access (line 189) | def file_access(self) -> bool: class BaseToolWithFileAccess (line 193) | class BaseToolWithFileAccess(BaseTool, ABC): method __init__ (line 195) | def __init__(self, cfg: Optional[Dict] = None): method file_access (line 202) | def file_access(self) -> bool: method call (line 205) | def call(self, params: Union[str, dict], files: List[str] = None, **kw... FILE: qwen_agent/tools/code_interpreter.py function _kill_kernels_and_containers (line 55) | def _kill_kernels_and_containers(_sig_num=None, _frame=None): class CodeInterpreter (line 81) | class CodeInterpreter(BaseToolWithFileAccess): method __init__ (line 94) | def __init__(self, cfg: Optional[Dict] = None): method args_format (line 105) | def args_format(self) -> str: method call (line 114) | def call(self, params: Union[str, dict], files: List[str] = None, time... method __del__ (line 157) | def __del__(self): method _build_docker_image (line 172) | def _build_docker_image(self): method _get_free_ports (line 203) | def _get_free_ports(self, n=5): method _start_kernel (line 215) | def _start_kernel(self, kernel_id: str): method _execute_code (line 342) | def _execute_code(self, kc, code: str) -> str: method _serve_image (line 396) | def _serve_image(self, image_base64: str) -> str: function _check_docker_availability (line 413) | def _check_docker_availability(): function _check_host_deps (line 446) | def _check_host_deps(): function _escape_ansi (line 457) | def _escape_ansi(line: str) -> str: class AnyThreadEventLoopPolicy (line 473) | class AnyThreadEventLoopPolicy(_BasePolicy): # type: ignore method get_event_loop (line 486) | def get_event_loop(self) -> asyncio.AbstractEventLoop: FILE: qwen_agent/tools/doc_parser.py class Chunk (line 32) | class Chunk(BaseModel): method __init__ (line 37) | def __init__(self, content: str, metadata: dict, token: int): method to_dict (line 40) | def to_dict(self) -> dict: class Record (line 44) | class Record(BaseModel): method __init__ (line 49) | def __init__(self, url: str, raw: List[Chunk], title: str): method to_dict (line 52) | def to_dict(self) -> dict: class DocParser (line 57) | class DocParser(BaseTool): method __init__ (line 70) | def __init__(self, cfg: Optional[Dict] = None): method call (line 80) | def call(self, params: Union[str, dict], **kwargs) -> dict: method split_doc_to_chunk (line 152) | def split_doc_to_chunk(self, method _get_last_part (line 275) | def _get_last_part(self, chunk: list) -> str: FILE: qwen_agent/tools/extract_doc_vocabulary.py class ExtractDocVocabulary (line 29) | class ExtractDocVocabulary(BaseTool): method __init__ (line 45) | def __init__(self, cfg: Optional[Dict] = None): method call (line 52) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: qwen_agent/tools/image_gen.py class ImageGen (line 24) | class ImageGen(BaseTool): method __init__ (line 39) | def __init__(self, cfg: Optional[Dict] = None): method call (line 47) | def call(self, params: Union[str, dict], **kwargs) -> List[ContentItem]: FILE: qwen_agent/tools/image_search.py function _new_getaddrinfo (line 38) | def _new_getaddrinfo(*args, **kwargs): class ImageResult (line 44) | class ImageResult(BaseModel): method __str__ (line 56) | def __str__(self): method __getitem__ (line 69) | def __getitem__(self, item): method __setitem__ (line 72) | def __setitem__(self, key, value): function serper_search (line 76) | def serper_search(image_url: str, check_accessibility: bool = True, max_... class ImageSearch (line 139) | class ImageSearch(BaseTool): method call (line 153) | def call(self, params: Union[str, dict], **kwargs) -> str: function check_image_url_accessibility (line 181) | def check_image_url_accessibility(url: str, timeout: int = 10) -> Tuple[... FILE: qwen_agent/tools/image_zoom_in_qwen3vl.py class ImageZoomInToolQwen3VL (line 32) | class ImageZoomInToolQwen3VL(BaseToolWithFileAccess): method round_by_factor (line 64) | def round_by_factor(self, number: int, factor: int) -> int: method ceil_by_factor (line 68) | def ceil_by_factor(self, number: int, factor: int) -> int: method floor_by_factor (line 72) | def floor_by_factor(self, number: int, factor: int) -> int: method smart_resize (line 76) | def smart_resize(self, method maybe_resize_bbox (line 95) | def maybe_resize_bbox(self, left, top, right, bottom, img_width, img_h... method call (line 128) | def call(self, params: Union[str, dict], **kwargs) -> List[ContentItem]: FILE: qwen_agent/tools/mcp_manager.py class MCPManager (line 31) | class MCPManager: method __new__ (line 34) | def __new__(cls, *args, **kwargs): method __init__ (line 39) | def __init__(self): method monkey_patch_mcp_create_platform_compatible_process (line 57) | def monkey_patch_mcp_create_platform_compatible_process(self): method start_loop (line 73) | def start_loop(self): method is_valid_mcp_servers (line 94) | def is_valid_mcp_servers(self, config: dict): method initConfig (line 139) | def initConfig(self, config: Dict): method init_config_async (line 152) | async def init_config_async(self, config: Dict): method create_tool_class (line 265) | def create_tool_class(self, register_name, register_client_id, tool_na... method shutdown (line 289) | def shutdown(self): class MCPClient (line 313) | class MCPClient: method __init__ (line 315) | def __init__(self): method connection_server (line 325) | async def connection_server(self, mcp_server_name, mcp_server): method reconnect (line 390) | async def reconnect(self): method execute_function (line 401) | async def execute_function(self, tool_name, tool_args: dict): method cleanup (line 463) | async def cleanup(self): function _cleanup_mcp (line 467) | def _cleanup_mcp(_sig_num=None, _frame=None): FILE: qwen_agent/tools/python_executor.py class GenericRuntime (line 34) | class GenericRuntime: method __init__ (line 39) | def __init__(self): method exec_code (line 46) | def exec_code(self, code_piece: str) -> None: method eval_code (line 51) | def eval_code(self, expr: str) -> Any: method inject (line 54) | def inject(self, var_dict: Dict[str, Any]) -> None: method answer (line 59) | def answer(self): class DateRuntime (line 63) | class DateRuntime(GenericRuntime): class CustomDict (line 72) | class CustomDict(dict): method __iter__ (line 74) | def __iter__(self): class ColorObjectRuntime (line 78) | class ColorObjectRuntime(GenericRuntime): function _check_deps_for_python_executor (line 82) | def _check_deps_for_python_executor(): class PythonExecutor (line 96) | class PythonExecutor(BaseTool): method __init__ (line 110) | def __init__(self, cfg: Optional[Dict] = None): method call (line 129) | def call(self, params: Union[str, dict], **kwargs) -> list: method apply (line 142) | def apply(self, code: str) -> list: method process_generation_to_code (line 145) | def process_generation_to_code(self, gens: str): method execute (line 149) | def execute( method truncate (line 183) | def truncate(s, max_length=256): method batch_apply (line 189) | def batch_apply(self, batch_code: List[str]) -> list: function _test (line 240) | def _test(): FILE: qwen_agent/tools/resource/code_interpreter_init_kernel.py function input (line 30) | def input(*args, **kwargs): # noqa function _m6_timout_handler (line 34) | def _m6_timout_handler(_signum=None, _frame=None): class _M6CountdownTimer (line 44) | class _M6CountdownTimer: method start (line 47) | def start(cls, timeout: int): method cancel (line 54) | def cancel(cls): FILE: qwen_agent/tools/retrieval.py function _check_deps_for_rag (line 25) | def _check_deps_for_rag(): class Retrieval (line 42) | class Retrieval(BaseTool): method __init__ (line 66) | def __init__(self, cfg: Optional[Dict] = None): method call (line 79) | def call(self, params: Union[str, dict], **kwargs) -> list: FILE: qwen_agent/tools/search_tools/base_search.py class RefMaterialOutput (line 27) | class RefMaterialOutput(BaseModel): method to_dict (line 32) | def to_dict(self) -> dict: class BaseSearch (line 39) | class BaseSearch(BaseTool): method __init__ (line 52) | def __init__(self, cfg: Optional[Dict] = None): method call (line 56) | def call(self, params: Union[str, dict], docs: List[Union[Record, str,... method search (line 89) | def search(self, query: str, docs: List[Record], max_ref_token: int = ... method sort_by_scores (line 94) | def sort_by_scores(self, query: str, docs: List[Record], **kwargs) -> ... method get_topk (line 107) | def get_topk(self, method format_docs (line 139) | def format_docs(self, docs: List[Union[Record, str, List[str]]]): method _get_the_front_part (line 166) | def _get_the_front_part(docs: List[Record], max_ref_token: int = DEFAU... FILE: qwen_agent/tools/search_tools/front_page_search.py class FrontPageSearch (line 28) | class FrontPageSearch(BaseSearch): method sort_by_scores (line 30) | def sort_by_scores(self, FILE: qwen_agent/tools/search_tools/hybrid_search.py class HybridSearch (line 25) | class HybridSearch(BaseSearch): method __init__ (line 27) | def __init__(self, cfg: Optional[Dict] = None): method sort_by_scores (line 35) | def sort_by_scores(self, query: str, docs: List[Record], **kwargs) -> ... FILE: qwen_agent/tools/search_tools/keyword_search.py class KeywordSearch (line 30) | class KeywordSearch(BaseSearch): method search (line 32) | def search(self, query: str, docs: List[Record], max_ref_token: int = ... method sort_by_scores (line 44) | def sort_by_scores(self, query: str, docs: List[Record], **kwargs) -> ... function clean_en_token (line 95) | def clean_en_token(token: str) -> str: function tokenize_and_filter (line 111) | def tokenize_and_filter(input_text: str) -> str: function string_tokenizer (line 132) | def string_tokenizer(text: str) -> List[str]: function split_text_into_keywords (line 159) | def split_text_into_keywords(text: str) -> List[str]: function parse_keyword (line 169) | def parse_keyword(text): FILE: qwen_agent/tools/search_tools/vector_search.py class VectorSearch (line 25) | class VectorSearch(BaseSearch): method sort_by_scores (line 28) | def sort_by_scores(self, query: str, docs: List[Record], **kwargs) -> ... FILE: qwen_agent/tools/simple_doc_parser.py function clean_paragraph (line 32) | def clean_paragraph(text): class DocParserError (line 39) | class DocParserError(Exception): method __init__ (line 41) | def __init__(self, function parse_word (line 59) | def parse_word(docx_path: str, extract_image: bool = False): function parse_ppt (line 80) | def parse_ppt(path: str, extract_image: bool = False): function parse_txt (line 116) | def parse_txt(path: str): function df_to_md (line 127) | def df_to_md(df) -> str: function parse_excel (line 150) | def parse_excel(file_path: str, extract_image: bool = False) -> List[dict]: function parse_csv (line 166) | def parse_csv(file_path: str, extract_image: bool = False) -> List[dict]: function parse_tsv (line 184) | def parse_tsv(file_path: str, extract_image: bool = False) -> List[dict]: function parse_html_bs (line 202) | def parse_html_bs(path: str, extract_image: bool = False): function parse_pdf (line 240) | def parse_pdf(pdf_path: str, extract_image: bool = False) -> List[dict]: function postprocess_page_content (line 292) | def postprocess_page_content(page_content: list) -> list: function get_font (line 330) | def get_font(element): function extract_tables (line 349) | def extract_tables(pdf, page_num): function table_converter (line 355) | def table_converter(table): function get_plain_doc (line 371) | def get_plain_doc(doc: list): class SimpleDocParser (line 382) | class SimpleDocParser(BaseTool): method __init__ (line 395) | def __init__(self, cfg: Optional[Dict] = None): method call (line 403) | def call(self, params: Union[str, dict], **kwargs) -> Union[str, list]: FILE: qwen_agent/tools/storage.py class KeyNotExistsError (line 23) | class KeyNotExistsError(ValueError): class Storage (line 28) | class Storage(BaseTool): method __init__ (line 53) | def __init__(self, cfg: Optional[Dict] = None): method call (line 58) | def call(self, params: Union[str, dict], **kwargs) -> str: method put (line 75) | def put(self, key: str, value: str, path: Optional[str] = None) -> str: method get (line 88) | def get(self, key: str, path: Optional[str] = None) -> str: method delete (line 94) | def delete(self, key, path: Optional[str] = None) -> str: method scan (line 103) | def scan(self, key: str, path: Optional[str] = None) -> str: FILE: qwen_agent/tools/web_extractor.py class WebExtractor (line 22) | class WebExtractor(BaseTool): method call (line 35) | def call(self, params: Union[str, dict], **kwargs) -> str: FILE: qwen_agent/tools/web_search.py class WebSearch (line 27) | class WebSearch(BaseTool): method call (line 40) | def call(self, params: Union[str, dict], **kwargs) -> str: method search (line 49) | def search(query: str) -> List[Any]: method _format_results (line 62) | def _format_results(search_results: List[Any]) -> str: FILE: qwen_agent/utils/output_beautify.py function typewriter_print (line 28) | def typewriter_print(messages: List[dict], text: str) -> str: function multimodal_typewriter_print (line 51) | def multimodal_typewriter_print(messages: List[dict], text: str = '') ->... FILE: qwen_agent/utils/parallel_executor.py function parallel_exec (line 21) | def parallel_exec( function serial_exec (line 58) | def serial_exec(fn: Callable, list_of_kwargs: List[dict]) -> List[Any]: FILE: qwen_agent/utils/str_processing.py function rm_newlines (line 20) | def rm_newlines(text): function rm_cid (line 31) | def rm_cid(text): function rm_hexadecimal (line 36) | def rm_hexadecimal(text): function rm_continuous_placeholders (line 41) | def rm_continuous_placeholders(text): FILE: qwen_agent/utils/tokenization_qwen.py function _load_tiktoken_bpe (line 49) | def _load_tiktoken_bpe(tiktoken_bpe_file: str) -> Dict[bytes, int]: class QWenTokenizer (line 57) | class QWenTokenizer: method __init__ (line 62) | def __init__( method __getstate__ (line 112) | def __getstate__(self): method __setstate__ (line 118) | def __setstate__(self, state): method __len__ (line 129) | def __len__(self) -> int: method get_vocab (line 132) | def get_vocab(self) -> Dict[bytes, int]: method convert_tokens_to_ids (line 135) | def convert_tokens_to_ids(self, tokens: Union[bytes, str, List[Union[b... method tokenize (line 149) | def tokenize( method convert_tokens_to_string (line 179) | def convert_tokens_to_string(self, tokens: List[Union[bytes, str]]) ->... method vocab_size (line 200) | def vocab_size(self): method _decode (line 203) | def _decode( method encode (line 215) | def encode(self, text: str) -> List[int]: method count_tokens (line 218) | def count_tokens(self, text: str) -> int: method truncate (line 221) | def truncate(self, text: str, max_token: int, start_token: int = 0, ke... function count_tokens (line 245) | def count_tokens(text: str) -> int: FILE: qwen_agent/utils/utils.py function append_signal_handler (line 41) | def append_signal_handler(sig, handler): function get_local_ip (line 67) | def get_local_ip() -> str: function hash_sha256 (line 80) | def hash_sha256(text: str) -> str: function print_traceback (line 86) | def print_traceback(is_error: bool = True): function has_chinese_chars (line 97) | def has_chinese_chars(data: Any) -> bool: function has_chinese_messages (line 102) | def has_chinese_messages(messages: List[Union[Message, dict]], check_rol... function get_basename_from_url (line 110) | def get_basename_from_url(path_or_url: str) -> str: function is_http_url (line 130) | def is_http_url(path_or_url: str) -> bool: function is_image (line 136) | def is_image(path_or_url: str) -> bool: function sanitize_chrome_file_path (line 144) | def sanitize_chrome_file_path(file_path: str) -> str: function sanitize_windows_file_path (line 158) | def sanitize_windows_file_path(file_path: str) -> str: function save_url_to_local_work_dir (line 184) | def save_url_to_local_work_dir(url: str, save_dir: str, save_filename: s... function save_text_to_file (line 211) | def save_text_to_file(path: str, text: str) -> None: function read_text_from_file (line 216) | def read_text_from_file(path: str) -> str: function contains_html_tags (line 228) | def contains_html_tags(text: str) -> bool: function get_content_type_by_head_request (line 233) | def get_content_type_by_head_request(path: str) -> str: function get_file_type (line 242) | def get_file_type(path: str) -> Literal['pdf', 'docx', 'pptx', 'txt', 'h... function extract_urls (line 274) | def extract_urls(text: str) -> List[str]: function extract_markdown_urls (line 280) | def extract_markdown_urls(md_text: str) -> List[str]: function extract_code (line 286) | def extract_code(text: str) -> str: function json_loads (line 300) | def json_loads(text: str) -> dict: class PydanticJSONEncoder (line 313) | class PydanticJSONEncoder(json.JSONEncoder): method default (line 315) | def default(self, obj): function json_dumps_pretty (line 321) | def json_dumps_pretty(obj: dict, ensure_ascii=False, indent=2, **kwargs)... function json_dumps_compact (line 325) | def json_dumps_compact(obj: dict, ensure_ascii=False, indent=None, **kwa... function format_as_multimodal_message (line 329) | def format_as_multimodal_message( function format_as_text_message (line 427) | def format_as_text_message( function save_audio_to_file (line 445) | def save_audio_to_file(base_64: str, file_name: str): function extract_text_from_message (line 451) | def extract_text_from_message( function extract_files_from_messages (line 465) | def extract_files_from_messages(messages: List[Message], include_images:... function extract_images_from_messages (line 477) | def extract_images_from_messages(messages: List[Message]) -> List[str]: function merge_generate_cfgs (line 487) | def merge_generate_cfgs(base_generate_cfg: Optional[dict], new_generate_... function build_text_completion_prompt (line 500) | def build_text_completion_prompt( function encode_image_as_base64 (line 553) | def encode_image_as_base64(path: str, max_short_side_length: int = -1) -... function encode_audio_as_base64 (line 568) | def encode_audio_as_base64(path: str) -> str: function encode_video_as_base64 (line 573) | def encode_video_as_base64(path: str) -> str: function load_image_from_base64 (line 578) | def load_image_from_base64(image_base64: Union[bytes, str]): function resize_image (line 585) | def resize_image(img, short_side_length: int = 1080): function get_last_usr_msg_idx (line 602) | def get_last_usr_msg_idx(messages: List[Union[dict, Message]]) -> int: function rm_default_system (line 611) | def rm_default_system(messages: List[Message]) -> List[Message]: FILE: qwen_server/assistant_server.py function add_text (line 60) | def add_text(history, text): function rm_text (line 65) | def rm_text(history): function set_url (line 75) | def set_url(): function bot (line 87) | def bot(history): function init_chatbot (line 109) | def init_chatbot(): function clear_session (line 122) | def clear_session(): FILE: qwen_server/database_server.py function update_pop_url (line 71) | def update_pop_url(url: str): function change_checkbox_state (line 82) | def change_checkbox_state(key): function cache_page (line 91) | def cache_page(**kwargs): function web_listening (line 116) | async def web_listening(request: Request): FILE: qwen_server/js/main.js function autoTriggerFunction (line 22) | function autoTriggerFunction() { function scrollTextboxToBottom (line 38) | function scrollTextboxToBottom() { FILE: qwen_server/output_beautify.py function extract_obs (line 26) | def extract_obs(text): function format_answer (line 33) | def format_answer(text): FILE: qwen_server/schema.py class PathConfig (line 18) | class PathConfig(BaseModel): class ServerConfig (line 24) | class ServerConfig(BaseModel): class Config (line 35) | class Config: class GlobalConfig (line 39) | class GlobalConfig(BaseModel): FILE: qwen_server/utils.py function save_browsing_meta_data (line 22) | def save_browsing_meta_data(url: str, title: str, meta_file: str): function rm_browsing_meta_data (line 40) | def rm_browsing_meta_data(url: str, meta_file: str): function read_meta_data_by_condition (line 53) | def read_meta_data_by_condition(meta_file: str, **kwargs): function save_history (line 85) | def save_history(history, url, history_dir): function read_history (line 94) | def read_history(url, history_dir): FILE: qwen_server/workstation_server.py function add_text (line 73) | def add_text(history, text): function pure_add_text (line 79) | def pure_add_text(history, text): function rm_text (line 85) | def rm_text(history): function chat_clear (line 95) | def chat_clear(): function chat_clear_pure (line 100) | def chat_clear_pure(): function chat_clear_last (line 105) | def chat_clear_last(): function pure_chat_clear_last (line 111) | def pure_chat_clear_last(): function add_file (line 117) | def add_file(file, chosen_plug): function update_app_global_para (line 142) | def update_app_global_para(date1, date2): function refresh_date (line 147) | def refresh_date(): function update_browser_list (line 153) | def update_browser_list(): function layout_to_right (line 173) | def layout_to_right(text): function download_text (line 177) | def download_text(text): function choose_plugin (line 189) | def choose_plugin(chosen_plugin): function pure_bot (line 198) | def pure_bot(history): function keep_only_files_for_name (line 226) | def keep_only_files_for_name(messages, name): function bot (line 245) | def bot(history, chosen_plug): function get_last_one_line_context (line 312) | def get_last_one_line_context(text): function generate (line 323) | def generate(context): function format_generate (line 387) | def format_generate(edit, context): FILE: run_server.py function parse_args (line 26) | def parse_args(): function update_config (line 80) | def update_config(server_config, args, server_config_path): function main (line 97) | def main(): FILE: setup.py function get_version (line 20) | def get_version() -> str: function read_description (line 30) | def read_description() -> str: FILE: tests/agents/test_article_agent.py function test_article_agent_full_article (line 21) | def test_article_agent_full_article(): FILE: tests/agents/test_assistant.py function test_assistant_system_and_tool (line 19) | def test_assistant_system_and_tool(): function test_assistant_files (line 36) | def test_assistant_files(): function test_assistant_empty_query (line 53) | def test_assistant_empty_query(): function test_assistant_vl (line 69) | def test_assistant_vl(): FILE: tests/agents/test_custom_tool_object.py class MyImageGen (line 24) | class MyImageGen(BaseTool): method call (line 34) | def call(self, params: str, **kwargs) -> str: function init_agent_service (line 40) | def init_agent_service(): function test_custom_tool_object (line 50) | def test_custom_tool_object(): FILE: tests/agents/test_doc_qa.py function test_doc_qa (line 18) | def test_doc_qa(): FILE: tests/agents/test_parallel_qa.py function test_parallel_qa (line 18) | def test_parallel_qa(): FILE: tests/agents/test_react_chat.py function test_react_chat (line 23) | def test_react_chat(): function test_react_chat_with_file (line 39) | def test_react_chat_with_file(): FILE: tests/agents/test_router.py function test_router (line 19) | def test_router(): FILE: tests/examples/test_examples.py function test_assistant_add_custom_tool (line 40) | def test_assistant_add_custom_tool(query): function test_assistant_weather_bot (line 46) | def test_assistant_weather_bot(query, file): function test_llm_vl_mix_text (line 50) | def test_llm_vl_mix_text(): function test_visual_storytelling (line 56) | def test_visual_storytelling(query, image): function test_function_calling (line 60) | def test_function_calling(): function test_parallel_function_calling (line 64) | def test_parallel_function_calling(): function test_react_data_analysis (line 78) | def test_react_data_analysis(query, file): function test_llm_riddles (line 82) | def test_llm_riddles(): function test_multi_agent_router (line 89) | def test_multi_agent_router(query, image, file): function test_group_chat_chess (line 94) | def test_group_chat_chess(query): function test_group_chat_demo (line 98) | def test_group_chat_demo(): function test_qwen2vl_assistant_tooluse (line 102) | def test_qwen2vl_assistant_tooluse(): function test_video_understanding (line 106) | def test_video_understanding(): FILE: tests/examples/test_long_dialogue.py function test_long_dialogue (line 24) | def test_long_dialogue(): FILE: tests/examples/test_vm_qa.py function test_vm (line 24) | def test_vm(): FILE: tests/llm/test_continue.py function test_continue (line 33) | def test_continue(stream, delta_stream, llm_cfg): FILE: tests/llm/test_dashscope.py function test_vl_mix_text (line 41) | def test_vl_mix_text(functions, stream, delta_stream): function test_llm_dashscope (line 69) | def test_llm_dashscope(functions, stream, delta_stream): function test_llm_retry_failure (line 94) | def test_llm_retry_failure(stream, delta_stream): FILE: tests/llm/test_function_content.py function test_function_content (line 35) | def test_function_content(cfg, gen_cfg1, gen_cfg2): FILE: tests/llm/test_oai.py function test_llm_oai (line 41) | def test_llm_oai(functions, stream, delta_stream): FILE: tests/memory/test_memory.py function test_memory (line 25) | def test_memory(): FILE: tests/qwen_server/test_database_server.py function test_database_server (line 25) | def test_database_server(): FILE: tests/tools/test_doc_parser.py function test_doc_parser (line 18) | def test_doc_parser(): FILE: tests/tools/test_hybrid_search.py function test_hybrid_search (line 18) | def test_hybrid_search(): FILE: tests/tools/test_keyword_search.py function test_keyword_search (line 18) | def test_keyword_search(): FILE: tests/tools/test_simple_doc_parser.py function test_simple_doc_parser (line 18) | def test_simple_doc_parser(): FILE: tests/tools/test_tools.py function test_amap_weather (line 24) | def test_amap_weather(params): function test_code_interpreter (line 29) | def test_code_interpreter(): function test_image_gen (line 34) | def test_image_gen(): function test_retrieval (line 39) | def test_retrieval(): function test_storage_put (line 48) | def test_storage_put(operate): function test_storage_scan (line 56) | def test_storage_scan(operate): function test_storage_get_delete (line 64) | def test_storage_get_delete(operate): FILE: tests/tools/test_vector_search.py function test_vector_search (line 18) | def test_vector_search():