All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.xebia.functional.openai.generated.api.OpenAI.kt Maven / Gradle / Ivy

There is a newer version: 0.0.5-alpha.119
Show newest version
/**
 *
 * Please note:
 * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * Do not edit this file manually.
 *
 */

@file:Suppress(
    "ArrayInDataClass",
    "EnumEntryName",
    "RemoveRedundantQualifierName",
    "UnusedImport"
)

package com.xebia.functional.openai.generated.api

import com.xebia.functional.openai.Config
import io.ktor.client.HttpClient
import com.xebia.functional.openai.generated.api.Assistants
import com.xebia.functional.openai.generated.api.Audio
import com.xebia.functional.openai.generated.api.AuditLogs
import com.xebia.functional.openai.generated.api.Batch
import com.xebia.functional.openai.generated.api.Chat
import com.xebia.functional.openai.generated.api.Completions
import com.xebia.functional.openai.generated.api.Embeddings
import com.xebia.functional.openai.generated.api.Files
import com.xebia.functional.openai.generated.api.FineTuning
import com.xebia.functional.openai.generated.api.Images
import com.xebia.functional.openai.generated.api.Invites
import com.xebia.functional.openai.generated.api.Models
import com.xebia.functional.openai.generated.api.Moderations
import com.xebia.functional.openai.generated.api.Projects
import com.xebia.functional.openai.generated.api.Uploads
import com.xebia.functional.openai.generated.api.Users
import com.xebia.functional.openai.generated.api.VectorStores

interface OpenAI : AutoCloseable {
  val assistants: Assistants
  val audio: Audio
  val auditLogs: AuditLogs
  val batch: Batch
  val chat: Chat
  val completions: Completions
  val embeddings: Embeddings
  val files: Files
  val fineTuning: FineTuning
  val images: Images
  val invites: Invites
  val models: Models
  val moderations: Moderations
  val projects: Projects
  val uploads: Uploads
  val users: Users
  val vectorStores: VectorStores
}

fun OpenAI(client: HttpClient, config: Config): OpenAI = object : OpenAI, AutoCloseable {
  override val assistants = Assistants(client, config)
  override val audio = Audio(client, config)
  override val auditLogs = AuditLogs(client, config)
  override val batch = Batch(client, config)
  override val chat = Chat(client, config)
  override val completions = Completions(client, config)
  override val embeddings = Embeddings(client, config)
  override val files = Files(client, config)
  override val fineTuning = FineTuning(client, config)
  override val images = Images(client, config)
  override val invites = Invites(client, config)
  override val models = Models(client, config)
  override val moderations = Moderations(client, config)
  override val projects = Projects(client, config)
  override val uploads = Uploads(client, config)
  override val users = Users(client, config)
  override val vectorStores = VectorStores(client, config)

  override fun close() = client.close()
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy