Skip to content

Conversation

@njhale
Copy link
Member

@njhale njhale commented Aug 10, 2024

When tools are added or removed, the socket server runs the script to
regenerate tool definitions. Now that the gateway-provider has been
incorporated as the default model provider, this logic gets stuck
waiting for user confirmation, and leads to the user getting stuck on a
loading screen. This same logic also means that if the LLM attempts to
call any other tool -- which it's prone to doing without being asked to --
we run into the same problem (e.g. the second tool add hangs forever
bug).

To fix this, add a handler to the tool run that auto-approves providers
and auto-denies requests to run any other tool.

Addresses #110

@njhale njhale changed the title fix: auto allow/deny tool run requests when fix: auto allow/deny tool run requests on dynamic tool add/remove Aug 10, 2024
@njhale njhale force-pushed the fix/threads-w-dynamic-tools branch from 3b757fe to 474eab5 Compare August 10, 2024 19:40
@njhale njhale requested review from cjellick and g-linville August 10, 2024 19:45
When tools are added or removed, the socket server runs the script to
regenerate tool definitions. Now that the gateway-provider has been
incorporated as the default model provider, this logic gets stuck
waiting for user confirmation, and leads to the user getting stuck on a
loading screen. This same logic also means that if the LLM attempts to
call any other tool -- which is prone to doing without being asked to --
we run into the same problem (e.g. the second tool add hangs forever
bug).

To fix this, add a handler to the tool run that auto-approves providers
and auto-denies requests to run any other tool.

Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>
@njhale njhale force-pushed the fix/threads-w-dynamic-tools branch from 474eab5 to d6fd2c2 Compare August 10, 2024 20:05
@thedadams thedadams merged commit 2089d84 into gptscript-ai:main Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants