gptme icon indicating copy to clipboard operation
gptme copied to clipboard

feat(wip): started work on subagent and tools refactor

Open ErikBjare opened this issue 3 months ago • 2 comments

Related issues:

  • https://github.com/ErikBjare/gptme/issues/61
  • https://github.com/ErikBjare/gptme/issues/75

Questions

  • Should these subagents be ran in the background? Waking the main agent when done?
From my notes

I should add a function that serves as a wrapper to chat, making a prompt that makes the agent give a JSON return value.

  • Then give the LLM a tool to spawn subagents and check on their status.
  • Give it a sleep/await tool to wait for one or more tasks to complete
    • Feels like I could just prompt it to do this via the reply by providing examples
  • Could also give the sub-LLM a tool to update the status.
    • Low value, but would be nice UX with an indicator

ErikBjare avatar Mar 21 '24 18:03 ErikBjare

Codecov Report

Attention: Patch coverage is 75.00000% with 49 lines in your changes are missing coverage. Please review.

Project coverage is 79.71%. Comparing base (e256fc9) to head (c7121c2).

:exclamation: Current head c7121c2 differs from pull request most recent head cd7943b

Please upload reports for the commit cd7943b to get more accurate results.

Files Patch % Lines
gptme/tools/subagent.py 46.29% 29 Missing :warning:
gptme/tools/__init__.py 81.33% 14 Missing :warning:
gptme/prompts.py 25.00% 6 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
- Coverage   81.38%   79.71%   -1.67%     
==========================================
  Files          27       29       +2     
  Lines        1896     2066     +170     
==========================================
+ Hits         1543     1647     +104     
- Misses        353      419      +66     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 22 '24 14:03 codecov-commenter

Ended up refactoring how tools are defined and registered, including how their prompts are constructed from their tool specs. Tools are extremely modular now.

ErikBjare avatar Mar 26 '24 20:03 ErikBjare