Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tool usage #291

Open
djr7C4 opened this issue Jan 1, 2025 · 6 comments
Open

Add tool usage #291

djr7C4 opened this issue Jan 1, 2025 · 6 comments

Comments

@djr7C4
Copy link
Contributor

djr7C4 commented Jan 1, 2025

Karthink announced today that gptel has experimental support for tool use now.

Have you thought about adding it to chatgpt-shell? I would be interested in contributing.

@xenodium
Copy link
Owner

xenodium commented Jan 1, 2025

Karthink announced today that gptel has experimental support for tool use now.

Ah, nice!

Have you thought about adding it to chatgpt-shell?

I may wait a little to see how things develop.

I would be interested in contributing.

Great! Let's use this issue to discuss approach when we get to it.

@djr7C4
Copy link
Contributor Author

djr7C4 commented Jan 2, 2025

Here's the announcement: https://www.reddit.com/r/emacs/comments/1hqyuvn/getting_llms_to_do_things_tool_use_with_gptel/. Karthink made a nice blog post on it as well: https://karthinks.com/software/tool-use-with-gptel-looking-for-testers/

The downside of tool use is that you have to tell the model about each tool you want it to be able to use so there will always be many functions missing. An alternative I thought about was simply generating code. That might be ok for some simple tasks but has the issues that LLM code is often buggy (especially when it's trying to do something uncommon) and it would be necessary to have the user review the code before actually running it.

@xenodium
Copy link
Owner

xenodium commented Jan 2, 2025

Yep. I'd be weary of freely allowing elisp execution. Btw, you can somewhat accomplish this by asking for elisp code and C-c C-c on it.

On a somewhat related tangent, it may be interesting to experiment with attaching additional actions to code block responses (requiring user intervention).

  '''elisp [save to...]
  (message "hello world")
  '''

s/'/`

@xenodium
Copy link
Owner

xenodium commented Jan 2, 2025

ps. If you compose on selected text and press i on a response code block, it attempts to paste pack to origin.

@djr7C4
Copy link
Contributor Author

djr7C4 commented Jan 3, 2025

Yeah, having to review the elisp before executing it would probably make it more trouble than it's worth. The i binding is nice.

@xenodium
Copy link
Owner

xenodium commented Jan 3, 2025

Tangentially related https://www.reddit.com/r/LocalLLaMA/comments/1h7sjyt/windsurf_cascade_leaked_system_prompt

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

No branches or pull requests

2 participants