Response Types
OpenPO returns a custom response from completions that is compatible with OpenAI chat completion response.
ChatCompletionOutput
class ChatCompletionOutput:
id: str,
provider: str,
model: str,
object: 'chat.completion' | 'chat.completion.chunk',
created: int,
choices: ChatCompletionOutputComplete,
usage: ChatCompletionOutputUsage
class ChatCompletionOutputComplete
finish_reason: str,
index: int,
message: ChatCompletionOutputMessage,
lobprobs: bool,
ChatCompletionStreamOutput
class ChatCompletionStreamOutput:
id: str
provider: str
model: str
object: str
created: int
choices: List[ChatCompletionStreamOutputChoice]