gptel
gptel copied to clipboard
Support plugins or web browsing
It'd be good to support plugins, specifically the web one to use the newer models that can search (ex: openai/gpt-4o-mini-search-preview).
Checking the message from OpenRouter's web ui is sending I see that the only thing we'd need is adding the plugins section with web
{
"max_tokens": 0,
"messages": [
// Redacted
],
"model": "openai/gpt-4o-mini-search-preview",
"plugins": [
{
"id": "web"
}
],
"reasoning": {},
"stream": true,
"stream_options": {
"include_usage": true
},
"transforms": [
"middle-out"
]
}
I'm happy to implement it if you tell me what kind of changes you would accept.
Hello SNF, as far as I know OpenAI plugins have been deprecated.
That is what is writen on the official Website: https://openai.com/index/chatgpt-plugins/
The successor is "tool use" and it is supported quite well by gptel. These tools work across a range of different LLMs and are not only confined to OpenAI LLMs Look in the wiki
and copy for example the "brave_search" tool it like it is explained in the README in the "tool use" section. https://github.com/karthink/gptel?tab=readme-ov-file#defining-gptel-tools
There is an issue with about 200 comments, which gives you an idea, what the people do with it. https://github.com/karthink/gptel/issues/514
There is even another Project which allows you to use tools conforming to the Model Context Protocol, in gptel, which is the defacto industry standard for tools
See: https://github.com/lizqwerscott/mcp.el for that. Does this resolve your question?
There is an ongoing discussion whether it is helpful to have Support for OpenAI model response and whether adding has any advantages over "gptel tool use" which supports a range of LLMs, do you mean this? than your issue is a duplicate of https://github.com/karthink/gptel/issues/697
Yes, I just find that having integrated websearch is easier to use than having to use an MCP but totally get it if it's not "the future". I'm closing it as it was discussed in those other issues.
Also, I'd like to take this opportunity to thank you all for developing and making this project open source, it's such a nice addition to the ecosystem!
Yes, I just find that having integrated websearch is easier to use
I agree. I'll find a way to add support for it. For now you can simply use the gptel-4o-search-preview and gptel-4o-mini-search-preview models, these have web search integrated
(push 'gpt-4o-mini-search-preview (gptel-backend-models (gptel-get-backend "ChatGPT")))
(push 'gpt-4o-search-preview (gptel-backend-models (gptel-get-backend "ChatGPT")))
(setq gptel-temperature nil) ; gpt-4o-search doesn't support temperature
I had the following, but this requires #828
(setf (gptel-backend-models gptel--openai)
(append (gptel-backend-models gptel--openai)
(--map (prog1 it (put it :capabilities '(reasoning)))
'(gpt-4o-search-preview gpt-4o-mini-search-preview))))
I hope gptel.el can support gpt-4o-search-preview natively.
@eval-exec you could try the implementation I have in https://github.com/karthink/gptel/issues/697#issuecomment-3123670390