Class OpenAIModel
java.lang.Object
ai.singlr.openai.OpenAIModel
- All Implemented Interfaces:
Model, AutoCloseable
OpenAI model implementation using the Responses API.
All requests use SSE streaming internally for robust timeout handling. Synchronous chat(List, List) methods stream under the hood and accumulate the response, avoiding HTTP read timeouts on
long-running generations. A per-line idle timeout detects stalled streams and throws a retryable
OpenAIException.
-
Method Details
-
id
-
provider
-
contextWindow
public int contextWindow()- Specified by:
contextWindowin interfaceModel
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceModel
-
chat
-
chat
-
chatStream
- Specified by:
chatStreamin interfaceModel
-