R/tools-builtin.R
tool_read_file.Rd
A tool that reads the contents of a file and returns it as a string.
tool_read_file(path)
A tool definition created with ellmer::tool().
ellmer::tool()
Path to the file to read (tool argument, not R function argument)
if (FALSE) { # \dontrun{ agent <- Agent$new( chat = ellmer::chat("openai/gpt-4o"), tools = list(tool_read_file) ) } # }