Loading topic
Protocol or abstract class is.3 min readProtocol or abstract class is, and have called a hosted chat completion API at least once. The neutral request and respon3 min readMessage, ChatRequest, ChatResponse types and the ChatProvider protocol from the earlier chapters. The examples import them from a module called llm_types. You also need Python 3.10 or later and the httpx package.1 min readChatRequest, ChatResponse), the ChatProvider protocol, and FakeProvider from the earlier chapters in the same module. It also assumes you can read environment variables in Python.2 min readMessage, ChatRequest, ChatResponse) and the ChatProvider Protocol from the earlier chapters. You should also be comfortable with assert statements or a test runner such as pytest.2 min readChatProvider protocol, and at least one adapter from earlier chapters. You should also know common HTTP status codes.2 min readProviderError class from the earlier chapters. You should also know what server-sent events are: a response body delivered as many small JSON events instead of one.2 min readChatRequest and ChatResponse types, the ChatProvider protocol, and the ProviderError class with its retryable flag from earlier chapters. It also assumes you are comfortable with Python exceptions and loops.3 min readChatProvider interface, and at least one adapter from the earlier chapters. It also assumes you know what an HTTP proxy is. Writing every adapter yourself is not always the right call. Here you decide when to adopt something that already e2 min read