Conversation
…ard errors What: - Added detailed `description` and `examples` fields to Pydantic schemas (`EmbeddingRequest`, `RerankRequest`, etc.) in `src/app/schemas.py` using Pydantic V2 `Field` constructs. - Added new `ErrorResponse`, `ModelList`, and `ModelCard` schemas. - Implemented `/v1/models` (GET) to list available models from `EMBEDDING_MODELS` and `RERANK_MODELS`. - Implemented `/v1/models/unload` (POST) to clear the model cache (`_model_cache.clear()`). - Documented all endpoints in `src/app/main.py` with OpenAPI tags, summaries, and complete `responses` dicts covering 400, 401, 413, 429, 500, and 503 errors. Why: - To provide better developer experience and auto-generated Swagger UI documentation for clients consuming the API. - To maintain parity with standard OpenAI API behavior (e.g., listing models). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Enrich OpenAPI and Swagger UI documentation in
main.pyandschemas.py. Add detailed field descriptions, realistic examples for/v1/embeddings,/v1/rerank,/v1/models,/v1/models/unload, and declare standard error response schemas (400, 401, 413, 429, 503). Ensure schema validity.PR created automatically by Jules for task 4603548394163471290 started by @chottokun