MCPcopy Create free account

hub / github.com/SAIC-MONTREAL/SAGE / functions

Functions344 in github.com/SAIC-MONTREAL/SAGE

↓ 82 callersMethodexecute
(self, command: str, **kwargs: dict[str, Any])
sage/coordinators/base.py:109
↓ 68 callersFunctionsetup
Setup the env to run a specific testcase
sage/testing/testing_utils.py:28
↓ 59 callersMethodget_device_state
Get state of all devices for a single test.
sage/testing/fake_requests.py:102
↓ 23 callersFunctionice_hijack
Hijack cls.og_method_name to refer to an overridden call. The overridden call will have a chance to call the original function.
externals/langchain_visualizer/hijacking.py:112
↓ 20 callersMethodload
Load memory bank from directory
sage/retrieval/memory_bank.py:48
↓ 18 callersMethodinstantiate
(self)
sage/utils/llm_utils.py:22
↓ 18 callersMethodrun
(self)
sage/utils/trigger_server.py:262
↓ 13 callersMethodset_device_state
Update state of all devices for a single test
sage/testing/fake_requests.py:92
↓ 11 callersMethodjson
(self)
sage/testing/fake_requests.py:121
↓ 8 callersFunctionlisten
Listen for responses from the trigger server
sage/testing/testing_utils.py:55
↓ 7 callersFunctiongcloud_authenticate
(force_refresh: bool = False, app: str = "gmail")
sage/misc_tools/gcloud_auth.py:21
↓ 7 callersFunctionparse_json
Validates if a JSON string is formatted correctly. Also verifies if a string in markdown format can be parsed as JSON. It is helpful beca
sage/utils/common.py:40
↓ 6 callersFunctionget_tests
Selects the testcases to run
sage/testing/testcases.py:79
↓ 4 callersMethodadd_query
Add a query to the history
sage/retrieval/memory_bank.py:75
↓ 4 callersFunctioncheck_status_on
Returns True if any of the listed devices are on. Else False
sage/testing/testcases.py:95
↓ 4 callersMethoddetermine_cost
(self, result: Union[LLMResult, ChatResult])
externals/langchain_visualizer/llms/base.py:28
↓ 4 callersMethodfrom_json
Create DocManager from serialized JSON.
sage/smartthings/docmanager.py:131
↓ 4 callersFunctionget_callback_handlers
This function creates the 2 types of log handlers used in our demo, verbose and for graphics
sage/utils/logging_utils.py:18
↓ 4 callersFunctionget_interaction_question
(run_logpath)
sage/testing/testcases.py:1333
↓ 4 callersFunctionmanual_gmail_search
Search gmail directly using python. Used to check test execution. Add any dates to be searched to the query, if wanted. Returns a list of
sage/testing/testing_utils.py:127
↓ 4 callersFunctionrequest
Used in place of requests.request Implements all interactions with the device state. Whenever a device state change is made, it is writt
sage/testing/fake_requests.py:125
↓ 3 callersMethodexecute
(self, command)
bin/dump_results_to_latex_table.py:31
↓ 3 callersFunctionextract_texts
"Extract all instances of text that occur between the string identifiers start_string and end_string
sage/utils/logging_utils.py:50
↓ 3 callersMethodget_unique_filename
Get a unique filename.
sage/retrieval/data_generator/outputs.py:45
↓ 3 callersFunctionload_embedding_model
Builds an embedding model and cache it
sage/utils/common.py:107
↓ 3 callersFunctionmost_similar_id
(device, all_devices)
sage/smartthings/smartthings_tool.py:37
↓ 3 callersMethodread_from_json
Reads memory from json file
sage/retrieval/memory_bank.py:104
↓ 3 callersFunctionread_json
Reads a json file
sage/utils/common.py:75
↓ 3 callersMethodsearch
Get the most relevant memories
sage/retrieval/memory_bank.py:159
↓ 2 callersMethodbuild_graph
Generate left handed graph that generates a visualization of the decision making process
sage/utils/viz_utils.py:208
↓ 2 callersMethodcapability_docs
Get best docs for a single capability.
sage/smartthings/docmanager.py:190
↓ 2 callersFunctioncheck_env_vars
Check if the environment variables are set
sage/utils/common.py:21
↓ 2 callersMethodcreate_indexes
Create seperate indexes for each user
sage/retrieval/memory_bank.py:149
↓ 2 callersFunctionfind_all_substrings
Find the indices of all substrings within a large string
sage/utils/logging_utils.py:30
↓ 2 callersMethodget_actions_from_log
Read all actions (tools) from log file
sage/utils/viz_utils.py:114
↓ 2 callersFunctionget_base_device_state
Loads a device state from a file
sage/testing/testing_utils.py:72
↓ 2 callersMethodget_final_answer
Extract feedback from Agent in log file when task is completed successfully
sage/utils/viz_utils.py:105
↓ 2 callersMethodget_routes
Set up the server's routes.
sage/utils/trigger_server.py:81
↓ 2 callersFunctionget_viz_wrapper
Return the visualization wrapper object. This object's "run" function will be what triggers ICE execution capture.
externals/langchain_visualizer/hijacking.py:36
↓ 2 callersFunctionimage_resize
Resize image proportionally (maintain aspect ratio)
sage/utils/viz_utils.py:31
↓ 2 callersMethodinstantiate
Returns the instantiated object using the config.
sage/base.py:59
↓ 2 callersMethodmain
Run this in asyncio.run to run the server.
sage/utils/trigger_server.py:91
↓ 2 callersFunctionmerge_test_types
Merge testcases from different types
sage/testing/test_runner.py:61
↓ 2 callersMethodplot_text_box
Generate right handed text box that prints tool chosen and chosen arguments
sage/utils/viz_utils.py:136
↓ 2 callersFunctionpretty_print_email
Return strings of email info retrieved in manual_gmail_search. The input to this function should be the output of manual_gmail_search.
sage/testing/testing_utils.py:167
↓ 2 callersMethodrun
(self, *args, **kwargs)
externals/langchain_visualizer/hijacking.py:21
↓ 2 callersFunctionrun_code
Run some code in a string and return the result Args: code_define (str): the code that does imports, function definitions, etc
sage/utils/trigger_server.py:132
↓ 2 callersMethodrun_process
Run the polling process.
sage/utils/trigger_server.py:113
↓ 2 callersMethodsave_snapshot
Save a snapshot of the memory
sage/retrieval/memory_bank.py:118
↓ 2 callersMethodshow_graph
Combine left and right images into 1 and display
sage/utils/viz_utils.py:326
↓ 1 callersMethod__init__
Args: poller_fn: function which will runs the polling of triggers. Will be run in a separate process. It's first
sage/utils/trigger_server.py:25
↓ 1 callersMethod_build_tools
Add tools to the agent
sage/coordinators/sage_coordinator.py:137
↓ 1 callersMethod_build_user_profiles
Build the user profiles based on the saved interactions
sage/retrieval/memory_bank.py:86
↓ 1 callersMethod_get_time_range_args
Return dict with provided date range args, if supplied. We do this so that we only supply date range to api call if we have it,
sage/misc_tools/google_suite.py:152
↓ 1 callersMethod_init_collection
Create the collection. If it already exists, do nothing.
sage/smartthings/db.py:37
↓ 1 callersMethod_init_collection
Create the collection. If it already exists, do nothing.
sage/smartthings/db.py:130
↓ 1 callersMethod_init_collection
Initialize collection if it does not exist already
sage/testing/fake_requests.py:58
↓ 1 callersMethod_inject
Inject information about what is playing on the fake TV right now. The aim of this is to support testing by making sure that the sho
sage/smartthings/tv_schedules.py:85
↓ 1 callersMethod_load_user_queries
Loads user queries from a directory. This assumes that the queries are saved in JSON files
sage/retrieval/memory_bank.py:27
↓ 1 callersMethod_run
( self, # query: str, max_results: int = 10, timeMin: str = None, time
sage/misc_tools/google_suite.py:111
↓ 1 callersMethodadd
update with new intermediate result
sage/utils/loggers.py:31
↓ 1 callersMethodadd_condition
Defines the condition checking code for persistent commands and adds it to the trigger server.
baselines/coordinators/sasha_coordinator.py:222
↓ 1 callersFunctionadd_embeddings
Add embeddings to the schedule. Does things in place, so the original schedule is mutated. Args: schedule (list) Returns:
sage/smartthings/tv_schedules.py:25
↓ 1 callersMethodadd_test_log
Add a single test log to the db.
sage/testing/fake_requests.py:74
↓ 1 callersMethodbuild_capability_docstring_from_online_info
Build up a full capability docstring for capabilities which are nicely documented online.
sage/smartthings/docmanager.py:148
↓ 1 callersMethodbuild_capability_docstring_without_online_info
Build up a full capability docstring for capabilities which are NOT documented online.
sage/smartthings/docmanager.py:156
↓ 1 callersMethodcapability_summary_for_devices
Create a string which contains one-liner summaries for all capabilities of devices, and a second string which specifies which devices
sage/smartthings/docmanager.py:215
↓ 1 callersFunctioncheck_conditions
Checks all conditions once.
sage/utils/trigger_server.py:157
↓ 1 callersFunctionclean_embeds
Clean up embeddings, usually by removing large dimensions. For an explanation of why you might want to do this, see https://arxiv.org/abs/23
sage/smartthings/device_disambiguation.py:72
↓ 1 callersFunctioncli
( *args, mode: Mode = "machine", trace: bool = True, **kwargs,
externals/langchain_visualizer/visualize.py:56
↓ 1 callersFunctioncompute_categorical_success
(data: pd.DataFrame)
sage/testing/plot_results.py:22
↓ 1 callersFunctioncompute_overall_results
(data: pd.DataFrame)
sage/testing/plot_results.py:16
↓ 1 callersFunctioncompute_success_rate
COmpute the success rate
bin/print_llm_comparison.py:70
↓ 1 callersFunctioncompute_success_rate_per_category
Compute the success rate per test case category
bin/print_llm_comparison.py:50
↓ 1 callersFunctioncondition_check
Checks if a device state satisfies a given condition.
baselines/coordinators/sasha_coordinator.py:35
↓ 1 callersMethodcontains
Check if a specific memory exists
sage/retrieval/memory_bank.py:167
↓ 1 callersFunctioncreate_and_run_condition_codewriter
( command: str, llm: BaseChatModel, logpath: str, tools: list[BaseTool] )
sage/smartthings/persistent_command_tools.py:99
↓ 1 callersFunctioncreate_and_run_smartthings_agent_v2
( command: str, llm: BaseChatModel, logpath: str, tools: List[BaseTool] )
sage/smartthings/smartthings_tool.py:278
↓ 1 callersMethodcreate_global_user_profile
Summarize the daily user preferences into a single global profile
sage/retrieval/profiler.py:70
↓ 1 callersFunctioncreate_multiuser_vector_indexes
Creates a vector index that offers similarity search
sage/retrieval/vectordb.py:69
↓ 1 callersMethoddevice_capability_details
Create a string which gives full details about the capability for the device. The device is relevant because the capability may be a
sage/smartthings/docmanager.py:252
↓ 1 callersFunctiondump_ordered_dict_recur
Convert OrderedDict to JSON-serializable object
sage/smartthings/docmanager.py:32
↓ 1 callersFunctionencode_prompts
Encode multiple prompt instructions into a single string.
sage/retrieval/data_generator/bootstrap_instructions.py:44
↓ 1 callersFunctionextract_instructions
Extracts the generated instructions from the response
sage/retrieval/data_generator/bootstrap_instructions.py:66
↓ 1 callersFunctionextract_nouns
Filter a string to keep only the nouns
sage/smartthings/device_disambiguation.py:27
↓ 1 callersMethodfind_online_info
Try to find nice online documentation for a capability.
sage/smartthings/docmanager.py:179
↓ 1 callersFunctionfirst_larger_term
Takes a list of numbers and a number to compare against and returns the first term in list1 that is larger than number, or None if no such te
sage/utils/logging_utils.py:36
↓ 1 callersFunctionformat_preferences
Format the preferences, remove empty fields
sage/retrieval/data_generator/bootstrap_instructions.py:79
↓ 1 callersFunctiongenerate_instructions
Generate instructions using an ChatGPT
bin/generate_multiuser_memory.py:51
↓ 1 callersFunctiongenerate_user_instructions
Bootstrap instructions for a specific user
sage/retrieval/data_generator/bootstrap_instructions.py:166
↓ 1 callersFunctionget_async_overridden_call
Like get_overridden_call, but returns an async override.
externals/langchain_visualizer/hijacking.py:83
↓ 1 callersMethodget_chain
Initialize SASHA chain of LLMs
baselines/coordinators/sasha_coordinator.py:78
↓ 1 callersFunctionget_date
Randomly generate a date
sage/retrieval/data_generator/bootstrap_instructions.py:128
↓ 1 callersFunctionget_description
Gets the description from the readme.
setup.py:6
↓ 1 callersMethodget_device_capabilities
Get all capabilities for a device. If a device has multiple components with the same capability, a separate item will appear
sage/smartthings/db.py:116
↓ 1 callersFunctionget_image_embeds
Get image embeddings
sage/smartthings/device_disambiguation.py:38
↓ 1 callersMethodget_images
Load images from image folder.
sage/smartthings/device_disambiguation.py:148
↓ 1 callersFunctionget_key_value
Get the value of a dictionary from the nested list of keys.
baselines/coordinators/sasha_coordinator.py:46
↓ 1 callersFunctionget_min_device_state
Loads a reduced version of the device state from a file Used to avoid exceeding the maximum number of tokens
sage/testing/testing_utils.py:84
↓ 1 callersFunctionget_overridden_call
Get the new function that will override the original function. The returned function will end up calling the original function, but in a way
externals/langchain_visualizer/hijacking.py:54
next →1–100 of 344, ranked by callers