| btw_tool_files_read_text_file | R Documentation |
Tool: Read a file
btw_tool_files_read_text_file(
path,
line_start = 1,
line_end = 1000,
`_intent` = ""
)
path |
Path to a file for which to get information. The |
line_start |
Starting line to read, defaults to 1 (starting from the first line). |
line_end |
Ending line to read, defaults to 1000. Change only this value
if you want to read more or fewer lines. Use in combination with
|
_intent |
An optional string describing the intent of the tool use. When the tool is used by an LLM, the model will use this argument to explain why it called the tool. |
Returns a character vector of lines from the file.
Other Tools:
btw_tool_docs_package_news(),
btw_tool_env_describe_data_frame(),
btw_tool_env_describe_environment(),
btw_tool_files_code_search(),
btw_tool_files_list_files(),
btw_tool_files_write_text_file(),
btw_tool_ide_read_current_editor(),
btw_tool_package_docs,
btw_tool_search_packages(),
btw_tool_session_package_info(),
btw_tool_session_platform_info(),
btw_tool_web_read_url(),
btw_tools()
withr::with_tempdir({
write.csv(mtcars, "mtcars.csv")
btw_tool_files_read_text_file("mtcars.csv", line_end = 5)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.