Package-level declarations

Functions

Link copied to clipboard
fun Chat.Companion.OpenAI(openAICompatibleClient: OpenAICompatibleClient): Chat
fun StreamingChat.Companion.OpenAI(openAICompatibleClient: OpenAICompatibleClient): StreamingChat

Chat interface for any OpenAI-compatible client

fun Chat.Companion.OpenAI(apiKey: ApiKey, http: HttpHandler = JavaHttpClient(), org: OpenAIApi.Org? = null): Chat
fun StreamingChat.Companion.OpenAI(apiKey: ApiKey, http: HttpHandler = JavaHttpClient(), org: OpenAIApi.Org? = null): StreamingChat

OpenAI Chat interface for using with the real OpenAI API endpoints

Link copied to clipboard
fun List<Choice>.toHttp4k(): Message.Assistant
fun CompletionResponse.toHttp4k(): ChatResponse
fun ToolCall.toHttp4k(): ToolRequest
Link copied to clipboard
fun ChatResponseFormat.toOpenAI(): ResponseFormat.JsonSchema?
fun Content.toOpenAI(): MessageContent
fun Message.toOpenAI(): Message
fun LLMTool.toOpenAI(): Tool
fun ToolRequest.toOpenAI(): ToolCall
fun ChatRequest.toOpenAI(stream: Boolean): ChatCompletion