mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(fix) locust load test
This commit is contained in:
parent
8bfb00cdab
commit
786df1d574
2 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@ from fastapi import FastAPI, Request, status, HTTPException, Depends
|
|||
from fastapi.responses import StreamingResponse
|
||||
from fastapi.security import OAuth2PasswordBearer
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
import uuid
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
@ -23,7 +24,7 @@ app.add_middleware(
|
|||
@app.post("/v1/chat/completions")
|
||||
async def completion(request: Request):
|
||||
return {
|
||||
"id": "chatcmpl-123",
|
||||
"id": f"chatcmpl-{uuid.uuid4().hex}",
|
||||
"object": "chat.completion",
|
||||
"created": 1677652288,
|
||||
"model": "gpt-3.5-turbo-0125",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue