Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SAIC-MONTREAL/SAGE
/ functions
Functions
344 in github.com/SAIC-MONTREAL/SAGE
⨍
Functions
344
◇
Types & classes
88
↓ 1 callers
Method
get_state_descriptions
Reduced dimensionality of device state to only include the name of the capabilities (not their values).
baselines/coordinators/sasha_coordinator.py:130
↓ 1 callers
Function
get_test_challenges
Given a test name returns a list of challenges the test poses
sage/testing/testcases.py:54
↓ 1 callers
Function
get_text_embeds
Get text embeddings
sage/smartthings/device_disambiguation.py:58
↓ 1 callers
Method
get_tool_options
Get available tools to agent (at given level of hierchy)
sage/utils/viz_utils.py:127
↓ 1 callers
Method
get_unique_dirname
Get a unique dirname.
sage/retrieval/data_generator/outputs.py:40
↓ 1 callers
Function
get_version
Gets the version.
setup.py:24
↓ 1 callers
Method
has_refresh_capability
Check if device has refresh capability If it does, you should use this capability before reading attributes, or they might n
sage/smartthings/docmanager.py:163
↓ 1 callers
Function
hidden_wrapper
(*args, **kwargs)
externals/langchain_visualizer/visualize.py:36
↓ 1 callers
Function
hijack
(cls, fn_name, get_replacement)
externals/langchain_visualizer/hijacking.py:107
↓ 1 callers
Method
identify_device
Identify devices based on command string The format of the command string should be the same as that described in the DeviceDisambig
sage/smartthings/device_disambiguation.py:105
↓ 1 callers
Method
init
(self)
sage/smartthings/docmanager.py:82
↓ 1 callers
Function
initialize_tool_names
Get list of available tools, at every hierchy level of the coordinator agent
sage/utils/logging_utils.py:71
↓ 1 callers
Function
is_noun
(pos)
sage/smartthings/device_disambiguation.py:23
↓ 1 callers
Function
load_machine_instructions
If the save folder contains saved instructions, load these instructions
sage/retrieval/data_generator/bootstrap_instructions.py:111
↓ 1 callers
Function
load_ordered_dict_recur
Convert output of dump_ordered_dict_recur to OrderedDict
sage/smartthings/docmanager.py:43
↓ 1 callers
Function
load_seed_instructions
Load human-written instructions
sage/retrieval/data_generator/bootstrap_instructions.py:95
↓ 1 callers
Function
main
(test_demo_config: TestDemoConfig)
sage/testing/test_runner.py:147
↓ 1 callers
Function
main
Main function to generate the memory bank for multiple users. This is done as follows: 1- If a memory bank already exists, add manual mem
bin/generate_multiuser_memory.py:103
↓ 1 callers
Function
make_chatgpt_request
Given a prompt, sends a request to ChatGPT
sage/utils/llm_utils.py:68
↓ 1 callers
Function
new_main
(self, main: FunctionBasedRecipe)
externals/langchain_visualizer/visualize.py:15
↓ 1 callers
Method
override_llm_config
Overrides the LLM config for the tools based on the coordinator config
sage/coordinators/sage_coordinator.py:78
↓ 1 callers
Function
poll_triggers
(demo_config)
bin/demo.py:99
↓ 1 callers
Method
poll_triggers
Check whether the polling_fn has found anything
sage/utils/trigger_server.py:71
↓ 1 callers
Method
populate
Auto-populate the DB. You only need to run this when devices are updated.
sage/smartthings/db.py:143
↓ 1 callers
Method
prepare_for_vector_db
Prepare documents from the users' history for embedding and vector storage
sage/retrieval/memory_bank.py:132
↓ 1 callers
Method
print_daily_summary
Beatifully print the daily summaries
sage/retrieval/profiler.py:26
↓ 1 callers
Method
print_global_profiles
Beatifully print the global profiles
sage/retrieval/profiler.py:42
↓ 1 callers
Method
print_to_terminal
Helper to pretty print config to terminal
sage/coordinators/base.py:53
↓ 1 callers
Method
print_to_terminal
(self)
sage/testing/test_runner.py:130
↓ 1 callers
Function
read_all_results
(base_path=Path("/Users/d.rivkin/work/smarthome-llms/logs/"))
bin/dump_results_to_latex_table.py:106
↓ 1 callers
Function
read_results
Read the latest json file in a folder
bin/print_llm_comparison.py:39
↓ 1 callers
Function
relabel_results
(json_file)
sage/testing/plot_results.py:136
↓ 1 callers
Function
replace_requests_with_fake_requests
Replace requests with fake requests in a code string.
sage/testing/fake_requests.py:29
↓ 1 callers
Method
run
Run the LLM on the given prompt and input.
externals/langchain_visualizer/llms/base.py:42
↓ 1 callers
Function
sample_machine_instructions
Sample n machine instructions from a list of machine instructions.
sage/retrieval/data_generator/bootstrap_instructions.py:60
↓ 1 callers
Method
save
(self, logpath)
sage/testing/test_runner.py:138
↓ 1 callers
Method
save
Saves the memory into a json file
sage/retrieval/memory_bank.py:111
↓ 1 callers
Method
save_config
Save config to output_dir directory
sage/coordinators/base.py:59
↓ 1 callers
Method
save_intermediate_result
Either save an item to its own file or concatenate it with all dataset items in a single file.
sage/retrieval/data_generator/outputs.py:50
↓ 1 callers
Method
select_devices
Applies a fuzzy matching based on the number of matching characters. Necessary because LLMs sometimes make mistakes copying the IDs.
sage/smartthings/device_disambiguation.py:165
↓ 1 callers
Function
select_instructions
Selects instructions based on how diverse they are
sage/retrieval/data_generator/bootstrap_instructions.py:138
↓ 1 callers
Function
set_test_id
Sets the global test id.
sage/testing/fake_requests.py:22
↓ 1 callers
Method
setup
Tool-specific setup
sage/base.py:20
↓ 1 callers
Method
setup
Setup the memory retrieval chain
sage/retrieval/tools.py:52
↓ 1 callers
Function
simulate_agent
Wrapper function to visualize graph in a loop from given logs path at given loop frequency
sage/utils/viz_utils.py:380
↓ 1 callers
Method
simulate_log
Live visualization of the log file as a decision tree
sage/utils/viz_utils.py:288
↓ 1 callers
Function
to_dataframe
Convert a json to a dataframe
bin/print_llm_comparison.py:22
↓ 1 callers
Method
to_json
Save self to disk as JSON.
sage/smartthings/docmanager.py:115
↓ 1 callers
Function
to_ordered_dict_recur
Convert JSON objects (i.e. object made of lists and dictionaries) to use OrderedDict with sorted key instead of regular dictionaries. Th
sage/smartthings/docmanager.py:13
↓ 1 callers
Function
untraced_wrapper
(*args, **kwargs)
externals/langchain_visualizer/visualize.py:52
↓ 1 callers
Method
update_daily_user_preferences
Extract daily user preferences based on daily interactions
sage/retrieval/profiler.py:50
↓ 1 callers
Method
update_memory
Update the user memory.
sage/coordinators/sage_coordinator.py:167
↓ 1 callers
Function
validate_init_states
Validates initial state json files. Assumes filenames are of format `h#s#.json`
bin/validate_init_states.py:6
↓ 1 callers
Function
visualize
(fn, width: int = 1000, height: int = 500)
externals/langchain_visualizer/jupyter.py:41
↓ 1 callers
Method
visualize_log
Live visualization of the log file as a decision tree
sage/utils/viz_utils.py:310
↓ 1 callers
Method
whats_on
What's scheduled for this provider? Args: provider_string now_utc: UTC time for which to check the schedule.
sage/smartthings/db.py:67
Method
__del__
Clean up processes if server is deleted.
sage/utils/trigger_server.py:107
Method
__del__
(self)
sage/utils/trigger_server.py:268
Method
__del__
Destructor to cleanup when done.
sage/utils/logging_utils.py:95
Method
__init__
(self, config: CoordinatorConfig)
baselines/coordinators/oneprompt_coordinator.py:38
Method
__init__
(self, config: CoordinatorConfig)
sage/coordinators/base.py:80
Method
__init__
(self, config: SAGECoordinatorConfig)
sage/coordinators/sage_coordinator.py:93
Method
__init__
(self, *args, **kwargs)
sage/utils/trigger_server.py:195
Method
__init__
(self, output_dir: str)
sage/utils/loggers.py:14
Method
__init__
(self)
sage/utils/common.py:125
Method
__init__
(self, config=VisualizerConfig)
sage/utils/viz_utils.py:92
Method
__init__
Initialize callback handler.
sage/utils/logging_utils.py:88
Method
__init__
(self)
sage/smartthings/db.py:33
Method
__init__
(self, db_name: str)
sage/smartthings/db.py:112
Method
__init__
(self, capability_db_name: str)
sage/smartthings/docmanager.py:77
Method
__init__
(self, image_folder: str)
sage/smartthings/device_disambiguation.py:97
Method
__init__
(self)
sage/testing/fake_requests.py:53
Method
__init__
(self, json_content, status_code=200)
sage/testing/fake_requests.py:117
Method
__init__
(self)
sage/retrieval/memory_bank.py:21
Method
__init__
(self)
sage/retrieval/profiler.py:20
Method
__init__
Initialize DatasetWriter.
sage/retrieval/data_generator/outputs.py:22
Method
__init__
(self, og_obj, og_fn)
externals/langchain_visualizer/hijacking.py:13
Method
__init__
(self, config)
bin/dump_results_to_latex_table.py:28
Method
__len__
(self)
sage/retrieval/memory_bank.py:181
Method
__post_init__
(self)
sage/coordinators/base.py:66
Method
__post_init__
(self)
sage/coordinators/sage_coordinator.py:67
Method
__post_init__
(self)
sage/testing/test_runner.py:118
Method
__str__
(self)
sage/base.py:64
Method
_add_condition
Add a condition to be monitored by the server.
sage/utils/trigger_server.py:201
Method
_arun
(self, *args, **kwargs)
sage/base.py:23
Method
_arun
(self, *args, **kwargs)
sage/smartthings/smartthings_tool.py:131
Method
_arun
(self, *args, **kwargs)
sage/smartthings/smartthings_tool.py:208
Method
_arun
(self, *args, **kwargs)
sage/smartthings/smartthings_tool.py:274
Method
_arun
(self, *args, **kwargs)
sage/smartthings/tv_schedules.py:187
Method
_check_triggers
Function that is called to check if any triggers have been detected by pollers.
sage/utils/trigger_server.py:49
Method
_manual_trigger
Allows users to post triggers directly to server for testing.
sage/utils/trigger_server.py:62
Method
_reset
Wipe out all conditions.
sage/utils/trigger_server.py:215
Method
_run
( self, **kwargs )
sage/misc_tools/google_suite.py:52
Method
_run
( self, start: str, end: str, summary: str, description: str )
sage/misc_tools/google_suite.py:70
Method
_run
(self, text: str)
sage/misc_tools/google_suite.py:197
Method
_run
(self, command: str)
sage/misc_tools/weather_tool.py:20
Method
_run
(self, command)
sage/smartthings/persistent_command_tools.py:50
Method
_run
(self, command: str)
sage/smartthings/persistent_command_tools.py:182
Method
_run
(self, command: str)
sage/smartthings/persistent_command_tools.py:211
Method
_run
(self, text: str)
sage/smartthings/smartthings_tool.py:77
← previous
next →
101–200 of 344, ranked by callers