-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor agent_fs to defAgent and update related documentation #755
Changes from 1 commit
deacff1
459bc2a
37f9008
bd1738a
852c21e
96c7516
bc3595f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,60 +101,32 @@ | |
Agent that can find, search or read files to accomplish tasks | ||
|
||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description for the
|
||
- tool `agent_fs`: Agent that can query files to accomplish tasks | ||
|
||
|
||
`````js wrap title="system.agent_fs" | ||
system({ | ||
title: "Agent that can find, search or read files to accomplish tasks", | ||
}) | ||
|
||
const model = env.vars.agentFsModel | ||
|
||
defTool( | ||
"agent_fs", | ||
"Agent that can query files to accomplish tasks", | ||
defAgent( | ||
"fs", | ||
"Queries files to accomplish tasks", | ||
"Your are a helpfull LLM agent that can query the file system to accomplish tasks.", | ||
pelikhan marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There seems to be a typo here.
|
||
{ | ||
query: { | ||
type: "string", | ||
description: "Query to answer", | ||
}, | ||
}, | ||
async (args) => { | ||
const { context, query } = args | ||
context.log(`agent fs: ${query}`) | ||
const res = await runPrompt( | ||
(_) => { | ||
_.def("QUERY", query) | ||
|
||
_.$`Your are a helpfull LLM agent that can query the file system to accomplish tasks. | ||
|
||
Analyze and answer QUERY. | ||
|
||
- Assume that your answer will be analyzed by an LLM, not a human. | ||
- If you are missing information, reply "MISSING_INFO: <what is missing>". | ||
- If you cannot answer the query, return "NO_ANSWER: <reason>". | ||
` | ||
}, | ||
{ | ||
model, | ||
system: [ | ||
"system", | ||
"system.tools", | ||
"system.explanations", | ||
"system.fs_find_files", | ||
"system.fs_read_file", | ||
"system.fs_diff_files", | ||
"system.retrieval_fuzz_search", | ||
"system.md_frontmatter", | ||
], | ||
label: "agent file system", | ||
} | ||
) | ||
return res | ||
model, | ||
tools: [ | ||
"fs_find_files", | ||
"fs_read_file", | ||
"fs_diff_files", | ||
"retrieval_fuzz_search", | ||
"md_frontmatter", | ||
], | ||
} | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The 'agent_fs' tool has been refactored to 'defAgent' with a simplified interface. Verify that the documentation reflects the correct usage and that examples are updated to match the new interface.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
|
||
|
||
Check failure on line 129 in docs/src/content/docs/reference/scripts/system.mdx GitHub Actions / build
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The detailed documentation and example usage for the
|
||
````` | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link to the agent_fs documentation has been removed, which may lead to a broken link or missing information for users.