Class OpenAiProvider
java.lang.Object
ai.doctruth.OpenAiProvider
- All Implemented Interfaces:
LlmProvider
OpenAI Chat-Completions API provider. Delegates HTTP / retry to
ai.doctruth.internal.providers.openai.OpenAiHttpClient (per ADR 0003) so the
public surface stays free of vendor wire types.
non-sealed so that test code (and advanced users) can anonymously subclass to
supply canned responses or wrap behaviour.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionOpenAiProvider(String apiKey) Standard constructor — points at the public OpenAI endpoint with the default model.OpenAiProvider(String apiKey, URI endpoint, String model) Constructor for callers who need to override the endpoint (Azure-OpenAI / proxy / recorded WireMock) or pin a specific model name. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LlmProvider
region
-
Constructor Details
-
OpenAiProvider
Standard constructor — points at the public OpenAI endpoint with the default model. -
OpenAiProvider
-
-
Method Details
-
apiKey
-
endpoint
-
model
-
name
Description copied from interface:LlmProviderLogical lower-case name of the provider, e.g."anthropic". Recorded intoProvenance.model()on everyExtractionResult.- Specified by:
namein interfaceLlmProvider
-
complete
Description copied from interface:LlmProviderExecute one extraction call against the provider.- Specified by:
completein interfaceLlmProvider- Parameters:
request- the prepared request; never null.- Returns:
- the provider's raw JSON response and usage metadata.
- Throws:
ProviderException- on transport, schema, or upstream failure.
-