lm-sys / lm-sys/FastChat

OpenAI-compat: gen_api_answer.py --openai-api-base /v1, not the API server

Open Beginner friendly
#3,928 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

## Working config (`gen_api_answer.py --openai-api-base` `/v1`)

The consumer path is `fastchat/llm_judge/gen_api_answer.py`. `--openai-api-base` sets legacy `openai.api_base` to the `/v1` root. That is the OpenAI-compatible join for answering against a remote Chat Completions host.

`docs/openai_api.md` is the **server** (`fastchat.serve.openai_api_server`). Do not start a controller or worker to talk to a hosted `/v1`. Override default `gpt-3.5-turbo` with a catalog id.

A Chat Completions host whose public catalog is `GET https://api.pzero.studio/v1/models` (no key) fits `--openai-api-base` if the value is `https://api.pzero.studio/v1`.

```
export OPENAI_API_KEY=
python gen_api_answer.py \
--model deepseek-v4-flash \
--openai-api-base https://api.pzero.studio/v1
```

Keep embeddings off this host.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review fastchat/llm_judge/gen_api_answer.py alongside docs/openai_api.md to distinguish the consumer configuration from the API server setup. Verify the documented command uses a remote /v1 base, a catalog model id, and no embeddings; done means the documentation clearly reflects this workflow without requiring a controller or worker.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.