MCPcopy Create free account

hub / github.com/SqueezeAILab/TinyAgent / functions

Functions338 in github.com/SqueezeAILab/TinyAgent

↓ 23 callersMethodjoin
( self, input_query: str, agent_scratchpad: str, is_final: bool )
src/llm_compiler/llm_compiler.py:210
↓ 17 callersFunctionlog
Print the given string only if logging is enabled.
src/utils/logger_utils.py:75
↓ 14 callersFunction_is_valid_config_field
(config: dict[str, Any], field: str)
src/tiny_agent/config.py:223
↓ 12 callersFunctionrun_applescript
Runs the given AppleScript using osascript and returns the result.
src/tiny_agent/run_apple_script.py:4
↓ 8 callersFunctionensure_email_formatting
( email_addresses: Sequence[str], computer: Computer )
src/tiny_agent/tiny_agent_tools.py:44
↓ 8 callersMethodrun
Convenience method for executing chain. The main difference between this method and `Chain.__call__` is that this method expects inpu
src/chains/chain.py:443
↓ 8 callersFunctionrun_applescript_capture
Runs the given AppleScript using osascript, captures the output and error, and returns them.
src/tiny_agent/run_apple_script.py:12
↓ 7 callersMethodparse
Parse text into agent action/finish.
src/agents/agent.py:36
↓ 6 callersMethodopen
Does Spotlight Search and opens the first thing that matches the name. If no exact match, performs fuzzy search. Additionally
src/tiny_agent/tools/spotlight_search.py:13
↓ 6 callersMethodtool_run_logging_kwargs
(self)
src/agents/agent.py:284
↓ 5 callersMethod_format_email_addresses
(emails: list[str])
src/tiny_agent/tools/mail.py:186
↓ 4 callersMethod_areturn
( self, output: AgentFinish, intermediate_steps: list, run_manager: Optional[A
src/executors/agent_executor.py:223
↓ 4 callersMethodacall
Asynchronously execute the chain. Args: inputs: Dictionary of inputs, or single input if chain expects only one p
src/chains/chain.py:307
↓ 4 callersMethodapredict
Format prompt with kwargs and pass to LLM. Args: callbacks: Callbacks to pass to LLMChain **kwargs: Keys to pass to p
src/chains/llm_chain.py:306
↓ 4 callersMethodarun
Convenience method for executing chain. The main difference between this method and `Chain.__call__` is that this method expects inpu
src/chains/chain.py:513
↓ 4 callersMethodcreate_outputs
Create outputs from response.
src/chains/llm_chain.py:267
↓ 4 callersMethodon_chain_error
( self, error: BaseException, *, run_id: UUID, parent_run_id: Optional
src/llm_compiler/planner.py:238
↓ 4 callersMethodpredict
Format prompt with kwargs and pass to LLM. Args: callbacks: Callbacks to pass to LLMChain **kwargs: Keys to pass to p
src/chains/llm_chain.py:289
↓ 4 callersMethodserialize
(self)
src/utils/data_utils.py:98
↓ 3 callersMethod_format_attachments
(attachments: list[str])
src/tiny_agent/tools/mail.py:190
↓ 3 callersMethod_get_folder_line
(self, folder: str | None)
src/tiny_agent/tools/notes.py:186
↓ 3 callersFunction_make_with_name
(tool_name: str)
src/tools/base.py:412
↓ 3 callersMethod_return
( self, output: AgentFinish, intermediate_steps: list, run_manager: Optional[C
src/executors/agent_executor.py:210
↓ 3 callersMethodcheck_context_length
Checks if the final length of the messages is greater than the context length, and if so, removes the excess tokens from the context.
src/tiny_agent/sub_agents/sub_agent.py:38
↓ 3 callersFunctionensure_file_paths
(file_paths: Sequence[str], computer: Computer)
src/tiny_agent/tiny_agent_tools.py:53
↓ 3 callersFunctiongenerate_llm_compiler_prompt
( tools: Sequence[Union[Tool, StructuredTool]], example_prompt: str, custom_instructions: str | No
src/llm_compiler/planner.py:37
↓ 3 callersFunctionget_datetime
(date: str | None)
src/tiny_agent/tiny_agent_tools.py:21
↓ 3 callersFunctionget_model
( model_type, model_name, api_key, vllm_port, stream, temperature=0, azure_endpoin
src/utils/model_utils.py:12
↓ 3 callersFunctionget_model_config
( config: dict[str, Any], provider: str, agent_type: AgentType, )
src/tiny_agent/config.py:49
↓ 3 callersFunctioninstantiate_task
( tools: Sequence[Union[Tool, StructuredTool]], idx: int, tool_name: str, args: str, thoug
src/llm_compiler/output_parser.py:111
↓ 3 callersMethodreturn_stopped_response
Return response when agent has been stopped due to max iterations.
src/agents/agent.py:242
↓ 3 callersFunctionrun_command
Executes a shell command and returns the output.
src/tiny_agent/run_apple_script.py:22
↓ 2 callersMethod_acall
Asynchronously execute the chain. This is a private method that is not user-facing. It is only called within `Chain.acall`, which
src/chains/chain.py:215
↓ 2 callersMethod_all_tasks_done
(self)
src/llm_compiler/task_fetching_unit.py:97
↓ 2 callersMethod_call
Execute the chain. This is a private method that is not user-facing. It is only called within `Chain.__call__`, which is the user
src/chains/chain.py:192
↓ 2 callersMethod_convert_note_to_text
Converts an HTML note content to plain text.
src/tiny_agent/tools/notes.py:232
↓ 2 callersMethod_do_fuzzy_matching
(self, name: str)
src/tiny_agent/tools/notes.py:191
↓ 2 callersMethod_get_all_executable_tasks
(self)
src/llm_compiler/task_fetching_unit.py:100
↓ 2 callersMethod_get_first_calendar
(self)
src/tiny_agent/tools/calendar.py:89
↓ 2 callersMethod_get_in_context_examples_prompt
(embeddings: list[PickledEmbedding])
src/tiny_agent/tool_rag/base_tool_rag.py:125
↓ 2 callersMethod_get_tool_return
Check if the tool is a returning tool.
src/executors/agent_executor.py:547
↓ 2 callersMethod_load_filtered_embeddings
Loads the embeddings.pkl file that contains a list of PickledEmbedding objects and returns the filtered results based on the availabl
src/tiny_agent/tool_rag/base_tool_rag.py:105
↓ 2 callersMethod_match_buffer_and_generate_task
Runs every time "\n" is encountered in the input stream or at the end of the stream. Matches the buffer against the regex patterns and generat
src/llm_compiler/planner.py:101
↓ 2 callersMethod_parse_generation
( self, generation: List[Dict[str, str]] )
src/chains/llm_chain.py:362
↓ 2 callersMethod_prepare_intermediate_steps
( self, intermediate_steps: List[Tuple[AgentAction, str]] )
src/executors/agent_executor.py:562
↓ 2 callersMethod_retrieve_top_k_embeddings
Computes the cosine similarity of each example and retrieves the closest top_k examples. If there are already less than top_k example
src/tiny_agent/tool_rag/base_tool_rag.py:77
↓ 2 callersMethod_run_task
(self, task: Task)
src/llm_compiler/task_fetching_unit.py:117
↓ 2 callersMethod_should_continue
(self, iterations: int, time_elapsed: float)
src/executors/agent_executor.py:199
↓ 2 callersFunctionadd_new_dependency_edge
( *, node_name: str, dependency: str, )
src/utils/graph_utils.py:22
↓ 2 callersMethodagenerate
Generate LLM result from inputs.
src/chains/llm_chain.py:137
↓ 2 callersFunctioncall_compose_email_agent
( compose_email_agent: ComposeEmailAgent, context: str, email_thread: str = "", mode: ComposeE
src/tiny_agent/tiny_agent_tools.py:230
↓ 2 callersFunctioncheck_for_dependency
(item: str)
src/utils/graph_utils.py:11
↓ 2 callersMethodgenerate
Generate LLM result from inputs.
src/chains/llm_chain.py:102
↓ 2 callersMethodget_email_address
Returns the email address of a contact by name.
src/tiny_agent/tools/contacts.py:37
↓ 2 callersMethodget_full_inputs
Create the full inputs for the LLMChain from intermediate steps.
src/agents/agent.py:161
↓ 2 callersMethodget_full_names_from_first_name
Returns a list of full names of contacts that contain the first name provided.
src/tiny_agent/tools/contacts.py:64
↓ 2 callersMethodget_phone_number
Returns the phone number of a contact by name.
src/tiny_agent/tools/contacts.py:10
↓ 2 callersFunctionget_planner_custom_instructions_prompt
( tools: Sequence[Tool | StructuredTool], custom_instructions: str | None )
src/tiny_agent/prompts.py:86
↓ 2 callersMethodget_stats
(self)
src/callbacks/callbacks.py:35
↓ 2 callersMethodget_though_action_observation
( self, include_action=True, include_thought=True, include_action_idx=False )
src/llm_compiler/task_fetching_unit.py:59
↓ 2 callersFunctionget_tiny_agent_config
(config_path: str)
src/tiny_agent/config.py:147
↓ 2 callersFunctionget_tiny_agent_tools
( computer: Computer, compose_email_agent: ComposeEmailAgent, pdf_summarizer_agent: PDFSummarizerA
src/tiny_agent/tiny_agent_tools.py:714
↓ 2 callersMethodopen_note
Opens an existing note by its name and optionally returns its content. If no exact match is found, attempts fuzzy matching to suggest
src/tiny_agent/tools/notes.py:53
↓ 2 callersMethodprep_inputs
Validate and prepare chain inputs, including adding inputs from memory. Args: inputs: Dictionary of raw inputs, or single input i
src/chains/chain.py:402
↓ 2 callersMethodprep_outputs
Validate and prepare chain outputs, and save info about this run to memory. Args: inputs: Dictionary of chain inputs, including a
src/chains/chain.py:376
↓ 2 callersMethodreset
(self)
src/callbacks/callbacks.py:29
↓ 2 callersMethodrun_llm
Run the LLM.
src/llm_compiler/planner.py:279
↓ 2 callersMethodset_tasks
(self, tasks: dict[str, Any])
src/llm_compiler/task_fetching_unit.py:92
↓ 1 callersMethod__init__
(self)
src/callbacks/callbacks.py:11
↓ 1 callersMethod_atake_next_step
Take a single step in the thought-action-observation loop. Override this to take control of how the agent makes and acts on choices.
src/executors/agent_executor.py:334
↓ 1 callersFunction_check_azure_config
(config: dict[str, Any], agent_prefix: str)
src/tiny_agent/config.py:227
↓ 1 callersMethod_check_folder_exists
(self, folder: str)
src/tiny_agent/tools/notes.py:208
↓ 1 callersFunction_check_local_config
(config: dict[str, Any], agent_prefix: str)
src/tiny_agent/config.py:261
↓ 1 callersFunction_check_openai_config
(config: dict[str, Any], agent_prefix: str)
src/tiny_agent/config.py:247
↓ 1 callersMethod_classify_tools
Retrieves the best tools for the given query by classification.
src/tiny_agent/tool_rag/classifier_tool_rag.py:92
↓ 1 callersMethod_construct_scratchpad
Construct the scratchpad that lets the agent continue its thought process.
src/agents/agent.py:89
↓ 1 callersFunction_create_subset_model
Create a pydantic model with only a subset of model's fields.
src/tools/base.py:29
↓ 1 callersFunction_default_stringify_rule_for_arguments
(args)
src/llm_compiler/task_fetching_unit.py:12
↓ 1 callersMethod_extract_text_from_pdf
(pdf_path: str)
src/tiny_agent/sub_agents/pdf_summarizer_agent.py:69
↓ 1 callersFunction_find_tool
Find a tool by name. Args: tool_name: Name of the tool to find. Returns: Tool or StructuredTool.
src/llm_compiler/output_parser.py:80
↓ 1 callersMethod_format_contexts
contexts is a list of context each context is formatted as the description of _generate_context_for_replanner
src/llm_compiler/llm_compiler.py:200
↓ 1 callersMethod_generate_context_for_replanner
Formatted like this: ``` 1. action 1 Observation: xxx 2. action 2 Observation: yyy ... Thought
src/llm_compiler/llm_compiler.py:174
↓ 1 callersMethod_get_accuracy
(self, key: str)
src/utils/logger_utils.py:36
↓ 1 callersMethod_get_default_output_parser
Get default output parser for this class.
src/agents/agent.py:213
↓ 1 callersMethod_get_default_output_parser
( cls, llm: Optional[BaseLanguageModel] = None, **kwargs: Any )
src/agents/structured_chat_agent.py:64
↓ 1 callersFunction_get_dependencies_from_graph
Get dependencies from a graph.
src/llm_compiler/output_parser.py:97
↓ 1 callersFunction_get_filtered_args
Get the arguments from a function's signature.
src/tools/base.py:40
↓ 1 callersMethod_get_mean_latency
(self, key: str)
src/utils/logger_utils.py:32
↓ 1 callersFunction_get_verbosity
()
src/chains/chain.py:33
↓ 1 callersMethod_parse_joinner_output
We expect the joinner output format to be: ``` Thought: xxx Action: Finish/Replan(yyy) ``` Returns:
src/llm_compiler/llm_compiler.py:147
↓ 1 callersFunction_parse_llm_compiler_action_args
Parse arguments from a string.
src/utils/plan_utils.py:13
↓ 1 callersFunction_parse_llm_compiler_action_args
Parse arguments from a string.
src/llm_compiler/output_parser.py:64
↓ 1 callersMethod_preprocess_args
Replace dependency placeholders, i.e. ${1}, in task.args with the actual observation.
src/llm_compiler/task_fetching_unit.py:109
↓ 1 callersFunction_replace_arg_mask_with_real_value
( args, dependencies: List[int], tasks: Dict[str, Task] )
src/llm_compiler/task_fetching_unit.py:19
↓ 1 callersMethod_take_next_step
Take a single step in the thought-action-observation loop. Override this to take control of how the agent makes and acts on choices.
src/executors/agent_executor.py:238
↓ 1 callersMethod_validate_inputs
Check that all inputs are present.
src/chains/chain.py:180
↓ 1 callersMethod_validate_outputs
(self, outputs: Dict[str, Any])
src/chains/chain.py:186
↓ 1 callersMethod_validate_tools
Validate that appropriate tools are passed in.
src/agents/agent.py:207
↓ 1 callersMethod_validate_tools
(cls, tools: Sequence[BaseTool])
src/agents/structured_chat_agent.py:60
↓ 1 callersMethodaapply
Utilize the LLM generate method for speed gains.
src/chains/llm_chain.py:243
next →1–100 of 338, ranked by callers