-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tasks-prompt): add
reflect_on_tool_use
flag to disable LLM ref…
…lection
- Loading branch information
1 parent
9b6bfff
commit 531cee8
Showing
7 changed files
with
75 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
docs/griptape-framework/structures/src/tasks_reflect_on_tool_use.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from griptape.drivers.web_search.duck_duck_go import DuckDuckGoWebSearchDriver | ||
from griptape.tasks import PromptTask | ||
from griptape.tools import WebScraperTool, WebSearchTool | ||
|
||
search_task = PromptTask( | ||
tools=[WebSearchTool(web_search_driver=DuckDuckGoWebSearchDriver())], | ||
reflect_on_tool_use=False, | ||
) | ||
search_results = search_task.run("Do two searches, one for 'vim' and one for 'emacs'.") | ||
|
||
scrape_task = PromptTask( | ||
tools=[WebScraperTool()], | ||
reflect_on_tool_use=True, | ||
) | ||
answer = scrape_task.run(["Compare and contrast vim and emacs:", search_results.to_text()]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters