Skip to content

Commit

Permalink
OpenAI gen client (#529)
Browse files Browse the repository at this point in the history
Co-authored-by: Raúl Raja Martínez <[email protected]>
  • Loading branch information
fedefernandez and raulraja authored Nov 9, 2023
1 parent 89547c0 commit 8f1c1b9
Show file tree
Hide file tree
Showing 205 changed files with 10,193 additions and 0 deletions.
1 change: 1 addition & 0 deletions openai-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generator/openai-api.yml
41 changes: 41 additions & 0 deletions openai-client/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

.gitignore
build.gradle.kts
settings.gradle.kts
gradle/**
gradlew
gradlew.bat
README.md
docs/**
src/*Test/**

# Unused models
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionFunctionResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionFunctionResponseChoicesInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestMessageContentPart.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestMessageContentPartText.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestMessageContentPartImage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestMessageContentPartImageImageUrl.kt
167 changes: 167 additions & 0 deletions openai-client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
src/commonMain/kotlin/com/xebia/functional/openai/apis/AssistantApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/AssistantsApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/AudioApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/ChatApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/CompletionsApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/EditsApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/EmbeddingsApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/FilesApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/FineTunesApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/FineTuningApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/ImagesApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/ModelsApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/apis/ModerationsApi.kt
src/commonMain/kotlin/com/xebia/functional/openai/auth/ApiKeyAuth.kt
src/commonMain/kotlin/com/xebia/functional/openai/auth/Authentication.kt
src/commonMain/kotlin/com/xebia/functional/openai/auth/HttpBasicAuth.kt
src/commonMain/kotlin/com/xebia/functional/openai/auth/HttpBearerAuth.kt
src/commonMain/kotlin/com/xebia/functional/openai/auth/OAuth.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/ApiAbstractions.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/ApiClient.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/Base64ByteArray.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/Bytes.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/HttpResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/OctetByteArray.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/PartConfig.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/RequestConfig.kt
src/commonMain/kotlin/com/xebia/functional/openai/infrastructure/RequestMethod.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/AssistantFileObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/AssistantObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/AssistantObjectToolsInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/AssistantToolsCode.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/AssistantToolsFunction.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/AssistantToolsRetrieval.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionFunctionCallOption.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionFunctions.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionMessageToolCall.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionMessageToolCallChunk.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionMessageToolCallChunkFunction.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionMessageToolCallFunction.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionNamedToolChoice.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionNamedToolChoiceFunction.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestAssistantMessage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestAssistantMessageFunctionCall.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestFunctionMessage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestMessage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestSystemMessage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestToolMessage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRequestUserMessage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionResponseMessage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionRole.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionStreamResponseDelta.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionStreamResponseDeltaFunctionCall.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionTool.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ChatCompletionToolChoiceOption.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CompletionUsage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateAssistantFileRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateAssistantRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionRequestFunctionCall.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionRequestResponseFormat.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionResponseChoicesInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionStreamResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateChatCompletionStreamResponseChoicesInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateCompletionRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateCompletionResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateCompletionResponseChoicesInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateCompletionResponseChoicesInnerLogprobs.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateEditRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateEditResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateEditResponseChoicesInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateEmbeddingRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateEmbeddingResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateEmbeddingResponseUsage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateFineTuneRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateFineTuneRequestHyperparameters.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateFineTuningJobRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateFineTuningJobRequestHyperparameters.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateImageRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateMessageRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateModerationRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateModerationResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateModerationResponseResultsInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateModerationResponseResultsInnerCategories.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateModerationResponseResultsInnerCategoryScores.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateRunRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateSpeechRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateThreadAndRunRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateThreadAndRunRequestToolsInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateThreadRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateTranscriptionResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/CreateTranslationResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/DeleteAssistantFileResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/DeleteAssistantResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/DeleteFileResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/DeleteMessageResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/DeleteModelResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/DeleteThreadResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/Embedding.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/Error.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ErrorResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FineTune.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FineTuneEvent.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FineTuneHyperparams.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FineTuningJob.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FineTuningJobError.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FineTuningJobEvent.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FineTuningJobHyperparameters.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/FunctionObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/Image.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ImagesResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListAssistantFilesResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListAssistantsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListFilesResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListFineTuneEventsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListFineTunesResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListFineTuningJobEventsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListMessageFilesResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListMessagesResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListModelsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListPaginatedFineTuningJobsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListRunStepsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListRunsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ListThreadsResponse.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentImageFileObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentImageFileObjectImageFile.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentTextAnnotationsFileCitationObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentTextAnnotationsFileCitationObjectFileCitation.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentTextAnnotationsFilePathObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentTextAnnotationsFilePathObjectFilePath.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentTextObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentTextObjectText.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageContentTextObjectTextAnnotationsInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageFileObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/MessageObjectContentInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/Model.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ModifyAssistantRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ModifyMessageRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ModifyRunRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ModifyThreadRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/OpenAIFile.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunObjectLastError.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunObjectRequiredAction.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunObjectRequiredActionSubmitToolOutputs.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsMessageCreationObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsMessageCreationObjectMessageCreation.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsCodeObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsCodeObjectCodeInterpreter.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsCodeOutputImageObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsCodeOutputImageObjectImage.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsCodeOutputLogsObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsFunctionObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsFunctionObjectFunction.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsObjectToolCallsInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepDetailsToolCallsRetrievalObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepObjectLastError.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunStepObjectStepDetails.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunToolCallObject.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/RunToolCallObjectFunction.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/SubmitToolOutputsRunRequest.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/SubmitToolOutputsRunRequestToolOutputsInner.kt
src/commonMain/kotlin/com/xebia/functional/openai/models/ThreadObject.kt
1 change: 1 addition & 0 deletions openai-client/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.0.1
Loading

0 comments on commit 8f1c1b9

Please sign in to comment.