Buckets:
| from fastapi import FastAPI, Request | |
| from fastapi.responses import JSONResponse | |
| app = FastAPI() | |
| async def chat_completions(request: Request): | |
| body = await request.json() | |
| print("\n===== π₯ Incoming Request Body =====") | |
| print(body) | |
| print("====================================\n") | |
| # OpenAI μλ΅ νμ νλ΄λ΄κΈ° | |
| return JSONResponse({ | |
| "id": "chatcmpl-mock", | |
| "object": "chat.completion", | |
| "created": 1234567890, | |
| "model": body.get("model", "mock-model"), | |
| "choices": [ | |
| { | |
| "index": 0, | |
| "message": { | |
| "role": "assistant", | |
| "content": "This is a mock response." | |
| }, | |
| "finish_reason": "stop" | |
| } | |
| ], | |
| "usage": { | |
| "prompt_tokens": 10, | |
| "completion_tokens": 5, | |
| "total_tokens": 15 | |
| } | |
| }) | |
Xet Storage Details
- Size:
- 961 Bytes
- Xet hash:
- 04b7f16be9d6c6552e201ad769db4707c22787b867569aed2dde326034b9f0e1
Β·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.