MCPcopy
hub / github.com/ModelTC/LightLLM / compat_generate

Function compat_generate

lightllm/server/api_http.py:216–222  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

214
215@app.post("/")
216async def compat_generate(request: Request) -> Response:
217 request_dict = await request.json()
218 stream = request_dict.pop("stream", False)
219 if stream:
220 return await generate_stream(request)
221 else:
222 return await generate(request)
223
224
225@app.post("/v1/chat/completions", response_model=ChatCompletionResponse)

Callers

nothing calls this directly

Calls 3

generateFunction · 0.85
popMethod · 0.80
generate_streamFunction · 0.70

Tested by

no test coverage detected