Skip to content

Implement Web Search tool in /chat/completions #5018

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

Open
SuperPat45 opened this issue Mar 14, 2025 · 1 comment
Open

Implement Web Search tool in /chat/completions #5018

SuperPat45 opened this issue Mar 14, 2025 · 1 comment
Labels
enhancement New feature or request roadmap

Comments

@SuperPat45
Copy link

OpenAI has just unveiled a new Web Search tool for the /chat/completions API and the new ‘Response’ API:
https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat

curl -X POST "https://api.openai.com/v1/chat/completions" \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -H "Content-type: application/json" \
    -d '{
        "model": "gpt-4o-search-preview",
        "web_search_options": {
            "user_location": {
                "type": "approximate",
                "approximate": {
                    "country": "GB",
                    "city": "London",
                    "region": "London",
                }
            }
        },
        "messages": [{
            "role": "user",
            "content": "What are the best restaurants around Granary Square?"
        }]
    }'


[
  {
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "the model response is here...",
      "refusal": null,
      "annotations": [
        {
          "type": "url_citation",
          "url_citation": {
            "end_index": 985,
            "start_index": 764,
            "title": "Page title...",
            "url": "https://..."
          }
        }
      ]
    },
    "finish_reason": "stop"
  }
]

It would be great if LocalAI could implement this tool, perhaps using Hugging Face's Open Deep Research implementation: https://huggingface.co/blog/open-deep-research

@SuperPat45 SuperPat45 added the enhancement New feature or request label Mar 14, 2025
@mudler mudler added the roadmap label Mar 14, 2025
@mudler
Copy link
Owner

mudler commented Mar 14, 2025

This would be a nice addition. Looking forward to have more feature level parity with OpenAI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request roadmap
Projects
None yet
Development

No branches or pull requests

2 participants