(request: web.Request)
| 190 | """Start a test server for the module.""" |
| 191 | |
| 192 | async def handler(request: web.Request) -> web.Response: |
| 193 | body = await request.json() |
| 194 | if body.get("stream", False): |
| 195 | return web.Response(body=mock_stream_response) |
| 196 | return web.json_response(mock_response) |
| 197 | |
| 198 | app = web.Application() |
| 199 | app.router.add_route("POST", "/v1/chat/completions", handler) |
nothing calls this directly
no outgoing calls
no test coverage detected