discourse-ai/lib/ai_bot/tools
Sam fb81307c59
FEATURE: web browsing tool (#548)
This pull request makes several improvements and additions to the GitHub-related tools and personas in the `discourse-ai` repository:

1. It adds the `WebBrowser` tool to the  `Researcher` persona, allowing the AI to visit web pages, retrieve HTML content, extract the main content, and convert it to plain text.

2. It updates the `GithubFileContent`, `GithubPullRequestDiff`, and `GithubSearchCode` tools to handle HTTP responses more robustly (introducing size limits). 

3. It refactors the `send_http_request` method in the `Tool` class to follow redirects when specified, and to read the response body in chunks to avoid memory issues with large responses. (only for WebBrowser)

4. It updates the system prompt for the `Researcher` persona to provide more detailed guidance on when to use Google search vs web browsing, and how to optimize tool usage and reduce redundant requests.

5. It adds a new `web_browser_spec.rb` file with tests for the `WebBrowser` tool, covering various scenarios like handling different HTML structures and following redirects.
2024-03-28 16:01:58 +11:00
..
dall_e.rb FEATURE: more elegant progress (#409) 2024-01-09 09:20:28 -03:00
db_schema.rb DEV: Fix various typos (#434) 2024-01-19 12:51:26 +01:00
discourse_meta_search.rb FEATURE: new Discourse Helper persona (#473) 2024-02-19 14:52:12 +11:00
github_file_content.rb FEATURE: web browsing tool (#548) 2024-03-28 16:01:58 +11:00
github_pull_request_diff.rb FEATURE: web browsing tool (#548) 2024-03-28 16:01:58 +11:00
github_search_code.rb FEATURE: web browsing tool (#548) 2024-03-28 16:01:58 +11:00
google.rb FIX: support multiple tool calls (#502) 2024-03-02 07:53:21 +11:00
image.rb FEATURE: more elegant progress (#409) 2024-01-09 09:20:28 -03:00
list_categories.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
list_tags.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
option.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
random_picker.rb FEATURE: mentionable personas and random picker tool, context limits (#466) 2024-02-15 16:37:59 +11:00
read.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
search.rb FEATURE: new Discourse Helper persona (#473) 2024-02-19 14:52:12 +11:00
search_settings.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
setting_context.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
summarize.rb DEV: improve internal design of ai persona and bug fix (#495) 2024-02-28 16:46:32 +11:00
time.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
tool.rb FEATURE: web browsing tool (#548) 2024-03-28 16:01:58 +11:00
web_browser.rb FEATURE: web browsing tool (#548) 2024-03-28 16:01:58 +11:00