zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.68k stars 3.05k forks source link

An option to specify OpenAI endpoint URL and port is missing #17209

Closed Lissanro closed 2 months ago

Lissanro commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When I configure OpenAI, I only see a field for API key but no field to enter URL and port. In my case, OpenAI API backend is running at http://127.0.0.1:5000.

Ollama backend is not useful in my case, because it is using GGUF which runs at half the speed compared to EXL2 last time I checked, and requires downloading hundreds of gigabytes of GGUF models (for example, Mistral Large 2 alone has almost 100GB size), even though I already have them available in EXL2 format.

Besides TabbyAPI, there are many other projects that run OpenAI API, for example text-generation-webui (oobabooga) and many others. Please fix this so it is possible to use Zed locally without ollama.

Environment

The issue happens with any environment

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screenshot_20240831_152624

If applicable, attach your Zed.log file to this issue.

No response

notpeter commented 2 months ago

This is available via the settings and is described in the Zed Assistant Docs. Something like this:

{
  "language_models": {
    "openai": {
      "api_url": "http://127.0.0.1:5000/v1"
    }
  }
}