Skip to content

Add the ability to run a specific tool to Assist.#31113

Merged
hugoShaka merged 1 commit into
masterfrom
hugo/assist-invoke-audit-query
Aug 31, 2023
Merged

Add the ability to run a specific tool to Assist.#31113
hugoShaka merged 1 commit into
masterfrom
hugo/assist-invoke-audit-query

Conversation

@hugoShaka
Copy link
Copy Markdown
Contributor

@hugoShaka hugoShaka commented Aug 28, 2023

This PR contains:

  • a refactoring of the model action logic to be exposed through the DoAction function
  • A RunTool() capability exposed by ai.Client and assist.Assist
  • a new "audit-query" action that directly invokes the audit generation tool

The DoAction/RunTool invocation method, as opposed to regular Chat invocation, is motivated by response time. On a chat invocation, it takes 6 seconds to start streaming the tool response. Of those 6 seconds, 5 are spent on the action planning and 1 on the actual tool. In cases where we know which tool we want to use, invoking the tool directly removes those 5 extra seconds and dramatically improves the UX.

@hugoShaka hugoShaka requested review from jakule and xacrimon August 28, 2023 20:40
@github-actions github-actions Bot requested review from ibeckermayer and zmb3 August 28, 2023 20:40
@ibeckermayer ibeckermayer removed their request for review August 29, 2023 00:25
Copy link
Copy Markdown
Contributor

@jakule jakule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits, looks good.

Comment thread lib/ai/model/agent.go
Comment thread lib/web/assistant.go Outdated
Comment thread lib/ai/client_test.go Outdated
Base automatically changed from hugo/assist-stream-audit-query to master August 30, 2023 20:00
@hugoShaka hugoShaka force-pushed the hugo/assist-invoke-audit-query branch from 5facde1 to 4222fc8 Compare August 31, 2023 18:21
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from zmb3 August 31, 2023 18:21
@hugoShaka hugoShaka enabled auto-merge August 31, 2023 19:18
@hugoShaka hugoShaka disabled auto-merge August 31, 2023 19:19
This commit contains:
- a refactoring of the model action logic to be exposed through the
  `DoAction` function
- Expose `RunTool()` capability through ai.Client and assist.Assist
- Add the "audit-query" action that invokes directly the audit
  generation tool
@hugoShaka hugoShaka force-pushed the hugo/assist-invoke-audit-query branch from 91e9bbd to efebdea Compare August 31, 2023 19:19
@hugoShaka hugoShaka enabled auto-merge August 31, 2023 19:19
@hugoShaka hugoShaka added this pull request to the merge queue Aug 31, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 31, 2023
@hugoShaka hugoShaka added this pull request to the merge queue Aug 31, 2023
Merged via the queue into master with commit dac5af4 Aug 31, 2023
@hugoShaka hugoShaka deleted the hugo/assist-invoke-audit-query branch August 31, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants