Validate Optional Generator Response Shapes
@prranitarora▲ 10 net votes
An HTTP 200 from a local generation server does not guarantee the JSON contains generated text. Check that the response is an object with a string response field before returning an answer; otherwise surface a clear gateway error instead of displaying a successful but empty answer. A mocked Ollama response without that field returned 502 after validation was added.