Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created September 27, 2024 23:58
Show Gist options
  • Save elijahbenizzy/6e1af19f964dcef692fc64e6ebfdc4f4 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/6e1af19f964dcef692fc64e6ebfdc4f4 to your computer and use it in GitHub Desktop.
@action(reads=["tool_parameters"], writes=["raw_response"])
def call_tool(state: State, tool_function: Callable) -> State:
response = tool_function(**state["tool_parameters"])
return state.update(raw_response=response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment