Package uno.anahata.asi.openai.compatible.adapter
package uno.anahata.asi.openai.compatible.adapter
Provides specialized adapters for translating between Anahata's model-agnostic
domain objects and OpenAI-compatible wire formats.
This package handles the "Turn Synthesis" logic required by the OpenAI Chat
Completion API, where Anahata's interleaved model messages and tool responses
must be flattened into specific assistant and tool message sequences.
Key Functional Areas:
- Message Mapping: Direct translation of
Roleto OpenAI-compliant role strings (user, assistant, system, tool). - Multimodal Adaptation: Conversion of
BlobPartinto Base64-encoded Data URIs for the OpenAI vision blocks. - Metadata Interleaving: Implementation of Anahata's V2 in-band metadata strategy within the constraints of the OpenAI payload structure.
- Author:
- anahata
-
ClassesClassDescriptionA specialized content adapter that translates Anahata's domain model into standard OpenAI-compatible JSON objects for the Chat Completion API.

