code
stringlengths
17
6.64M
class FedExShipManagerManageShipment(VirtualFunctionTool): name = 'FedExShipManagerManageShipment' summary = 'Manages shipments, including redirecting, rescheduling pickup, returning to sender, and cancelling.' parameters: List[ArgParameter] = [{'name': 'shipment_id', 'type': 'string', 'description': 'The...
class FedExShipManagerSearchShipment(VirtualFunctionTool): name = 'FedExShipManagerSearchShipment' summary = "Searches for User's existing shipments." parameters: List[ArgParameter] = [{'name': 'search_term', 'type': 'string', 'description': 'The term to search for in the shipment details.', 'required': T...
class FedExShipManagerSearchSavedAddresses(VirtualFunctionTool): name = 'FedExShipManagerSearchSavedAddresses' summary = "Searches for user's saved addresses and contact numbers." parameters: List[ArgParameter] = [{'name': 'search_term', 'type': 'string', 'description': 'The term to search for in the addr...
@register_toolkit() class FedExShipManager(FunctionToolkit): name_for_human = 'FedEx Ship Manager' description_for_human = 'Toolkit for automating shipping processes.' name_for_model = 'FedExShipManager' description_for_model = 'The FedExShipManager toolkit provides functionalities for automating ship...
class InventoryManagementSystemAddItem(VirtualFunctionTool): name = 'InventoryManagementSystemAddItem' summary = 'Add a new item to the inventory.' parameters: List[ArgParameter] = [{'name': 'item_name', 'type': 'string', 'description': 'The name of the item, must be a non-empty string.', 'required': True...
class InventoryManagementSystemUpdateItem(VirtualFunctionTool): name = 'InventoryManagementSystemUpdateItem' summary = 'Update an existing item in the inventory.' parameters: List[ArgParameter] = [{'name': 'item_id', 'type': 'string', 'description': 'The unique identifier of the item, must be a non-empty ...
class InventoryManagementSystemDeleteItem(VirtualFunctionTool): name = 'InventoryManagementSystemDeleteItem' summary = 'Delete an item from the inventory.' parameters: List[ArgParameter] = [{'name': 'item_id', 'type': 'string', 'description': 'The unique identifier of the item, must be a non-empty string....
class InventoryManagementSystemSearchItems(VirtualFunctionTool): name = 'InventoryManagementSystemSearchItems' summary = 'Search for items in the inventory by keyword or category.' parameters: List[ArgParameter] = [{'name': 'keyword', 'type': 'string', 'description': 'The keyword to search for in the item...
class InventoryManagementSystemGetItemDetails(VirtualFunctionTool): name = 'InventoryManagementSystemGetItemDetails' summary = 'Get detailed information about an item in the inventory.' parameters: List[ArgParameter] = [{'name': 'item_id', 'type': 'string', 'description': 'The unique identifier of the ite...
class InventoryManagementSystemTrackInventory(VirtualFunctionTool): name = 'InventoryManagementSystemTrackInventory' summary = 'Track inventory levels and receive notifications when stock levels are low.' parameters: List[ArgParameter] = [{'name': 'threshold', 'type': 'integer', 'description': 'The stock ...
class InventoryManagementSystemSetupAlert(VirtualFunctionTool): name = 'InventoryManagementSystemSetupAlert' summary = 'Set up an alert for a specific item or category when the stock reaches a certain threshold.' parameters: List[ArgParameter] = [{'name': 'alert_id', 'type': 'string', 'description': 'The ...
class InventoryManagementSystemSearchSuppliers(VirtualFunctionTool): name = 'InventoryManagementSystemSearchSuppliers' summary = 'Search for suppliers by keyword.' parameters: List[ArgParameter] = [{'name': 'keyword', 'type': 'string', 'description': 'The keyword to search for in the supplier name, must b...
class InventoryManagementSystemListCategories(VirtualFunctionTool): name = 'InventoryManagementSystemListCategories' summary = 'List available categories in the inventory.' parameters: List[ArgParameter] = [{'name': 'page', 'type': 'integer', 'description': 'The page number to retrieve, must be a positive...
@register_toolkit() class InventoryManagementSystem(FunctionToolkit): name_for_human = 'Inventory Management System' description_for_human = 'Toolkit for managing inventory and stock levels.' name_for_model = 'InventoryManagementSystem' description_for_model = 'An inventory management system that stre...
class CiscoUmbrellaBlockDomain(VirtualFunctionTool): name = 'CiscoUmbrellaBlockDomain' summary = 'Block access to a specific domain.' parameters: List[ArgParameter] = [{'name': 'domain', 'type': 'string', 'description': 'The domain to be blocked.', 'required': True}] returns: List[ArgReturn] = [{'name...
class CiscoUmbrellaUnblockDomain(VirtualFunctionTool): name = 'CiscoUmbrellaUnblockDomain' summary = 'Unblock access to a specific domain.' parameters: List[ArgParameter] = [{'name': 'domain', 'type': 'string', 'description': 'The domain to be unblocked.', 'required': True}] returns: List[ArgReturn] =...
class CiscoUmbrellaVerifyDomain(VirtualFunctionTool): name = 'CiscoUmbrellaVerifyDomain' summary = 'Verify a domain by checking if it is safe.' parameters: List[ArgParameter] = [{'name': 'domain', 'type': 'string', 'description': 'The domain to be verified.', 'required': True}] returns: List[ArgReturn...
class CiscoUmbrellaSearchThreats(VirtualFunctionTool): name = 'CiscoUmbrellaSearchThreats' summary = 'Search for potential threats based on a keyword or domain.' parameters: List[ArgParameter] = [{'name': 'keyword', 'type': 'string', 'description': 'The keyword or domain to search for threats.', 'required...
class CiscoUmbrellaGetThreatDetails(VirtualFunctionTool): name = 'CiscoUmbrellaGetThreatDetails' summary = 'Get detailed information about a specific threat.' parameters: List[ArgParameter] = [{'name': 'threat_id', 'type': 'string', 'description': 'The unique identifier of the threat.', 'required': True}]...
class CiscoUmbrellaSearchPolicy(VirtualFunctionTool): name = 'CiscoUmbrellaSearchPolicy' summary = 'Search for security policies based on a keyword.' parameters: List[ArgParameter] = [{'name': 'keyword', 'type': 'string', 'description': 'The keyword to search for policies.', 'required': True}, {'name': 't...
class CiscoUmbrellaCreatePolicy(VirtualFunctionTool): name = 'CiscoUmbrellaCreatePolicy' summary = 'Create a new security policy.' parameters: List[ArgParameter] = [{'name': 'policy_name', 'type': 'string', 'description': 'The name of the policy.', 'required': True}, {'name': 'policy_description', 'type':...
class CiscoUmbrellaUpdatePolicy(VirtualFunctionTool): name = 'CiscoUmbrellaUpdatePolicy' summary = 'Update an existing security policy.' parameters: List[ArgParameter] = [{'name': 'policy_id', 'type': 'string', 'description': 'The unique identifier of the policy to be updated.', 'required': True}, {'name'...
class CiscoUmbrellaDeletePolicy(VirtualFunctionTool): name = 'CiscoUmbrellaDeletePolicy' summary = 'Delete an existing security policy.' parameters: List[ArgParameter] = [{'name': 'policy_id', 'type': 'string', 'description': 'The unique identifier of the policy to be deleted.', 'required': True}] ret...
class CiscoUmbrellaGetPolicyDetails(VirtualFunctionTool): name = 'CiscoUmbrellaGetPolicyDetails' summary = 'Get detailed information about a specific security policy.' parameters: List[ArgParameter] = [{'name': 'policy_id', 'type': 'string', 'description': 'The unique identifier of the policy.', 'required...
class CiscoUmbrellaSearchLogs(VirtualFunctionTool): name = 'CiscoUmbrellaSearchLogs' summary = 'Search for security logs based on a keyword, date range, or event type.' parameters: List[ArgParameter] = [{'name': 'keyword', 'type': 'string', 'description': 'The keyword to search for logs.', 'required': Fal...
class CiscoUmbrellaGetLogDetails(VirtualFunctionTool): name = 'CiscoUmbrellaGetLogDetails' summary = 'Get detailed information about a specific security log.' parameters: List[ArgParameter] = [{'name': 'log_id', 'type': 'string', 'description': 'The unique identifier of the log.', 'required': True}] r...
class CiscoUmbrellaGenerateReport(VirtualFunctionTool): name = 'CiscoUmbrellaGenerateReport' summary = 'Generate a security report based on a date range and report type.' parameters: List[ArgParameter] = [{'name': 'start_date', 'type': 'string', 'description': "The start date of the date range for the rep...
@register_toolkit() class CiscoUmbrella(FunctionToolkit): name_for_human = 'Cisco Umbrella' description_for_human = 'Toolkit for managing a cloud security platform.' name_for_model = 'CiscoUmbrella' description_for_model = 'The CiscoUmbrella toolkit provides a suite of tools for managing a cloud secur...
class GitHubSearchRepositories(VirtualFunctionTool): name = 'GitHubSearchRepositories' summary = 'Search for repositories by keywords and scope. The user can search all repositories on Github, owned repositories, or member repositories. When the keywords are not provided, the user can search for all repositor...
class GitHubGetRepositoryDetails(VirtualFunctionTool): name = 'GitHubGetRepositoryDetails' summary = 'Retrieve repository details, including issues, branches.' parameters: List[ArgParameter] = [{'name': 'repo_id', 'type': 'string', 'description': 'The unique identifier of the repository.', 'required': Tru...
class GitHubCreateRepository(VirtualFunctionTool): name = 'GitHubCreateRepository' summary = "Create a repository in the user's account." parameters: List[ArgParameter] = [{'name': 'name', 'type': 'string', 'description': 'The name of the repository.', 'required': True}, {'name': 'visibility', 'type': 'st...
class GitHubDeleteRepository(VirtualFunctionTool): name = 'GitHubDeleteRepository' summary = 'Delete a user owned repository. Only valid if the user owns the repository.' parameters: List[ArgParameter] = [{'name': 'repo_id', 'type': 'string', 'description': 'The unique identifier of the repository.', 'req...
class GitHubUpdateRespository(VirtualFunctionTool): name = 'GitHubUpdateRespository' summary = "Update a user owned repository's name, description, or visibility. Only valid if the user owns the repository." parameters: List[ArgParameter] = [{'name': 'repo_id', 'type': 'string', 'description': 'The unique...
class GitHubPostIssue(VirtualFunctionTool): name = 'GitHubPostIssue' summary = 'Create issues in a repository.' parameters: List[ArgParameter] = [{'name': 'repo_id', 'type': 'string', 'description': 'The unique identifier of the repository.', 'required': True}, {'name': 'title', 'type': 'string', 'descrip...
class GitHubSearchIssues(VirtualFunctionTool): name = 'GitHubSearchIssues' summary = 'Search for issues in a repository by keywords.' parameters: List[ArgParameter] = [{'name': 'repo_id', 'type': 'string', 'description': 'The unique identifier of the repository.', 'required': True}, {'name': 'keywords', '...
class GitHubReadIssue(VirtualFunctionTool): name = 'GitHubReadIssue' summary = 'Retrieve issue details in a repository.' parameters: List[ArgParameter] = [{'name': 'repo_id', 'type': 'string', 'description': 'The unique identifier of the repository.', 'required': True}, {'name': 'issue_id', 'type': 'strin...
class GitHubManageCollaborator(VirtualFunctionTool): name = 'GitHubManageCollaborator' summary = 'Add or remove repository collaborators. Only valid if the user owns the repository.' parameters: List[ArgParameter] = [{'name': 'repo_id', 'type': 'string', 'description': 'The unique identifier of the reposi...
class GitHubSearchUsers(VirtualFunctionTool): name = 'GitHubSearchUsers' summary = 'Search for users by keywords.' parameters: List[ArgParameter] = [{'name': 'keywords', 'type': 'string', 'description': 'The keywords to search for in the users.', 'required': True}, {'name': 'max_results', 'type': 'integer...
class GitHubGetUserDetails(VirtualFunctionTool): name = 'GitHubGetUserDetails' summary = 'Retrieve user details.' parameters: List[ArgParameter] = [{'name': 'username', 'type': 'string', 'description': 'The username of the user.', 'required': True}] returns: List[ArgReturn] = [{'name': 'details', 'typ...
@register_toolkit() class GitHub(FunctionToolkit): name_for_human = 'GitHub' description_for_human = 'Toolkit for managing GitHub repositories and user details.' name_for_model = 'GitHub' description_for_model = 'A toolkit for managing GitHub repositories, including searching for repositories, retriev...
class SpokeoSearchPeople(VirtualFunctionTool): name = 'SpokeoSearchPeople' summary = 'Search for people by name, email, phone number, or address.' parameters: List[ArgParameter] = [{'name': 'search_term', 'type': 'string', 'description': 'The search term.', 'required': True}, {'name': 'search_type', 'type...
class SpokeoGetPersonDetails(VirtualFunctionTool): name = 'SpokeoGetPersonDetails' summary = 'Retrieve personal data for a specific person using their unique identifier.' parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The unique identifier of the person, must be ...
class SpokeoBackgroundCheck(VirtualFunctionTool): name = 'SpokeoBackgroundCheck' summary = 'Perform a background check on a person using their unique identifier.' parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The unique identifier of the person, must be a valid ...
class SpokeoVerifyIdentity(VirtualFunctionTool): name = 'SpokeoVerifyIdentity' summary = "Verify a person's identity using their unique identifier and provided data." parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The unique identifier of the person, must be a va...
class SpokeoMonitorDataChanges(VirtualFunctionTool): name = 'SpokeoMonitorDataChanges' summary = "Monitor changes in a person's personal data using their unique identifier." parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The unique identifier of the person, must ...
class SpokeoGetHistoricalData(VirtualFunctionTool): name = 'SpokeoGetHistoricalData' summary = 'Retrieve historical data on a person using their unique identifier.' parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The unique identifier of the person, must be a vali...
class SpokeoAccessCourtRecords(VirtualFunctionTool): name = 'SpokeoAccessCourtRecords' summary = 'Access court records for a person using their unique identifier.' parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The unique identifier of the person, must be a valid...
class SpokeoGetCriminalHistory(VirtualFunctionTool): name = 'SpokeoGetCriminalHistory' summary = "Retrieve a person's criminal history using their unique identifier." parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The unique identifier of the person, must be a va...
class SpokeoReversePhoneLookup(VirtualFunctionTool): name = 'SpokeoReversePhoneLookup' summary = 'Perform a reverse phone lookup using a phone number.' parameters: List[ArgParameter] = [{'name': 'phone_number', 'type': 'string', 'description': 'The phone number to look up, must be a valid phone number.', ...
class SpokeoDownloadPublicRecord(VirtualFunctionTool): name = 'SpokeoDownloadPublicRecord' summary = 'Download a specific public record for a person using their unique identifier and the record identifier.' parameters: List[ArgParameter] = [{'name': 'unique_id', 'type': 'string', 'description': 'The uniqu...
@register_toolkit() class Spokeo(FunctionToolkit): name_for_human = 'Spokeo' description_for_human = 'Toolkit for searching and retrieving personal data from various sources.' name_for_model = 'Spokeo' description_for_model = 'A people search engine that provides access to personal data from public re...
class EpicFHIRSearchPatients(VirtualFunctionTool): name = 'EpicFHIRSearchPatients' summary = "Search for patients by patient's name, ID, or other information (such as demographic information or disease)" parameters: List[ArgParameter] = [{'name': 'search_term', 'type': 'string', 'description': "The search...
class EpicFHIRGetPatientDetails(VirtualFunctionTool): name = 'EpicFHIRGetPatientDetails' summary = 'Retrieve patient demographics and clinical data, such as medications, allergies, and conditions.' parameters: List[ArgParameter] = [{'name': 'patient_id', 'type': 'string', 'description': 'The unique identi...
class EpicFHIRSearchDoctors(VirtualFunctionTool): name = 'EpicFHIRSearchDoctors' summary = "Search for doctors by doctor's name, ID, or specialty." parameters: List[ArgParameter] = [{'name': 'search_term', 'type': 'string', 'description': "The search term to use for finding doctors, it can be a doctor's n...
class EpicFHIRManageClinicalDocuments(VirtualFunctionTool): name = 'EpicFHIRManageClinicalDocuments' summary = 'List, create, update, and delete clinical documents, such as discharge summaries and progress notes.' parameters: List[ArgParameter] = [{'name': 'patient_id', 'type': 'string', 'description': 'T...
class EpicFHIRManageAppointments(VirtualFunctionTool): name = 'EpicFHIRManageAppointments' summary = 'List, access, create, update, and delete patient appointments.' parameters: List[ArgParameter] = [{'name': 'patient_id', 'type': 'string', 'description': 'The unique identifier of the patient. The identif...
class EpicFHIRManagePatientRecords(VirtualFunctionTool): name = 'EpicFHIRManagePatientRecords' summary = 'List, create, update, and delete patient records.' parameters: List[ArgParameter] = [{'name': 'patient_id', 'type': 'string', 'description': 'The unique identifier of the patient. The identifier shoul...
class EpicFHIRManageDiagnosticReports(VirtualFunctionTool): name = 'EpicFHIRManageDiagnosticReports' summary = 'List, access, and manage patient diagnostic reports.' parameters: List[ArgParameter] = [{'name': 'patient_id', 'type': 'string', 'description': 'The unique identifier of the patient. The identif...
class EpicFHIRDownloadFiles(VirtualFunctionTool): name = 'EpicFHIRDownloadFiles' summary = 'Download files by their unique identifiers.' parameters: List[ArgParameter] = [{'name': 'file_ids', 'type': 'array', 'description': "The unique identifiers of the files to download. Each should be a valid 'document...
@register_toolkit() class EpicFHIR(FunctionToolkit): name_for_human = 'Epic FHIR' description_for_human = 'Toolkit for managing and sharing patient data in healthcare organizations.' name_for_model = 'EpicFHIR' description_for_model = 'The EpicFHIR toolkit provides a comprehensive set of tools for hea...
class TrafficControlSearchLocations(VirtualFunctionTool): name = 'TrafficControlSearchLocations' summary = 'Searches for locations (roads or intersections) by name.' parameters: List[ArgParameter] = [{'name': 'location_name', 'type': 'string', 'description': 'The name of the location to search for.', 'req...
class TrafficControlGetRoadDetails(VirtualFunctionTool): name = 'TrafficControlGetRoadDetails' summary = 'Gets the details of a road by its unique identifier.' parameters: List[ArgParameter] = [{'name': 'road_id', 'type': 'string', 'description': 'The unique identifier of the road to get details for.', 'r...
class TrafficControlGetIntersectionDetails(VirtualFunctionTool): name = 'TrafficControlGetIntersectionDetails' summary = 'Gets the details of an intersection by its unique identifier.' parameters: List[ArgParameter] = [{'name': 'intersection_id', 'type': 'string', 'description': 'The unique identifier of ...
class TrafficControlSearchRoute(VirtualFunctionTool): name = 'TrafficControlSearchRoute' summary = 'Searches for the optimal route between an origin and a destination.' parameters: List[ArgParameter] = [{'name': 'origin_id', 'type': 'string', 'description': 'The unique identifier of the origin location (r...
class TrafficControlCheckTrafficLightsStates(VirtualFunctionTool): name = 'TrafficControlCheckTrafficLightsStates' summary = 'Checks the current states of traffic lights (including both vehicle and pedestrian lights) at a specific intersection.' parameters: List[ArgParameter] = [{'name': 'intersection_id'...
class TrafficControlManageTrafficLightState(VirtualFunctionTool): name = 'TrafficControlManageTrafficLightState' summary = 'Changes the state of a traffic light at a specific intersection, either immediately, or at a scheduled time.' parameters: List[ArgParameter] = [{'name': 'intersection_id', 'type': 's...
class TrafficControlMonitorTrafficCongestion(VirtualFunctionTool): name = 'TrafficControlMonitorTrafficCongestion' summary = 'Monitors the traffic congestion level on a specific road or intersection.' parameters: List[ArgParameter] = [{'name': 'location_id', 'type': 'string', 'description': 'The unique id...
class TrafficControlPredictTrafficCongestion(VirtualFunctionTool): name = 'TrafficControlPredictTrafficCongestion' summary = 'Predicts traffic congestion at a specific road or intersection in the future based on historical data and current conditions.' parameters: List[ArgParameter] = [{'name': 'location_...
class TrafficControlAnalyzeTrafficPatterns(VirtualFunctionTool): name = 'TrafficControlAnalyzeTrafficPatterns' summary = 'Analyzes traffic patterns at a specific road or intersection over a specified period in the past.' parameters: List[ArgParameter] = [{'name': 'location_id', 'type': 'string', 'descript...
class TrafficControlGivePriorityToEmergencyVehicle(VirtualFunctionTool): name = 'TrafficControlGivePriorityToEmergencyVehicle' summary = 'Gives priority to an emergency vehicle by changing vehicle lights at specific intersections.' parameters: List[ArgParameter] = [{'name': 'intersection_ids', 'type': 'ar...
class TrafficControlGivePriorityToPublicTransportation(VirtualFunctionTool): name = 'TrafficControlGivePriorityToPublicTransportation' summary = 'Gives priority to a public transportation vehicle by changing vehicle lights at specific intersections during peak hours.' parameters: List[ArgParameter] = [{'n...
class TrafficControlScheduleRoadMaintenance(VirtualFunctionTool): name = 'TrafficControlScheduleRoadMaintenance' summary = 'Schedules road maintenance at a specific road or intersection.' parameters: List[ArgParameter] = [{'name': 'location_id', 'type': 'string', 'description': 'The unique identifier of t...
@register_toolkit() class TrafficControl(FunctionToolkit): name_for_human = 'Traffic Control' description_for_human = 'Toolkit for monitoring, managing, and controlling city traffic.' name_for_model = 'TrafficControl' description_for_model = 'A set of tools for monitoring, managing, and controlling ci...
class TDAmeritradeGetHoldingsInformation(VirtualFunctionTool): name = 'TDAmeritradeGetHoldingsInformation' summary = 'Retrieve information about the holdings in an account that belongs to the User. ' parameters: List[ArgParameter] = [{'name': 'account', 'type': 'string', 'description': "The account type, ...
class TDAmeritradeGetBalance(VirtualFunctionTool): name = 'TDAmeritradeGetBalance' summary = 'Retrieve the balance of an account that belongs to the User.' parameters: List[ArgParameter] = [{'name': 'account', 'type': 'string', 'description': "The account type, one of ['self-directed TFSA', 'self-directed...
class TDAmeritradeTradeStock(VirtualFunctionTool): name = 'TDAmeritradeTradeStock' summary = 'Places an order for a stock.' parameters: List[ArgParameter] = [{'name': 'account', 'type': 'string', 'description': "The account number in which to purchase a stock. Must be a 'self-directed TFSA' account or a '...
class TDAmeritradeGetStockInformation(VirtualFunctionTool): name = 'TDAmeritradeGetStockInformation' summary = 'Gets information about a stock.' parameters: List[ArgParameter] = [{'name': 'ticker', 'type': 'string', 'description': 'The ticker of the stock.', 'required': True}] returns: List[ArgReturn]...
@register_toolkit() class TDAmeritrade(FunctionToolkit): name_for_human = 'TD Ameritrade' description_for_human = 'Toolkit for an online self-directed stock broker.' name_for_model = 'TDAmeritrade' description_for_model = 'A comprehensive toolkit for an online self-directed stock broker, which allows ...
class InvestmentManagerGetHoldingsInformation(VirtualFunctionTool): name = 'InvestmentManagerGetHoldingsInformation' summary = 'Retrieve information about the holdings in an account that belongs to the User.' parameters: List[ArgParameter] = [{'name': 'account', 'type': 'string', 'description': "The accou...
class InvestmentManagerListTransactions(VirtualFunctionTool): name = 'InvestmentManagerListTransactions' summary = 'Lists the transactions for a particular account.' parameters: List[ArgParameter] = [{'name': 'account', 'type': 'string', 'description': "The account type, one of ['non-registered', 'TFSA', ...
class InvestmentManagerSearchInvestments(VirtualFunctionTool): name = 'InvestmentManagerSearchInvestments' summary = 'Search available investments by keyword.' parameters: List[ArgParameter] = [{'name': 'query', 'type': 'string', 'description': 'The keyword to search for.', 'required': True}, {'name': 'ty...
class InvestmentManagerMakeTransaction(VirtualFunctionTool): name = 'InvestmentManagerMakeTransaction' summary = 'Buy investment options or sell holdings.' parameters: List[ArgParameter] = [{'name': 'account', 'type': 'string', 'description': "The account type, one of ['non-registered', 'TFSA', 'RRSP'].",...
@register_toolkit() class InvestmentManager(FunctionToolkit): name_for_human = 'Investment Manager' description_for_human = 'Toolkit for managing personal investments.' name_for_model = 'InvestmentManager' description_for_model = 'A comprehensive toolkit for managing personal investments, including re...
def construct_trajec(traject_dict, include_input=True, include_agent_log=True, include_simulator_log=True, include_final_answer=True, is_dumped_dict=False): trajec = '' if include_input: trajec += 'User Input: {}\n'.format(traject_dict['input']) for (i, step) in enumerate(traject_dict['intermediat...
def construct_simple_trajec(traject_dict, **kwargs): return construct_trajec(traject_dict, include_agent_log=False, include_simulator_log=False, **kwargs)
def get_used_tools_in_trajec(traject_dict, is_dumped_dict=True): used_tools = set() if (not is_dumped_dict): for step in traject_dict['intermediate_steps']: if isinstance(step[0], AgentAction): used_tools.add(step[0].tool) else: for (i, step) in enumerate(trajec...
def add_color(s: str, color: str) -> str: if (color in COLOR_MAPPING): color = COLOR_MAPPING[color] elif (color not in COLOR_MAPPING.values()): raise ValueError(f'Color {color} not supported.') return (((COLOR_PREFIX + color) + s) + COLOR_SUFFIX)
def make_colorful(type: str, content: str, title: str=None) -> str: color = COLOR_DICT[type] if (title is None): title = f'# {type} message'.upper() title = add_color(title, color) lines = content.split('\n') new_lines = [title] for l in lines: if l.startswith('###'): ...
def serialize(x: Any, indent: str='', sep: str='\n') -> str: if isinstance(x, str): s = x elif (isinstance(x, list) or isinstance(x, tuple)): s = sep.join([f'{indent}* {serialize(i, (indent + INDENT4))}' for i in x]) s = ('None' if (s == '') else ('\n' + s)) elif isinstance(x, dict...
def case_to_input_dict(case: Dict[(str, Any)], case_type: str='legacy'): inputs = {} for (k, v) in case.items(): k = CASE_ATTRS_TO_KEYS_MAPPING[k] if (k in ['input', 'underspecifications']): if (case_type == 'std'): v = v['Standard'] elif (case_type == '...
def html_highlight_content(html_content, key, color='red', start='', end=''): return html_content.replace(((start + key) + end), f"{start}<span style='color:{color}'>{key}</span>{end}")
def html_title(title: str, level: int=2) -> str: return f'<h{level}>{title}</h{level}>'
def html_text(data: str) -> str: return f'<pre>{data}</pre>'
def html_title_content(title, content, level=3): return (((html_title(title, level) + '\n') + html_text(content)) + '\n\n')
def to_html(data: Any, level: int=3, max_level: int=5): if isinstance(data, dict): if (level > max_level): content = html_text(json.dumps(data, indent=4)) else: content = '' for (key, value) in data.items(): content += (html_title(key, level) + '...
def create_folder(file_path: str) -> bool: 'Create folders for the file_path if the folders do not exist.\n\n Args:\n file_path (str): The path to the file.\n\n Returns:\n bool: True if the folder is created, False if the folder already exists.\n ' folder_path = osp.dirname(file_path) ...
def remove_file(file_path: str) -> None: 'Remove a file.' if osp.exists(file_path): os.remove(file_path)
def append_file(file_path: str, text: str, mode: str='a', seperator: str='\n\n########################\n') -> None: 'Append text to a file.' if create_folder(file_path): mode = 'w' with open(file_path, mode=mode) as f: f.write(seperator) f.write(text)
def append_jsonl(file_path: str, content: Any, mode: str='a') -> None: 'Append a json object to a jsonl file.' if create_folder(file_path): mode = 'w' with open(file_path, mode=mode) as f: f.write((json.dumps(content) + '\n'))
def write_json(content: Any, file_path: str, indent=4) -> None: 'Write a json object to a json file.' create_folder(file_path) with open(file_path, 'w') as f: json.dump(content, f, indent=indent)