Class AntsOpenAI
java.lang.Object
com.ants.platform.guardrails.providers.AntsOpenAI
OpenAI Chat Completions wrapper with guardrail enforcement and trace logging.
var client = AntsOpenAI.builder()
.openaiApiKey("sk-...")
.antsApiKey("pk:sk")
.agentId("agent_123")
.build();
JsonNode response = client.chatCompletion(
"gpt-4o-mini", 100,
List.of(Map.of("role", "user", "content", "Hello"))
);
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AntsOpenAI.Builderbuilder()com.fasterxml.jackson.databind.JsonNodeSend a chat completion request with guardrail checks on input and output.
-
Method Details
-
builder
-
chatCompletion
-