Full Code of MarcoDotIO/OpenAIKit for AI

main 0aed4b9a087e cached
250 files
665.2 KB
185.6k tokens
1 requests
Download .txt
Showing preview only (746K chars total). Download the full file or copy to clipboard to get everything.
Repository: MarcoDotIO/OpenAIKit
Branch: main
Commit: 0aed4b9a087e
Files: 250
Total size: 665.2 KB

Directory structure:
gitextract_yuqwznni/

├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   └── feature_request.yml
│   ├── pull_request_template.md
│   └── workflows/
│       └── swift.yml
├── .gitignore
├── .swiftpm/
│   └── xcode/
│       └── package.xcworkspace/
│           └── contents.xcworkspacedata
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Examples/
│   ├── iOS_Example/
│   │   ├── iOS_Example/
│   │   │   ├── Assets.xcassets/
│   │   │   │   ├── AccentColor.colorset/
│   │   │   │   │   └── Contents.json
│   │   │   │   ├── AppIcon.appiconset/
│   │   │   │   │   └── Contents.json
│   │   │   │   └── Contents.json
│   │   │   ├── Audio/
│   │   │   │   ├── AudioPlayerViewModel.swift
│   │   │   │   └── CreateTranscription.swift
│   │   │   ├── Chat/
│   │   │   │   ├── ChatMainView.swift
│   │   │   │   ├── CreateChatCompletion.swift
│   │   │   │   ├── CreateChatCompletionStreaming.swift
│   │   │   │   └── CreateChatFunctionCallExample.swift
│   │   │   ├── Completion/
│   │   │   │   ├── CompletionMainView.swift
│   │   │   │   └── GenerateCompletionExample.swift
│   │   │   ├── Content Policy/
│   │   │   │   └── ContentPolicyExample.swift
│   │   │   ├── ContentView.swift
│   │   │   ├── Embeddings/
│   │   │   │   └── CreateEmbeddingsExample.swift
│   │   │   ├── File/
│   │   │   │   ├── DeleteFileExample.swift
│   │   │   │   ├── File/
│   │   │   │   │   └── SampleData.jsonl
│   │   │   │   ├── FileDetailsView.swift
│   │   │   │   ├── FileMainView.swift
│   │   │   │   ├── ListFilesExample.swift
│   │   │   │   ├── RetrieveFileContentsExample.swift
│   │   │   │   ├── RetrieveFileExample.swift
│   │   │   │   └── UploadFileExample.swift
│   │   │   ├── Image/
│   │   │   │   ├── EditImageExample.swift
│   │   │   │   ├── GenerateImageExample.swift
│   │   │   │   ├── GenerateImageVariationsExample.swift
│   │   │   │   └── ImageMainView.swift
│   │   │   ├── Model/
│   │   │   │   ├── ListModelsExample.swift
│   │   │   │   ├── ModelMainView.swift
│   │   │   │   └── RetrieveModelExample.swift
│   │   │   ├── Preview Content/
│   │   │   │   └── Preview Assets.xcassets/
│   │   │   │       └── Contents.json
│   │   │   └── iOS_ExampleApp.swift
│   │   └── iOS_Example.xcodeproj/
│   │       ├── project.pbxproj
│   │       └── project.xcworkspace/
│   │           ├── contents.xcworkspacedata
│   │           └── xcshareddata/
│   │               └── IDEWorkspaceChecks.plist
│   ├── macOS_Example/
│   │   ├── macOS_Example/
│   │   │   ├── Assets.xcassets/
│   │   │   │   ├── AccentColor.colorset/
│   │   │   │   │   └── Contents.json
│   │   │   │   ├── AppIcon.appiconset/
│   │   │   │   │   └── Contents.json
│   │   │   │   └── Contents.json
│   │   │   ├── ContentView.swift
│   │   │   ├── Preview Content/
│   │   │   │   └── Preview Assets.xcassets/
│   │   │   │       └── Contents.json
│   │   │   ├── macOS_Example.entitlements
│   │   │   └── macOS_ExampleApp.swift
│   │   └── macOS_Example.xcodeproj/
│   │       ├── project.pbxproj
│   │       └── project.xcworkspace/
│   │           ├── contents.xcworkspacedata
│   │           └── xcshareddata/
│   │               └── IDEWorkspaceChecks.plist
│   ├── tvOS_Example/
│   │   ├── tvOS_Example/
│   │   │   ├── Assets.xcassets/
│   │   │   │   ├── AccentColor.colorset/
│   │   │   │   │   └── Contents.json
│   │   │   │   ├── App Icon & Top Shelf Image.brandassets/
│   │   │   │   │   ├── App Icon - App Store.imagestack/
│   │   │   │   │   │   ├── Back.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   ├── Contents.json
│   │   │   │   │   │   ├── Front.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   └── Middle.imagestacklayer/
│   │   │   │   │   │       ├── Content.imageset/
│   │   │   │   │   │       │   └── Contents.json
│   │   │   │   │   │       └── Contents.json
│   │   │   │   │   ├── App Icon.imagestack/
│   │   │   │   │   │   ├── Back.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   ├── Contents.json
│   │   │   │   │   │   ├── Front.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   └── Middle.imagestacklayer/
│   │   │   │   │   │       ├── Content.imageset/
│   │   │   │   │   │       │   └── Contents.json
│   │   │   │   │   │       └── Contents.json
│   │   │   │   │   ├── Contents.json
│   │   │   │   │   ├── Top Shelf Image Wide.imageset/
│   │   │   │   │   │   └── Contents.json
│   │   │   │   │   └── Top Shelf Image.imageset/
│   │   │   │   │       └── Contents.json
│   │   │   │   └── Contents.json
│   │   │   ├── ContentView.swift
│   │   │   ├── Preview Content/
│   │   │   │   └── Preview Assets.xcassets/
│   │   │   │       └── Contents.json
│   │   │   └── tvOS_ExampleApp.swift
│   │   └── tvOS_Example.xcodeproj/
│   │       ├── project.pbxproj
│   │       └── project.xcworkspace/
│   │           ├── contents.xcworkspacedata
│   │           └── xcshareddata/
│   │               └── IDEWorkspaceChecks.plist
│   └── watchOS_Example/
│       ├── watchOS_Example Watch App/
│       │   ├── Assets.xcassets/
│       │   │   ├── AccentColor.colorset/
│       │   │   │   └── Contents.json
│       │   │   ├── AppIcon.appiconset/
│       │   │   │   └── Contents.json
│       │   │   └── Contents.json
│       │   ├── ContentView.swift
│       │   ├── Preview Content/
│       │   │   └── Preview Assets.xcassets/
│       │   │       └── Contents.json
│       │   └── watchOS_ExampleApp.swift
│       └── watchOS_Example.xcodeproj/
│           ├── project.pbxproj
│           └── project.xcworkspace/
│               ├── contents.xcworkspacedata
│               └── xcshareddata/
│                   └── IDEWorkspaceChecks.plist
├── LICENSE
├── Package.swift
├── Package@swift-5.5.swift
├── Package@swift-5.6.swift
├── Package@swift-5.7.swift
├── Package@swift-5.8.swift
├── README.md
├── SECURITY.md
├── Sources/
│   └── OpenAIKit/
│       ├── Client/
│       │   ├── AudioSpeechResource+API.swift
│       │   ├── BatchesResource+API.swift
│       │   ├── BetaResources+API.swift
│       │   ├── ContainersResource+API.swift
│       │   ├── ConversationsResource+API.swift
│       │   ├── EvalsResource+API.swift
│       │   ├── FineTuningResource+API.swift
│       │   ├── RealtimeResource+API.swift
│       │   ├── ResourceNamespaces.swift
│       │   ├── ResponsesResource+API.swift
│       │   ├── SkillsAndVideosResource+API.swift
│       │   ├── UploadsResource+API.swift
│       │   ├── VectorStoresResource+API.swift
│       │   └── WebhooksResource+Helpers.swift
│       ├── Extensions/
│       │   ├── NSImageExtension.swift
│       │   ├── NSMutableDataExtension.swift
│       │   ├── String.swift
│       │   └── StringPropertyMap.swift
│       ├── OpenAI.swift
│       ├── Protocols/
│       │   ├── Chat/
│       │   │   └── Property.swift
│       │   └── OpenAIProtocol.swift
│       ├── Types/
│       │   ├── Enums/
│       │   │   ├── Audio/
│       │   │   │   └── AudioResponseFormat.swift
│       │   │   ├── Chat/
│       │   │   │   ├── ChatModels.swift
│       │   │   │   └── ChatRole.swift
│       │   │   ├── Completions/
│       │   │   │   └── CompletionModels.swift
│       │   │   ├── Files/
│       │   │   │   └── FileStatus.swift
│       │   │   ├── Images/
│       │   │   │   ├── ImageData.swift
│       │   │   │   ├── ImageModel.swift
│       │   │   │   ├── ImageQuality.swift
│       │   │   │   ├── ImageResolutions.swift
│       │   │   │   ├── ImageStyle.swift
│       │   │   │   └── ResponseFormat.swift
│       │   │   ├── Moderations/
│       │   │   │   └── ContentPolicyModels.swift
│       │   │   └── OpenAI/
│       │   │       ├── OpenAIErrors.swift
│       │   │       └── OpenAIObject.swift
│       │   └── Structs/
│       │       ├── Parameters/
│       │       │   ├── Audio/
│       │       │   │   ├── SpeechParameters.swift
│       │       │   │   └── TranscriptionParameters.swift
│       │       │   ├── Batches/
│       │       │   │   └── BatchParameters.swift
│       │       │   ├── Beta/
│       │       │   │   └── AssistantParameters.swift
│       │       │   ├── Chat/
│       │       │   │   ├── ChatParameters.swift
│       │       │   │   ├── ChatResponseFormat.swift
│       │       │   │   ├── ChatTool.swift
│       │       │   │   ├── Function.swift
│       │       │   │   ├── Parameter.swift
│       │       │   │   └── ParameterDetail.swift
│       │       │   ├── Completions/
│       │       │   │   └── CompletionParameters.swift
│       │       │   ├── Containers/
│       │       │   │   └── ContainerParameters.swift
│       │       │   ├── Conversations/
│       │       │   │   └── ConversationParameters.swift
│       │       │   ├── Embeddings/
│       │       │   │   └── EmbeddingsParameters.swift
│       │       │   ├── Evals/
│       │       │   │   └── EvalParameters.swift
│       │       │   ├── Files/
│       │       │   │   └── UploadFileParameters.swift
│       │       │   ├── FineTuning/
│       │       │   │   └── FineTuningParameters.swift
│       │       │   ├── Images/
│       │       │   │   ├── ImageEditParameters.swift
│       │       │   │   ├── ImageParameters.swift
│       │       │   │   └── ImageVariationParameters.swift
│       │       │   ├── Moderations/
│       │       │   │   └── ConentPolicyParameters.swift
│       │       │   ├── Realtime/
│       │       │   │   └── RealtimeParameters.swift
│       │       │   ├── Responses/
│       │       │   │   └── ResponseParameters.swift
│       │       │   ├── Skills/
│       │       │   │   └── SkillParameters.swift
│       │       │   ├── Uploads/
│       │       │   │   └── UploadParameters.swift
│       │       │   ├── VectorStores/
│       │       │   │   └── VectorStoreParameters.swift
│       │       │   └── Videos/
│       │       │       └── VideoParameters.swift
│       │       └── Schemas/
│       │           ├── Audio/
│       │           │   └── TranscriptionResponse.swift
│       │           ├── Batches/
│       │           │   └── BatchModels.swift
│       │           ├── Beta/
│       │           │   └── AssistantModels.swift
│       │           ├── Chat/
│       │           │   └── ChatResponse.swift
│       │           ├── Completions/
│       │           │   └── CompletionResponse.swift
│       │           ├── Containers/
│       │           │   └── ContainerModels.swift
│       │           ├── Conversations/
│       │           │   └── ConversationModels.swift
│       │           ├── Embeddings/
│       │           │   ├── EmbeddingsData.swift
│       │           │   ├── EmbeddingsResponse.swift
│       │           │   └── EmbeddingsUsage.swift
│       │           ├── Evals/
│       │           │   └── EvalModels.swift
│       │           ├── Files/
│       │           │   ├── File.swift
│       │           │   ├── FileContent.swift
│       │           │   └── ListFilesResponse.swift
│       │           ├── FineTuning/
│       │           │   └── FineTuningModels.swift
│       │           ├── Images/
│       │           │   └── ImageResponse.swift
│       │           ├── Models/
│       │           │   ├── ListModelResponse.swift
│       │           │   └── Model.swift
│       │           ├── Moderations/
│       │           │   ├── ContentPolicyCategories.swift
│       │           │   ├── ContentPolicyCategoryScore.swift
│       │           │   ├── ContentPolicyResponse.swift
│       │           │   └── ContentPolicyResult.swift
│       │           ├── OpenAI/
│       │           │   ├── ChatChoice.swift
│       │           │   ├── ChatMessage.swift
│       │           │   ├── Choice.swift
│       │           │   ├── Configuration.swift
│       │           │   ├── DeleteObject.swift
│       │           │   ├── FormData.swift
│       │           │   ├── FunctionCall.swift
│       │           │   ├── OpenAIErrorMessage.swift
│       │           │   ├── OpenAIErrorResponse.swift
│       │           │   ├── OpenAIRequestOptions.swift
│       │           │   └── Usage.swift
│       │           ├── Realtime/
│       │           │   └── RealtimeModels.swift
│       │           ├── Responses/
│       │           │   └── ResponseModels.swift
│       │           ├── Skills/
│       │           │   └── SkillModels.swift
│       │           ├── Uploads/
│       │           │   └── UploadModels.swift
│       │           ├── VectorStores/
│       │           │   └── VectorStoreModels.swift
│       │           └── Videos/
│       │               └── VideoModels.swift
│       └── Utils/
│           ├── ClampedPropertyWrapper.swift
│           ├── FormDataHelper.swift
│           ├── GenericCodingKeys.swift
│           ├── OpenAIKitSession.swift
│           ├── OpenAIStreamer/
│           │   ├── OpenAIEvent.swift
│           │   ├── OpenAISource.swift
│           │   └── OpenAIStreamParser.swift
│           └── Whisper/
│               ├── SRT.swift
│               └── WebVTT.swift
└── Tests/
    ├── OpenAIKitTests/
    │   ├── Client/
    │   │   ├── OpenAIAudioSpeechTests.swift
    │   │   ├── OpenAIBatchesTests.swift
    │   │   ├── OpenAIBetaAssistantsTests.swift
    │   │   ├── OpenAIClientScaffoldTests.swift
    │   │   ├── OpenAIContainersTests.swift
    │   │   ├── OpenAIConversationsTests.swift
    │   │   ├── OpenAIEncodingMigrationTests.swift
    │   │   ├── OpenAIEvalsTests.swift
    │   │   ├── OpenAIFineTuningTests.swift
    │   │   ├── OpenAIRealtimeTests.swift
    │   │   ├── OpenAIResponsesTests.swift
    │   │   ├── OpenAISkillsAndVideosTests.swift
    │   │   ├── OpenAITransportOptionsTests.swift
    │   │   ├── OpenAIUploadsTests.swift
    │   │   ├── OpenAIVectorStoresTests.swift
    │   │   └── OpenAIWebhooksTests.swift
    │   ├── Extension/
    │   │   └── BundleExtension.swift
    │   ├── Mocks/
    │   │   └── MockOpenAI.swift
    │   ├── OpenAIKitTests.swift
    │   └── Types/
    │       └── Enums/
    │           └── MockOpenAIError.swift
    ├── Resources/
    │   └── JSON Responses/
    │       ├── Completions/
    │       │   └── CompletionResponse.json
    │       ├── Content Policy/
    │       │   └── ContentPolicyResponse.json
    │       ├── Delete File/
    │       │   └── DeleteFileResponse.json
    │       ├── Images/
    │       │   ├── Embeddings/
    │       │   │   └── EmbeddingsResponse.json
    │       │   ├── NumberOfImages/
    │       │   │   ├── ImageURL-1.json
    │       │   │   ├── ImageURL0.json
    │       │   │   ├── ImageURL1.json
    │       │   │   ├── ImageURL10.json
    │       │   │   ├── ImageURL11.json
    │       │   │   └── ImageURL2.json
    │       │   ├── Prompt/
    │       │   │   ├── ImageApple.json
    │       │   │   └── ImageOtter.json
    │       │   ├── Resolution/
    │       │   │   ├── Large/
    │       │   │   │   ├── ImageB64Large.json
    │       │   │   │   └── ImageURLLarge.json
    │       │   │   ├── Medium/
    │       │   │   │   ├── ImageB64Medium.json
    │       │   │   │   └── ImageURLMedium.json
    │       │   │   └── Small/
    │       │   │       ├── ImageB64Small.json
    │       │   │       └── ImageURLSmall.json
    │       │   └── ResponseFormat/
    │       │       ├── ImageB64.json
    │       │       └── ImageURL.json
    │       ├── List Files/
    │       │   └── ListFilesResponse.json
    │       ├── List Models/
    │       │   └── ModelsResponse.json
    │       └── Retrieve Model/
    │           └── RetrieveModelResponse.json
    └── Test Plans/
        └── iOS-TS.xctestplan

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
github: MarcoDotIO

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Bug report
description: Create a report to help us improve
labels: ["bug"]
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to fill out this bug report!
  - type: textarea
    id: what-happened
    attributes:
      label: Describe the bug
      description: A clear and concise description of what the bug is, and any additional context.
      placeholder: Tell us what you see!
    validations:
      required: true
  - type: textarea
    id: repro-steps
    attributes:
      label: To Reproduce
      description: Steps to reproduce the behavior.
      placeholder: |
        1. Fetch a '...'
        2. Update the '....'
        3. See error
    validations:
      required: true
  - type: textarea
    id: code-snippets
    attributes:
      label: Code snippets
      description: If applicable, add code snippets to help explain your problem.
      render: Swift
    validations:
      required: false
  - type: input
    id: os
    attributes:
      label: OS
      placeholder: macOS
    validations:
      required: true
  - type: input
    id: language-version
    attributes:
      label: Swift Version
      placeholder: Swift 5.7
    validations:
      required: true
  - type: input
    id: xcode-version
    attributes:
      label: Xcode Version
      placeholder: Xcode 14.1
    validations:
      required: true
  - type: input
    id: lib-version
    attributes:
      label: Library version
      placeholder: OpenAIKit v1.0.0
    validations:
      required: true


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Feature request
description: Suggest an idea for this library
labels: ["feature-request"]
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to fill out this feature request!
  - type: textarea
    id: feature
    attributes:
      label: Describe the feature or improvement you're requesting
      description: A clear and concise description of what you want to happen.
    validations:
      required: true
  - type: textarea
    id: context
    attributes:
      label: Additional context
      description: Add any other context about the feature request here.


================================================
FILE: .github/pull_request_template.md
================================================
## Describe your changes

## Issue ticket number and link

## Checklist before requesting a review
- [ ] I have performed a self-review of my code
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics?
- [ ] Will this be part of a product update? If yes, please write one phrase about this update.


================================================
FILE: .github/workflows/swift.yml
================================================
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: Swift

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:

    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v3
    - name: Build
      run: swift build -v
    - name: Run tests
      run: swift test -v


================================================
FILE: .gitignore
================================================
# Mac OS X
.DS_Store

# Cursor IDE
.cursor/

# Xcode

## Build generated
build/
DerivedData

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata

## Other
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
.build/

# Carthage
Carthage/Build
.UlyssesRoot
.Ulysses-Settings.plist
.Ulysses-Group.plist

================================================
FILE: .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:">
   </FileRef>
</Workspace>


================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project are documented in this file.

## 3.0.0 - 2026-02-19

### Breaking Changes
- Introduced a modular resource-first client surface (for example `client.chat.completions`, `client.responses`, `client.uploads`) as the primary 3.x API.
- Migrated core request payloads from manual dictionaries to strongly typed `Encodable` request models.
- Updated package language mode to Swift 6.2 with Swift 6 concurrency checks enabled.

### Added
- Added Responses resources (`create`, `stream`, `parse`, `retrieve`, `cancel`, `delete`) and typed input item/token helpers.
- Added Realtime resources with calls, client secret support, and connection manager abstractions.
- Added Uploads resources with upload parts and upload completion flows.
- Added Conversations resources with nested conversation items APIs.
- Added Containers resources with nested files/content APIs.
- Added Evals resources with runs and output items APIs.
- Added Skills resources (including versions and content APIs) and Videos resources.
- Added webhook signature verification and typed `unwrap` helpers.
- Added/expanded resource coverage for Audio speech, Vector stores, Batches, Fine-tuning jobs, and Beta assistants/threads.

### Changed
- Improved transport configuration with typed request options (timeouts, retries, additional headers) and typed status error mapping.
- Expanded `Configuration` to include project ID, webhook secret, base URL, and richer request options.
- Modernized chat parameter modeling to cover current chat completion fields (tools, response format, token controls, etc.).

### Concurrency and Hardening
- Hardened streaming and transport internals for Swift 6.2 concurrency compatibility.
- Added `Sendable` conformances and safe type constraints across streamed/response model surfaces.

### Docs and Tests
- Added migration guidance for 2.x -> 3.x in the README.
- Added comprehensive step-based tests for each newly introduced resource area and compatibility behavior.


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
  advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
  address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
@OpenDive on Twitter.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior,  harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Transcriptase
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## We Develop with Github
We use github to host code, to track issues and feature requests, as well as accept pull requests.

## We Use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow), So All Code Changes Happen Through Pull Requests
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow). We actively welcome your pull requests:

1. Fork the repo and create your branch from `main`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. Issue that pull request!

## Any contributions you make will be under the MIT Software License
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](https://github.com/OpenDive/OpenAIKit/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/OpenDive/OpenAIKit/issues/new/choose); it's that easy!

## Write bug reports with detail, background, and sample code
[This is an example](http://stackoverflow.com/q/12488905/180626) of a bug report Brian A. Danielak wrote, and I think it's not a bad model. Here's [another example from Craig Hockenberry](http://www.openradar.me/11905408), an app developer whom I greatly respect.

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
  - Be specific!
  - Give sample code if you can. [My stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what I was seeing
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People *love* thorough bug reports. I'm not even kidding.

## Use a Consistent Coding Style
I'm again borrowing these from [Facebook's Guidelines](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)

* 2 spaces for indentation rather than tabs
* You can try running `swiftlint` for style unification

## License
By contributing, you agree that your contributions will be licensed under its MIT License.

## References
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)


================================================
FILE: Examples/iOS_Example/iOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
  "colors" : [
    {
      "idiom" : "universal"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "universal",
      "platform" : "ios",
      "size" : "1024x1024"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Audio/AudioPlayerViewModel.swift
================================================
//
//  AudioPlayerViewModel.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

import SwiftUI
import AVFoundation

class AudioPlayerViewModel: ObservableObject {
    private var audioPlayer: AVAudioPlayer?

    func play(audioData: Data?) {
        guard let data = audioData else {
            print("No audio data set")
            return
        }
        
        do {
            audioPlayer = try AVAudioPlayer(data: data)
            audioPlayer?.play()
        } catch {
            print("Error initializing audio player: \(error.localizedDescription)")
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Audio/CreateTranscription.swift
================================================
//
//  CreateTranscription.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

import SwiftUI
import OpenAIKit
import AVFoundation

enum TranscriptionType: String, CaseIterable, Identifiable {
    case english
    case dutch

    var id: Self { self }
}

struct CreateTranscriptionExample: View {
    @StateObject private var viewModel = AudioPlayerViewModel()

    @State private var isCompleting: Bool = false
    @State private var transcription: String = ""
    @State private var selectedLanguage: TranscriptionType = .english

    var audioData: Data? {
        switch selectedLanguage {
        case .english:
            return self.retrieveAudio(type: .english)
        case .dutch:
            return self.retrieveAudio(type: .dutch)
        }
    }

    // English Audio Source: https://librivox.org/12-creepy-tales-by-edgar-allan-poe/
    // 12 - THE PIT AND THE PENDULUM -- Narrator: Eden Rea-Hedrick
    // ---------------------------------------------------------------------------------------
    // Dutch Audio Source: https://librivox.org/the-raven-multilingual-by-edgar-allan-poe/
    // 04 - Dutch: De Raaf (John F. Malta) -- Narrator: Julie VW
    private func retrieveAudio(type: TranscriptionType) -> Data? {
        guard
            let filePath = Bundle.main.path(
                forResource: type == .english ? "audio" : "audio_translation",
                ofType: "mp3"
            ),
            let audio = try? Data(contentsOf: URL(fileURLWithPath: filePath))
        else {
            return nil
        }

        return audio
    }

    var body: some View {
        VStack {
            Picker("Transcription Type", selection: $selectedLanguage) {
                Text("Regular Transcription").tag(TranscriptionType.english)
                Text("Translation Transcription").tag(TranscriptionType.dutch)
            }
            .padding(.bottom, 90)

            Button {
                self.viewModel.play(audioData: self.audioData)
            } label: {
                Text("Play Audio")
                    .font(.headline)
                    .foregroundColor(.white)
                    .frame(width: 270, height: 50)
                    .background(.blue)
                    .clipShape(Capsule())
                    .padding(.top, 8)
            }

            if isCompleting {
                VStack {
                    Text(transcription)
                }
                .padding()
            } else {
                VStack {
                    Button {
                        isCompleting = true

                        Task {
                            do {
                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                                let config = Configuration(
                                    organizationId: "INSERT-ORGANIZATION-ID",
                                    apiKey: "INSERT-API-KEY"
                                )
                                let openAI = OpenAI(config)

                                guard let audio = self.audioData else { throw OpenAIError.invalidData }

                                let audioParameters = TranscriptionParameters(file: audio)
                                let transcriptionCompletion = try await self.selectedLanguage == .english ?
                                    openAI.createTranscription(parameters: audioParameters) :
                                    openAI.createTranslation(parameters: audioParameters)

                                if let text = transcriptionCompletion.text {
                                    self.transcription = text
                                }
                            } catch {
                                print("ERROR DETAILS - \(error)")
                            }
                        }
                    } label: {
                        Text("Generate Transcription")
                            .font(.headline)
                            .foregroundColor(.white)
                            .frame(width: 270, height: 50)
                            .background(.blue)
                            .clipShape(Capsule())
                            .padding(.top, 8)
                    }
                }
            }
        }
    }
}

#Preview {
    CreateTranscriptionExample()
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Chat/ChatMainView.swift
================================================
//
//  ChatMainView.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

import SwiftUI

struct ChatMainView: View {
    var body: some View {
        List {
            NavigationLink(destination: CreateChatCompletionExample()) {
                Text("Generate Chat Completion Example")
            }

            NavigationLink(destination: CreateChatCompletionStreamingExample()) {
                Text("Generate Chat Completion Streaming Example")
            }

            NavigationLink(destination: CreateChatFunctionCallExample()) {
                Text("Generate Chat Completion Function Call Example")
            }
        }
        .listStyle(.plain)
        .navigationTitle("Chat")
    }
}

struct ChatMainView_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            ChatMainView()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Chat/CreateChatCompletion.swift
================================================
//
//  CreateChatCompletion.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
// 

import SwiftUI
import OpenAIKit

struct CreateChatCompletionExample: View {
    @State private var responseText: String?
    @State private var isCompleting: Bool = false

    let chat: [ChatMessage] = [
        ChatMessage(role: .system, content: "You are a helpful assistant."),
        ChatMessage(role: .user, content: "Who won the world series in 2020?"),
        ChatMessage(role: .assistant, content: "The Los Angeles Dodgers won the World Series in 2020."),
        ChatMessage(role: .user, content: "Where was it played?")
    ]

    var body: some View {
        VStack {
            VStack(alignment: .leading) {
                ForEach(chat) { message in
                    Text("\(message.role.rawValue.capitalized): \(message.content ?? "NO CONTENT")")
                        .padding(.vertical, 10)
                }
            }
            .padding(20)

            if isCompleting {
                VStack {
                    if let responseText = self.responseText {
                        Text("Assistant: \(responseText)")
                    } else {
                        Text("Assistant: ...")
                    }
                }
                .padding()
            } else {
                VStack {
                    Button {
                        isCompleting = true

                        Task {
                            do {
                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                                let config = Configuration(
                                    organizationId: "INSERT-ORGANIZATION-ID",
                                    apiKey: "INSERT-API-KEY"
                                )
                                let openAI = OpenAI(config)
                                let chatParameters = ChatParameters(model: .chatGPTTurbo, messages: chat)
                                let chatCompletion = try await openAI.generateChatCompletion(
                                    parameters: chatParameters
                                )
                                
                                if let message = chatCompletion.choices[0].message {
                                    self.responseText = message.content
                                }
                            } catch {
                                print("ERROR DETAILS - \(error)")
                            }
                        }
                    } label: {
                        Text("Generate Completion")
                            .font(.headline)
                            .foregroundColor(.white)
                            .frame(width: 270, height: 50)
                            .background(.blue)
                            .clipShape(Capsule())
                            .padding(.top, 8)
                    }
                }
            }
        }

        Spacer()
    }
}

struct CreateChatCompletionExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            CreateChatCompletionExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Chat/CreateChatCompletionStreaming.swift
================================================
//
//  CreateChatCompletionStreaming.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

import SwiftUI
import OpenAIKit

struct CreateChatCompletionStreamingExample: View {
    @State private var responseText: String = ""
    @State private var isCompleting: Bool = false

    let chat: [ChatMessage] = [
        ChatMessage(role: .system, content: "You are a helpful assistant."),
        ChatMessage(role: .user, content: "Who won the world series in 2020?"),
        ChatMessage(role: .assistant, content: "The Los Angeles Dodgers won the World Series in 2020."),
        ChatMessage(role: .user, content: "Where was it played?")
    ]

    var body: some View {
        VStack {
            VStack(alignment: .leading) {
                ForEach(chat) { message in
                    Text("\(message.role.rawValue.capitalized): \(message.content ?? "NO CONTENT")")
                        .padding(.vertical, 10)
                }
            }
            .padding(20)

            if isCompleting {
                VStack {
                    Text(responseText)
                }
                .padding()
            } else {
                VStack {
                    Button {
                        self.isCompleting = true

                        Task {
                            do {
                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                                let config = Configuration(
                                    organizationId: "INSERT-ORGANIZATION-ID",
                                    apiKey: "INSERT-API-KEY"
                                )
                                let openAI = OpenAI(config)
                                let chatParameters = ChatParameters(model: .chatGPTTurbo, messages: chat)
                                let stream = try openAI.generateChatCompletionStreaming(
                                    parameters: chatParameters
                                )

                                for try await result in stream {
                                    if let delta = result.choices[0].delta {
                                        if let role = delta.role {
                                            self.responseText += "\(role.rawValue.capitalized): "
                                        } else if let content = delta.content {
                                            self.responseText += content
                                        }
                                    }
                                }
                            } catch {
                                print("ERROR DETAILS - \(error)")
                            }
                        }
                    } label: {
                        Text("Stream Completion")
                            .font(.headline)
                            .foregroundColor(.white)
                            .frame(width: 270, height: 50)
                            .background(.blue)
                            .clipShape(Capsule())
                            .padding(.top, 8)
                    }
                }
            }
        }

        Spacer()
    }
}

struct CreateChatCompletionStreamingExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            CreateChatCompletionStreamingExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Chat/CreateChatFunctionCallExample.swift
================================================
//
//  CreateChatFunctionCallExample.swift
//  iOS_Example
//
//  Created by Marcus Arnett on 10/9/23.
//

import SwiftUI
import OpenAIKit

struct CreateChatFunctionCallExample: View {
    @State private var isCompleting: Bool = false
    @State private var weatherInfo: WeatherInfo? = nil

    enum TemperatureUnit: String, Codable {
        case fahrenheit
        case celsius
    }

    struct WeatherInfo: Codable {
        let location: String
        let temperature: String
        let unit: TemperatureUnit
        let forecast: [String]
    }

    func getCurrentWeather(location: String, unit: TemperatureUnit = .fahrenheit) -> WeatherInfo {
        return WeatherInfo(location: location, temperature: "72", unit: unit, forecast: ["sunny", "windy"])
    }

    let messages: [ChatMessage] = [ChatMessage(role: .user, content: "What's the weather like in Boston?")]

    let functions: [Function] = [
        Function(
            name: "getCurrentWeather",
            description: "Get the current weather in a given location",
            parameters: Parameters(
                type: "object",
                properties: [
                    "location": ParameterDetail(type: "string", description: "The city and state, e.g. San Francisco, CA"),
                    "unit": ParameterDetail(type: "string", enumValues: ["fahrenheit", "celsius"])
                ],
                required: ["location"]
            )
        )
    ]

    var body: some View {
        VStack {
            VStack(alignment: .leading) {
                ForEach(messages) { message in
                    Text("\(message.role.rawValue.capitalized): \(message.content ?? "NO CONTENT")")
                        .padding(.vertical, 10)
                }
            }
            .padding(20)

            if isCompleting {
                VStack {
                    if let weatherInfo {
                        Text("Assistant: The current weather in \(weatherInfo.location) is \(weatherInfo.temperature) degrees \(weatherInfo.unit.rawValue).")
                    } else {
                        Text("Assistant: ...")
                    }
                }
                .padding()
            } else {
                VStack {
                    Button {
                        isCompleting = true

                        Task {
                            do {
                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                                let config = Configuration(
                                    organizationId: "INSERT-ORGANIZATION-ID",
                                    apiKey: "INSERT-API-KEY"
                                )
                                let openAI = OpenAI(config)
                                let chatParameters = ChatParameters(
                                    model: .chatGPTTurbo,
                                    messages: messages,
                                    functionCall: "auto",
                                    functions: functions
                                )

                                let chatCompletion = try await openAI.generateChatCompletion(
                                    parameters: chatParameters
                                )

                                if let message = chatCompletion.choices[0].message, let functionCall = message.functionCall {
                                    let jsonString = functionCall.arguments
                                    if let data = jsonString.data(using: .utf8) {
                                        do {
                                            if 
                                                let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],
                                                let location = json["location"] as? String
                                            {
                                                self.weatherInfo = self.getCurrentWeather(location: location)
                                            }
                                        } catch {
                                            print("Error parsing JSON: \(error)")
                                        }
                                    }
                                }
                            } catch {
                                print("ERROR DETAILS - \(error)")
                            }
                        }
                    } label: {
                        Text("Generate Completion")
                            .font(.headline)
                            .foregroundColor(.white)
                            .frame(width: 270, height: 50)
                            .background(.blue)
                            .clipShape(Capsule())
                            .padding(.top, 8)
                    }
                }
            }
        }

        Spacer()
    }
}

struct CreateChatFunctionCallExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            CreateChatFunctionCallExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Completion/CompletionMainView.swift
================================================
//
//  CompletionMainView.swift
//  iOS_Example
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

struct CompletionMainView: View {
    var body: some View {
        List {
            NavigationLink(destination: GenerateCompletionExample()) {
                Text("Generate Completion Example")
            }
        }
        .listStyle(.plain)
        .navigationTitle("Completion")
    }
}

struct CompletionMainView_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            CompletionMainView()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Completion/GenerateCompletionExample.swift
================================================
//
//  GenerateCompletionExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct GenerateCompletionExample: View {
    @State private var responseText: String?
    @State private var isCompleting: Bool = false
    
    let prompt = "Say this is a test"

    var body: some View {
        if isCompleting {
            VStack {
                Text("Input Prompt: \(prompt)")

                if let responseText = self.responseText {
                    Text("Output Text: \(responseText)")
                } else {
                    Text("Output Text: ...")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isCompleting = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(
                                organizationId: "INSERT-ORGANIZATION-ID",
                                apiKey: "INSERT-API-KEY"
                            )
                            let openAI = OpenAI(config)
                            let completionParameter = CompletionParameters(
                                model: .davinci,
                                prompt: [prompt],
                                maxTokens: 20,
                                temperature: 0.98
                            )
                            let completionResponse = try await openAI.generateCompletion(
                                parameters: completionParameter
                            )

                            self.responseText = completionResponse
                                .choices[0]
                                .text
                                .replacingOccurrences(of: "\n", with: "")
                        } catch {
                            print("ERROR DETAILS - \(error)")
                        }
                    }
                } label: {
                    Text("Generate Completion")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct GenerateCompletionExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            GenerateCompletionExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Content Policy/ContentPolicyExample.swift
================================================
//
//  ContentPolicyExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct ContentPolicyExample: View {
    @State private var isFlagged: Bool?
    @State private var isEvaluating: Bool = false
    
    let input = "I want to kill them."

    var body: some View {
        if isEvaluating {
            VStack {
                Text("Input Text: \(input)")

                if let isFlagged = isFlagged {
                    Text("Flagged: \(isFlagged ? "Yes" : "No")")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isEvaluating = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let openAI = OpenAI(Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY"))
                            let contentParameter = ContentPolicyParameters(input: input)
                            let contentResult = try await openAI.checkContentPolicy(parameters: contentParameter)

                            self.isFlagged = contentResult.results[0].flagged
                        } catch {
                            print("CRASHED WITH ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Evaluate Prompt")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct ContentPolicyExample_Preview: PreviewProvider {
    static var previews: some View {
        ContentPolicyExample()
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/ContentView.swift
================================================
//
//  ContentView.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

struct ContentView: View {
    var body: some View {
        NavigationStack {
            List {
                NavigationLink(destination: ModelMainView()) {
                    Text("Model")
                }

                NavigationLink(destination: CompletionMainView()) {
                    Text("Completion")
                }

                NavigationLink(destination: ChatMainView()) {
                    Text("Chat")
                }

                NavigationLink(destination: ImageMainView()) {
                    Text("Image")
                }

                NavigationLink(destination: CreateEmbeddingsExample()) {
                    Text("Embeddings")
                }

                NavigationLink(destination: CreateTranscriptionExample()) {
                    Text("Audio")
                }

                NavigationLink(destination: FileMainView()) {
                    Text("File")
                }

                NavigationLink(destination: ContentPolicyExample()) {
                    Text("Content Policy")
                }
            }
            .navigationTitle("OpenAIKit Examples")
            .listStyle(.plain)
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Embeddings/CreateEmbeddingsExample.swift
================================================
//
//  CreateEmbeddingsExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct CreateEmbeddingsExample: View {
    @State private var embeddingsResponse: EmbeddingsResponse?
    @State private var isCreatingEmbeds: Bool = false
    
    let input: String = "The food was delicious and the waiter..."

    var body: some View {
        if isCreatingEmbeds {
            VStack {
                Text("Input: \(input)")
                if let embeddingsResponse = self.embeddingsResponse {
                    Text("Object Type: \(embeddingsResponse.object.rawValue)")
                        .padding(.bottom)

                    Text("Embeddings Details").bold().font(.title)
                    Text("Object Type: \(embeddingsResponse.data[0].object.rawValue)")
                    Text("First Embedding (See Print For Full Embedding output):")
                        .multilineTextAlignment(.center)
                    Text("\(embeddingsResponse.data[0].embedding[0])")
                    Text("Index: \(embeddingsResponse.data[0].index)")

                    Text("Embeddings Usage").bold().font(.title).padding(.top)
                    Text("Prompt Tokens: \(embeddingsResponse.usage.promptTokens)")
                    Text("Total Tokens: \(embeddingsResponse.usage.totalTokens)")

                } else {
                    Text("Loading Embeddings...")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isCreatingEmbeds = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY")
                            let openAI = OpenAI(config)
                            let embeddingsParam = EmbeddingsParameters(model: "text-similarity-ada-002", input: input)

                            self.embeddingsResponse = try await openAI.createEmbeddings(parameters: embeddingsParam)

                            print("Embeddings Result: ")
                            self.embeddingsResponse?.data[0].embedding.forEach { embed in
                                print("\(embed)")
                            }
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Create Embeddings")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct CreateEmbeddingsExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            CreateEmbeddingsExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/DeleteFileExample.swift
================================================
//
//  DeleteFileExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct DeleteFileExample: View {
    @State private var deleteFileResponse: DeleteObject?
    @State private var isDeleting: Bool = false

    var body: some View {
        if isDeleting {
            VStack {
                if let deleteFileResponse = deleteFileResponse {
                    Text("File deletion complete!")
                    Text("ID: \(deleteFileResponse.id)")
                    Text("Object: \(deleteFileResponse.object.rawValue)")
                    Text("Deleted: \(String(deleteFileResponse.deleted))")
                } else {
                    Text("Deleting file...")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isDeleting = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY")
                            let openAI = OpenAI(config)

                            self.deleteFileResponse = try await openAI.deleteFile(fileId: "INSERT-FILE-ID")
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Delete File")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct DeleteFileExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            DeleteFileExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/File/SampleData.jsonl
================================================
{"prompt":"Ian Knox (admiral)\n\n###\n\n","completion":" Vice Admiral Ian Warren Knox AC is a retired senior officer of the Royal Australian Navy. END"}
{"prompt":"Porsche Supercup\n\n###\n\n","completion":" The Porsche Supercup is an international One-make GT3 production stock car racing premier series supporting the Formula One World Championship organized by Porsche Motorsport GmbH. END"}
{"prompt":"Monaco Grand Prix\n\n###\n\n","completion":" The Monaco Grand Prix is a Formula One motor race held annually on the Circuit de Monaco on the last weekend in May. END"}
{"prompt":"Fonteia (gens)\n\n###\n\n","completion":" The gens Fonteia was a plebeian family at Rome. END"}
{"prompt":"Aihole\n\n###\n\n","completion":" Aihole, also referred to as Aivalli, Ahivolal or Aryapura, is a historic site of ancient and medieval era Buddhist, Hindu and Jain monuments in Karnataka, India that dates from the sixth century through the twelfth century CE. END"}
{"prompt":"Lewis Seiler\n\n###\n\n","completion":" Lewis Seiler was an American film director. END"}
{"prompt":"Tyrrhenian-Adriatic sclerophyllous and mixed forests\n\n###\n\n","completion":" The Tyrrhenian-Adriatic sclerophyllous and mixed forests is an ecoregion in southern Italy, Sicily, Sardinia, Corsica, the Dalmatian Islands of Croatia, and Malta. END"}
{"prompt":"Port Aransas, Texas\n\n###\n\n","completion":" Port Aransas is a city in Nueces County, Texas, United States. END"}
{"prompt":"Bellocq\n\n###\n\n","completion":" Bellocq is a commune of the Pyrénées-Atlantiques department in southwestern France. END"}
{"prompt":"List of birds of Sweden\n\n###\n\n","completion":" This is a list of the bird species recorded in Sweden. END"}
{"prompt":"Poles Coppice countryside site\n\n###\n\n","completion":" Poles Coppice countryside site is an area of ancient oak woodland with disused quarry workings, located around 0.5 miles south of Pontesbury, Shropshire. END"}
{"prompt":"Karoi Rydings\n\n###\n\n","completion":" Karoi Rydings is a school in Zimbabwe that was attacked by \"squatters\" in the year 2000 and thus closed. END"}
{"prompt":"1913\n\n###\n\n","completion":" 1913 was a common year starting on Wednesday of the Gregorian calendar and a common year starting on Tuesday of the Julian calendar, the 1913th year of the Common Era and Anno Domini designations, the 913th year of the 2nd millennium, the 13th year of the 20th century, and the 4th year of the 1910s decade. END"}
{"prompt":"Guglielmo Achille Cavellini\n\n###\n\n","completion":" Guglielmo Achille Cavellini, also known as GAC, was an Italian artist and art collector. END"}
{"prompt":"New College Lane\n\n###\n\n","completion":" New College Lane is a historic street in central Oxford, England, named after New College, one of the older Oxford colleges, adjacent to the north. END"}
{"prompt":"London Charterhouse\n\n###\n\n","completion":" The London Charterhouse is a historic complex of buildings in Smithfield, London, dating back to the 14th century. END"}
{"prompt":"Pride parade\n\n###\n\n","completion":" Pride parades are outdoor events celebrating lesbian, gay, bisexual, transgender, non-binary and queer social and self acceptance, achievements, legal rights, and pride. END"}
{"prompt":"Sør Arena\n\n###\n\n","completion":" Sparebanken Sør Arena is a football stadium located at Torsvika in Kristiansand, Norway. END"}
{"prompt":"Piatnik\n\n###\n\n","completion":" Wiener Spielkartenfabrik Ferd. END"}
{"prompt":"List of mammals of Mexico\n\n###\n\n","completion":" This is a list of the native wild mammal species recorded in Mexico. END"}
{"prompt":"List of beaches\n\n###\n\n","completion":" This is a list of beaches of the world, sorted by country. END"}
{"prompt":"Rufous-chinned laughingthrush\n\n###\n\n","completion":" The rufous-chinned laughingthrush is a bird species in the family Leiothrichidae. END"}
{"prompt":"Ciqikou, Chongqing\n\n###\n\n","completion":" Ciqikou is an ancient town in the Shapingba District of Chongqing Municipality, People's Republic of China. END"}
{"prompt":"Ramtek\n\n###\n\n","completion":" Ramtek is a city and municipal council in Nagpur district of the Maharashtra, India. END"}
{"prompt":"USS Portland (CA-33)\n\n###\n\n","completion":" USS Portland was the lead ship of the Portland class of cruiser and the first ship of the United States Navy named after the city of Portland, Maine. END"}
{"prompt":"Hôtel-Dieu, Paris\n\n###\n\n","completion":" The Hôtel-Dieu is a hospital located on the Île de la Cité in the 4th arrondissement of Paris, on the parvise of Notre-Dame. END"}
{"prompt":"Kapp Putsch\n\n###\n\n","completion":" The Kapp Putsch, also known as the Kapp–Lüttwitz Putsch, named after its leaders Wolfgang Kapp and Walther von Lüttwitz, was an attempted coup in Berlin on 13 March 1920. END"}
{"prompt":"BFI London Film Festival\n\n###\n\n","completion":" The BFI London Film Festival is an annual film festival founded in 1957 and held in the United Kingdom, running for two weeks in October with co-operation from the British Film Institute. END"}
{"prompt":"Tyco International\n\n###\n\n","completion":" Tyco International plc was a security systems company incorporated in the Republic of Ireland, with operational headquarters in Princeton, New Jersey, United States. END"}
{"prompt":"Lifeboat (shipboard)\n\n###\n\n","completion":" A lifeboat or life raft is a small, rigid or inflatable boat carried for emergency evacuation in the event of a disaster aboard a ship. END"}
{"prompt":"Lepotrema acanthochromidis\n\n###\n\n","completion":" Lepotrema acanthochromidis is a species of lepocreadiid digenean parasitic in the intestine of marine fish. END"}
{"prompt":"Textiles of Sumba\n\n###\n\n","completion":" The textiles of Sumba, an island in eastern Indonesia, represent the means by which the present generation passes on its messages to future generations. END"}
{"prompt":"Kaj Munk\n\n###\n\n","completion":" Kaj Harald Leininger Munk was a Danish playwright and Lutheran pastor, known for his cultural engagement and his martyrdom during the Occupation of Denmark of World War II. END"}
{"prompt":"Free Royal Cities Act\n\n###\n\n","completion":" The Free Royal Cities Act was an act adopted by the Four-Year Sejm of the Polish-Lithuanian Commonwealth on April 18, 1791, in the run-up to the adoption of the Constitution of May 3, 1791. END"}
{"prompt":"Alt Empordà\n\n###\n\n","completion":" Alt Empordà is a comarca in Girona, Catalonia, Spain, one of two into which Empordà was divided by the comarcal division of Catalonia in 1936, the other one being Baix Empordà. END"}
{"prompt":"Structural engineering theory\n\n###\n\n","completion":" Structural engineering depends upon a detailed knowledge of loads, physics and materials to understand and predict how structures support and resist self-weight and imposed loads. END"}
{"prompt":"List of Donald Trump 2020 presidential campaign endorsements\n\n###\n\n","completion":" This is a list of notable individuals and organizations who voiced their endorsement for the office of the president of Donald Trump as the Republican Party's presidential candidate for the 2020 United States presidential election. END"}
{"prompt":"List of moths of South Africa (Geometridae)\n\n###\n\n","completion":" This is a list of moths of the family Geometridae that are found in South Africa. END"}
{"prompt":"Flag of Estonia\n\n###\n\n","completion":" The national flag of Estonia is a tricolour featuring three equal horizontal bands of blue, black, and white. END"}
{"prompt":"Southern Pacific Transportation Company\n\n###\n\n","completion":" The Southern Pacific was an American Class I railroad network that existed from 1865 to 1996 and operated in the Western United States. END"}
{"prompt":"Columbina\n\n###\n\n","completion":" Columbina is a stock character in the Commedia dell'Arte. END"}
{"prompt":"Pietro I Orseolo\n\n###\n\n","completion":" Pietro I Orseolo, O.S.B. END"}
{"prompt":"Galisteo, Cáceres\n\n###\n\n","completion":" Galisteo is a municipality located in the province of Cáceres, Extremadura, Spain. END"}
{"prompt":"Anti-Americanism\n\n###\n\n","completion":" Anti-Americanism is a sentiment which espouses dislike of the American government or opposes its policies, especially its foreign policy, or espouses dislike or hatred of the American people and the United States in general. END"}
{"prompt":"Alisagar lift irrigation scheme\n\n###\n\n","completion":" Alisagar is a park, tourist attraction and an irrigation project which is 13 km from Nizamabad and 2 km off the Nizamabad-Bodhan road. END"}
{"prompt":"Circular Quay\n\n###\n\n","completion":" Circular Quay is a harbour, former working port and now international passenger shipping port, public piazza and tourism precinct, heritage area, and transport node located in Sydney, New South Wales, Australia on the northern edge of the Sydney central business district on Sydney Cove, between Bennelong Point and The Rocks. END"}
{"prompt":"9951 Tyrannosaurus\n\n###\n\n","completion":" 9951 Tyrannosaurus, provisional designation 1990 VK₅, is a stony Vestian asteroid from the inner regions of the asteroid belt, approximately 17 kilometers in diameter. END"}
{"prompt":"Ornamental plant\n\n###\n\n","completion":" Ornamental plants are plants that are grown for decorative purposes in gardens and landscape design projects, as houseplants, cut flowers and specimen display. END"}
{"prompt":"List of awards and nominations received by Doctor Who\n\n###\n\n","completion":" Doctor Who is a British science fiction television programme produced and aired by the BBC since 1963. END"}
{"prompt":"Jean-Baptiste Debret\n\n###\n\n","completion":" Jean-Baptiste Debret was a French painter, who produced many valuable lithographs depicting the people of Brazil. END"}
{"prompt":"Santiago de los Caballeros\n\n###\n\n","completion":" Santiago de los Caballeros, also known as Santiago de los Treinta Caballeros or simply Santiago, is the second-largest city in the Dominican Republic and the fourth-largest city in the Caribbean. END"}
{"prompt":"Cumans\n\n###\n\n","completion":" The Cumans, also known as Polovtsians or Polovtsy, were a Turkic nomadic people comprising the western branch of the Cuman–Kipchak confederation. END"}
{"prompt":"Staten Island Ferry\n\n###\n\n","completion":" The Staten Island Ferry is a passenger ferry route operated by the New York City Department of Transportation. END"}
{"prompt":"New Order (Indonesia)\n\n###\n\n","completion":" The New Order is the term coined by the second Indonesian President Suharto to characterise his regime as he came to power in 1966. END"}
{"prompt":"Ranger School\n\n###\n\n","completion":" The United States Army Ranger School is a 62-day small unit tactics and leadership course that develops functional skills directly related to units whose mission is to engage the enemy in close combat and direct fire battles. END"}
{"prompt":"Liam Hendriks\n\n###\n\n","completion":" Liam Johnson Hendriks, nicknamed \"Slydah\", is an Australian professional baseball pitcher for the Oakland Athletics of Major League Baseball. END"}
{"prompt":"Bèze (river)\n\n###\n\n","completion":" The Bèze is a French river in the Côte-d'Or department, in the Bourgogne-Franche-Comté region. END"}
{"prompt":"Battle of Killdeer Mountain\n\n###\n\n","completion":" The Battle of Killdeer Mountain took place during Brig. END"}
{"prompt":"Bomb (tank)\n\n###\n\n","completion":" Bomb is a Canadian Army Sherman Tank of the 27th Armoured Regiment which landed at D-Day and fought across northwest Europe until the end of World War II, one of the few Canadian tanks that fought without interruption from D-Day to VE Day. END"}
{"prompt":"Bradenham, Buckinghamshire\n\n###\n\n","completion":" Bradenham is a village and civil parish within Wycombe district in Buckinghamshire, England. END"}
{"prompt":"Walim, Lower Silesian Voivodeship\n\n###\n\n","completion":" Walim is a village in Wałbrzych County, Lower Silesian Voivodeship, in south-western Poland. END"}
{"prompt":"Art of Birmingham\n\n###\n\n","completion":" Birmingham has a distinctive culture of art and design that emerged in the 1750s, driven by the historic importance of the applied arts to the city's manufacturing economy. END"}
{"prompt":"Danny Rozin\n\n###\n\n","completion":" Daniel Rozin is an Israeli-American artist working in the area of interactive digital art. END"}
{"prompt":"Frédéric Antonetti\n\n###\n\n","completion":" Frédéric Antonetti is a French professional football manager and former player. END"}
{"prompt":"LGBT rights in Mexico\n\n###\n\n","completion":" Lesbian, gay, bisexual, and transgender rights in Mexico have expanded in recent years, in keeping with worldwide legal trends. END"}
{"prompt":"Central Tool Room and Training Centre, Bhubaneswar\n\n###\n\n","completion":" Central Tool Room and Training Centre, Bhubaneswar is an autonomous body under the Ministry of MSME, Government of India. END"}
{"prompt":"Sergeant Major's Row\n\n###\n\n","completion":" The Sergeant Major's Row are heritage-listed former terrace houses and now shops and offices located in a row at 33-41 George Street in the inner city Sydney suburb of The Rocks in the City of Sydney local government area of New South Wales, Australia. END"}
{"prompt":"Ancestor veneration in China\n\n###\n\n","completion":" Chinese ancestor worship or Chinese ancestor veneration, also called the Chinese patriarchal religion, is an aspect of the Chinese traditional religion which revolves around the ritual celebration of the deified ancestors and tutelary deities of people with the same surname organised into lineage societies in ancestral shrines. END"}
{"prompt":"Haverford Township, Delaware County, Pennsylvania\n\n###\n\n","completion":" Haverford Township is a Home Rule Municipality township in Delaware County, Pennsylvania, United States. END"}
{"prompt":"George Washington Rains\n\n###\n\n","completion":" George Washington Rains was a United States Army and later Confederate States Army officer. END"}
{"prompt":"Death Valley National Park\n\n###\n\n","completion":" Death Valley National Park is an American national park that straddles the California–Nevada border, east of the Sierra Nevada. END"}
{"prompt":"Cariad Lloyd\n\n###\n\n","completion":" Katie Cariad Lloyd is a British comedian, actress, writer, and podcaster who has been performing since 2007. END"}
{"prompt":"Melothria scabra\n\n###\n\n","completion":" Melothria scabra, also known as the cucamelon, is a vine grown for its edible fruit. END"}
{"prompt":"Sunda Kingdom\n\n###\n\n","completion":" The Sunda Kingdom was a Sundanese Hindu kingdom located in the western portion of the island of Java from 669 to around 1579, covering the area of present-day Banten, Jakarta, West Java, and the western part of Central Java. END"}
{"prompt":"Rarotonga\n\n###\n\n","completion":" Rarotonga is the most populous of the Cook Islands, with a population of 10,649, out of the country's total resident population of 14,802. END"}
{"prompt":"San Germán, Puerto Rico\n\n###\n\n","completion":" San Germán is a municipality located in the southwestern region of Puerto Rico, south of Mayagüez and Maricao, north of Lajas, east of Hormigueros and Cabo Rojo, and west of Sabana Grande. END"}
{"prompt":"Prydain\n\n###\n\n","completion":" Prydain is the modern Welsh name for Great Britain. END"}
{"prompt":"Deep Springs Valley\n\n###\n\n","completion":" Deep Springs Valley is a high desert valley in the Inyo-White Mountains of Inyo County, California. END"}
{"prompt":"Alija Izetbegović\n\n###\n\n","completion":" Alija Izetbegović was a Bosnian politician, lawyer and author, who in 1992 became the first president of the Presidency of the newly independent Republic of Bosnia and Herzegovina. END"}
{"prompt":"Orange County, New York\n\n###\n\n","completion":" Orange County is a county located in the U.S. state of New York. END"}
{"prompt":"List of historic properties in Black Canyon City, Arizona\n\n###\n\n","completion":" This is a list, which includes a photographic gallery, of some of the remaining structures and monuments, of historic significance in Black Canyon City, a town in Yavapai County, Arizona. END"}
{"prompt":"Queen Mother Reservoir\n\n###\n\n","completion":" The Queen Mother Reservoir is a public water supply reservoir that lies between the M4 and the M25 to the west of London. END"}
{"prompt":"Frank D. Thompson\n\n###\n\n","completion":" Frank D. Thompson was a Vermont attorney and judge. END"}
{"prompt":"Medical jurisprudence\n\n###\n\n","completion":" Medical jurisprudence or legal medicine is the branch of science and medicine involving the study and application of scientific and medical knowledge to legal problems, such as inquests, and in the field of law. END"}
{"prompt":"St. Louis\n\n###\n\n","completion":" St. Louis is a city in Missouri, on the western bank of the Mississippi River, which forms the state line between Illinois and Missouri. END"}
{"prompt":"Social Democratic Labour Party of Norway\n\n###\n\n","completion":" The Social Democratic Labour Party of Norway was a Norwegian political party in the 1920s. END"}
{"prompt":"Ramsey Island\n\n###\n\n","completion":" Ramsey Island is an island about 1 kilometre off St David's Head in Pembrokeshire on the northern side of St Brides Bay, in southwest Wales. END"}
{"prompt":"Raaberbahn\n\n###\n\n","completion":" The Raaberbahn or GySEV is a Hungarian-Austrian railway company based in Sopron, Hungary. END"}
{"prompt":"Paul Judge\n\n###\n\n","completion":" Sir Paul Rupert Judge was an English business and political figure. END"}
{"prompt":"Clifton Reynes\n\n###\n\n","completion":" Clifton Reynes is a village and civil parish in the Borough of Milton Keynes, Buckinghamshire, England. END"}
{"prompt":"Võõpste\n\n###\n\n","completion":" Võõpste is a village in Kastre Parish, Tartu County in eastern Estonia. END"}
{"prompt":"Leningrad Oblast\n\n###\n\n","completion":" Leningrad Oblast is a federal subject of Russia. END"}
{"prompt":"Hoboken Terminal\n\n###\n\n","completion":" Hoboken Terminal is a commuter-oriented intermodal passenger station in Hoboken, Hudson County, New Jersey, United States. END"}
{"prompt":"Reid and Sigrist R.S.3\n\n###\n\n","completion":" The Reid and Sigrist R.S.3 Desford was a British twin-engined, three-seat advanced trainer developed in the Second World War for postwar use. END"}
{"prompt":"Carrie Gracie\n\n###\n\n","completion":" Carrie Gracie is a Scottish journalist and newsreader best-known as having been China Editor for BBC News. END"}
{"prompt":"Scottish Reformation\n\n###\n\n","completion":" The Scottish Reformation was the process by which Scotland broke with the Papacy and developed a predominantly Calvinist national Kirk, which was strongly Presbyterian in its outlook. END"}
{"prompt":"Ornithomimus\n\n###\n\n","completion":" Ornithomimus is a genus of ornithomimid dinosaurs from the Late Cretaceous Period of what is now North America. END"}
{"prompt":"Lars Fredrik Nilson\n\n###\n\n","completion":" Lars Fredrik Nilson was a Swedish chemist, professor at Uppsala University, and later Director of the Agricultural Chemical Experiment Station at the Royal Swedish Academy of Agriculture and Forestry in Stockholm. END"}
{"prompt":"2006 Rally Argentina\n\n###\n\n","completion":" The 26° Rally Argentina, the sixth round of the 2006 World Rally Championship season took place between April 27 and April 30, 2006. END"}
{"prompt":"2002 FA Community Shield\n\n###\n\n","completion":" The 2002 FA Community Shield was the 80th FA Community Shield, an annual English football match played between the winners of the previous season's Premier League and FA Cup. END"}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/FileDetailsView.swift
================================================
//
//  FileDetailsView.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct FileDetailsView: View {
    var file: File

    var body: some View {
        VStack {
            Text("ID: \(file.id)")
            Text("Object: \(file.object.rawValue)")
            Text("Bytes: \(file.bytes)")
            Text("Created At: \(String(file.createdAt))")
            Text("Filename: \(file.filename)")
            Text("Purpose: \(file.purpose)")
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/FileMainView.swift
================================================
//
//  FileMainView.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

struct FileMainView: View {
    var body: some View {
        List {
            NavigationLink(destination: DeleteFileExample()) {
                Text("Delete File Example")
            }
            
            NavigationLink(destination: ListFilesExample()) {
                Text("List Files Example")
            }
            
            NavigationLink(destination: RetrieveFileExample()) {
                Text("Retrieve File Example")
            }
            
            NavigationLink(destination: RetrieveFileContentsExample()) {
                Text("Retrieve File Contents Example")
            }
            
            NavigationLink(destination: UploadFileExample()) {
                Text("Upload File Example")
            }
        }
        .listStyle(.plain)
        .navigationTitle("File")
    }
}

struct FileMainView_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            FileMainView()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/ListFilesExample.swift
================================================
//
//  ListFilesExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct ListFilesExample: View {
    @State private var files: [File]?
    @State private var isListing: Bool = false

    var body: some View {
        if isListing {
            if let files = files {
                if files.isEmpty {
                    Text("No files found.")
                } else {
                    List(files) { file in
                        NavigationLink(file.id) {
                            FileDetailsView(file: file)
                        }
                    }
                    .padding()
                }
            } else {
                Text("Loading files...")
            }
        } else {
            VStack {
                Button {
                    isListing = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY")
                            let openAI = OpenAI(config)
                            let filesResponse = try await openAI.listFiles()

                            self.files = filesResponse.data
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("List Files")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct ListFilesExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            ListFilesExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/RetrieveFileContentsExample.swift
================================================
//
//  RetrieveFileContentsExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct RetrieveFileContentsExample: View {
    @State private var files: [FileContent]?
    @State private var isRetrieving: Bool = false

    var body: some View {
        if isRetrieving {
            VStack {
                if let files = self.files {
                    Text("Retrieved file!")
                    Text("Files size: \(files.count)")
                    Text("First three indexes (see log for full object): ")
                    Text("\(files[0].prompt) - \(files[0].completion)")
                    Text("\(files[1].prompt) - \(files[1].completion)")
                    Text("\(files[2].prompt) - \(files[2].completion)")
                } else {
                    Text("Retrieving file...")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isRetrieving = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY")
                            let openAI = OpenAI(config)

                            self.files = try await openAI.retrieveFileContent(fileId: "INSERT-FILE-ID")
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Retrieve File Contents")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct RetrieveFileContentsExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            RetrieveFileContentsExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/RetrieveFileExample.swift
================================================
//
//  RetrieveFileExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct RetrieveFileExample: View {
    @State private var file: File?
    @State private var isRetrieving: Bool = false
    
    var body: some View {
        if isRetrieving {
            VStack {
                if let file = file {
                    Text("Loading file complete!")
                    Text("ID: \(file.id)")
                    Text("Object: \(file.object.rawValue)")
                    Text("Size: \(file.bytes)")
                    Text("Created At: \(String(file.createdAt))")
                    Text("Filename: \(file.filename)")
                    Text("Purpose: \(file.purpose)")
                } else {
                    Text("Loading file...")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isRetrieving = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY")
                            let openAI = OpenAI(config)

                            self.file = try await openAI.retrieveFile(fileId: "INSERT-FILE-ID")
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Retrieve File")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct RetrieveFileExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            RetrieveFileExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/File/UploadFileExample.swift
================================================
//
//  UploadFileExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct UploadFileExample: View {
    @State private var file: File?
    @State private var isUploading: Bool = false

    var body: some View {
        if isUploading {
            VStack {
                if let file = file {
                    Text("Upload complete!")
                    Text("ID: \(file.id)")
                    Text("Object: \(file.object.rawValue)")
                    Text("Size: \(file.bytes)")
                    Text("Created At: \(String(file.createdAt))")
                    Text("Filename: \(file.filename)")
                    Text("Purpose: \(file.purpose)")
                } else {
                    Text("Uploading file...")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isUploading = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY")
                            let openAI = OpenAI(config)

                            guard let urlFile = Bundle.main.url(
                                forResource: "SampleData",
                                withExtension: "jsonl"
                            ) else {
                                throw OpenAIError.invalidData
                            }
                            guard let jsonData = try? Data(contentsOf: urlFile) else { throw OpenAIError.invalidUrl }

                            let uploadFileParam = UploadFileParameters(
                                file: jsonData,
                                fileName: "SampleData.jsonl",
                                purpose: "fine-tune"
                            )

                            self.file = try await openAI.uploadFile(parameters: uploadFileParam)
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Upload File")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct UploadFileExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            UploadFileExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Image/EditImageExample.swift
================================================
//
//  EditImageExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct EditImageExample: View {
    @State private var image: UIImage = UIImage()
    @State private var isEditing: Bool = false

    var body: some View {
        if isEditing {
            VStack {
                if image == UIImage() {
                    Text("Loading edit...")
                } else {
                    Image(uiImage: image)
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isEditing = true

                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(
                                organizationId: "INSERT-ORGANIZATION-ID",
                                apiKey: "INSERT-API-KEY"
                            )
                            let openAI = OpenAI(config)

                            guard let image = UIImage(named: "image") else {
                                throw OpenAIError.invalidData
                            }

                            guard let mask = UIImage(named: "mask") else {
                                throw OpenAIError.invalidData
                            }

                            let imageEditParam = try ImageEditParameters(
                                image: image,
                                mask: mask,
                                prompt: "A cute baby sea otter wearing a beret",
                                resolution: .small,
                                responseFormat: .base64Json
                            )

                            let imageResponse = try await openAI.generateImageEdits(
                                parameters: imageEditParam
                            )

                            self.image = try openAI
                                .decodeBase64Image(imageResponse.data[0].image)
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Edit Image")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct EditImageExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            EditImageExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Image/GenerateImageExample.swift
================================================
//
//  GenerateImageExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct GenerateImageExample: View {
    @State private var image: UIImage = UIImage()
    @State private var isGenerating: Bool = false

    var body: some View {
        if isGenerating {
            VStack {
                Image(uiImage: image)
            }
            .padding()
        } else {
            VStack {
                Button {
                    isGenerating = true

                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(
                                organizationId: "INSERT-ORGANIZATION-ID",
                                apiKey: "INSERT-API-KEY"
                            )

                            let openAi = OpenAI(config)
                            let imageParam = ImageParameters(
                                prompt: "an avocado chair",
                                resolution: .extraLargePortrait,
                                quality: .hd,
                                model: .dalle3,
                                responseFormat: .base64Json
                            )

                            let result = try await openAi.createImage(parameters: imageParam)
                            let b64Image = result.data[0].image

                            self.image = try openAi.decodeBase64Image(b64Image)
                        } catch {
                            print("ERROR DETAILS - \(error)")
                        }
                    }
                } label: {
                    Text("Generate Image")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct GenerateImageExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            GenerateImageExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Image/GenerateImageVariationsExample.swift
================================================
//
//  GenerateImageVariationExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct GenerateImageVariationExample: View {
    @State private var image: UIImage = UIImage()
    @State private var isGeneratingVariation: Bool = false

    var body: some View {
        if isGeneratingVariation {
            VStack {
                if image == UIImage() {
                    Text("Variation is loading...")
                } else {
                    Image(uiImage: image)
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isGeneratingVariation = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(
                                organizationId: "INSERT-ORGANIZATION-ID",
                                apiKey: "INSERT-API-KEY"
                            )
                            let openAI = OpenAI(config)

                            guard let image = UIImage(named: "variation") else {
                                throw OpenAIError.invalidData
                            }

                            let imageVariationParam = try ImageVariationParameters(
                                image: image,
                                resolution: .small,
                                responseFormat: .base64Json
                            )
                            let variationResponse = try await openAI.generateImageVariations(
                                parameters: imageVariationParam
                            )

                            self.image = try openAI.decodeBase64Image(
                                variationResponse.data[0].image
                            )
                        } catch {
                            print("ERROR - \(error)")
                        }
                    }
                } label: {
                    Text("Generate Variations")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct GenerateImageVariationExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            GenerateImageVariationExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Image/ImageMainView.swift
================================================
//
//  ImageMainView.swift
//  iOS_Example
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

struct ImageMainView: View {
    var body: some View {
        List {
            NavigationLink(destination: GenerateImageExample()) {
                Text("Generate Image Example")
            }
            
            NavigationLink(destination: EditImageExample()) {
                Text("Edit Image Example")
            }
            
            NavigationLink(destination: GenerateImageVariationExample()) {
                Text("Generate Image Variation Example")
            }
        }
        .listStyle(.plain)
        .navigationTitle("Image")
    }
}

struct ImageMainView_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            ImageMainView()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Model/ListModelsExample.swift
================================================
//
//  ListModelsExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct ListModelsExample: View {
    @State private var models = [Model]()
    @State private var isListing: Bool = false

    var body: some View {
        if isListing {
            if !models.isEmpty {
                List(models) { model in
                    Text("\(model.id)")
                }
            } else {
                Text("Loading Models...")
            }
        } else {
            VStack {
                Button {
                    isListing = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(
                                organizationId: "INSERT-ORGANIZATION-ID",
                                apiKey: "INSERT-API-KEY"
                            )
                            let openAi = OpenAI(config)
                            let modelsResponse = try await openAi.listModels()

                            self.models = modelsResponse.data
                        } catch {
                            print("ERROR DETAILS - \(error)")
                        }
                    }
                } label: {
                    Text("List Models")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct ListModelsExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            ListModelsExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Model/ModelMainView.swift
================================================
//
//  ModelMainView.swift
//  iOS_Example
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

struct ModelMainView: View {
    var body: some View {
        List {
            NavigationLink(destination: ListModelsExample()) {
                Text("List Models Example")
            }
            
            NavigationLink(destination: RetrieveModelExample()) {
                Text("Retrieve Model Example")
            }
        }
        .listStyle(.plain)
        .navigationTitle("Model")
    }
}

struct ModelMainView_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            ModelMainView()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Model/RetrieveModelExample.swift
================================================
//
//  RetrieveModelExample.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct RetrieveModelExample: View {
    @State private var model: Model?
    @State private var isRetrieving: Bool = false
    
    var body: some View {
        if isRetrieving {
            VStack {
                if let model = model {
                    Text("Model Details").bold().font(.title)
                    Text("Name: \(model.id)")
                    Text("Object: \(model.object.rawValue)")
                    Text("Owned By: \(model.ownedBy)")
                } else {
                    Text("Loading Model...")
                }
            }
            .padding()
        } else {
            VStack {
                Button {
                    isRetrieving = true
                    
                    Task {
                        do {
                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️
                            let config = Configuration(organizationId: "INSERT-ORGANIZATION-ID", apiKey: "INSERT-API-KEY")
                            let openAI = OpenAI(config)

                            self.model = try await openAI.retrieveModel(modelId: "text-davinci-001")
                        } catch {
                            print("ERROR WITH - \(error)")
                        }
                    }
                } label: {
                    Text("Retrieve Model")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct RetrieveModelExample_Previews: PreviewProvider {
    static var previews: some View {
        NavigationStack {
            RetrieveModelExample()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/iOS_Example/iOS_Example/iOS_ExampleApp.swift
================================================
//
//  iOS_ExampleApp.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

@main
struct iOS_ExampleApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}


================================================
FILE: Examples/iOS_Example/iOS_Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 56;
	objects = {

/* Begin PBXBuildFile section */
		761C250429403883005066C2 /* EditImageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C250329403883005066C2 /* EditImageExample.swift */; };
		761C250B2940392F005066C2 /* GenerateCompletionExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C250A2940392F005066C2 /* GenerateCompletionExample.swift */; };
		761C250D294039A8005066C2 /* GenerateImageVariationsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C250C294039A8005066C2 /* GenerateImageVariationsExample.swift */; };
		761C251329403AC7005066C2 /* GenerateImageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C251229403AC7005066C2 /* GenerateImageExample.swift */; };
		761C251729403CA0005066C2 /* ListFilesExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C251629403CA0005066C2 /* ListFilesExample.swift */; };
		761C251B29403CD2005066C2 /* FileDetailsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C251A29403CD2005066C2 /* FileDetailsView.swift */; };
		761C252429403EDC005066C2 /* ListModelsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252329403EDC005066C2 /* ListModelsExample.swift */; };
		761C252629403F3F005066C2 /* RetrieveFileContentsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252529403F3F005066C2 /* RetrieveFileContentsExample.swift */; };
		761C252829403F7D005066C2 /* RetrieveFileExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252729403F7D005066C2 /* RetrieveFileExample.swift */; };
		761C252C2940400B005066C2 /* RetrieveModelExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252B2940400B005066C2 /* RetrieveModelExample.swift */; };
		761C253129404086005066C2 /* SampleData.jsonl in Resources */ = {isa = PBXBuildFile; fileRef = 761C253029404086005066C2 /* SampleData.jsonl */; };
		761C2533294040A8005066C2 /* UploadFileExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C2532294040A8005066C2 /* UploadFileExample.swift */; };
		765BB1D7294049B4000BF124 /* FileMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1D6294049B4000BF124 /* FileMainView.swift */; };
		765BB1D929404D52000BF124 /* CompletionMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1D829404D52000BF124 /* CompletionMainView.swift */; };
		765BB1DB29404F7C000BF124 /* ImageMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1DA29404F7C000BF124 /* ImageMainView.swift */; };
		765BB1DD29405126000BF124 /* ModelMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1DC29405126000BF124 /* ModelMainView.swift */; };
		765BB20129405723000BF124 /* variation.png in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1FE29405723000BF124 /* variation.png */; };
		765BB20229405723000BF124 /* mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1FF29405723000BF124 /* mask.png */; };
		765BB20329405723000BF124 /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = 765BB20029405723000BF124 /* image.png */; };
		76C0C254293FB7CC003075D2 /* iOS_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C253293FB7CC003075D2 /* iOS_ExampleApp.swift */; };
		76C0C256293FB7CC003075D2 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C255293FB7CC003075D2 /* ContentView.swift */; };
		76C0C258293FB7CE003075D2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 76C0C257293FB7CE003075D2 /* Assets.xcassets */; };
		76C0C25B293FB7CE003075D2 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 76C0C25A293FB7CE003075D2 /* Preview Assets.xcassets */; };
		76C0C265293FB8B6003075D2 /* OpenAIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 76C0C264293FB8B6003075D2 /* OpenAIKit */; };
		76C0C26A293FC8FC003075D2 /* ContentPolicyExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C269293FC8FC003075D2 /* ContentPolicyExample.swift */; };
		76C0C26D293FC9B5003075D2 /* CreateEmbeddingsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C26C293FC9B5003075D2 /* CreateEmbeddingsExample.swift */; };
		76C0C274293FDA7B003075D2 /* DeleteFileExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C273293FDA7B003075D2 /* DeleteFileExample.swift */; };
		7D3E2ED72A7F228E0014174B /* CreateChatCompletionStreaming.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3E2ED62A7F228E0014174B /* CreateChatCompletionStreaming.swift */; };
		7D3E2ED92A7F262A0014174B /* ChatMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3E2ED82A7F262A0014174B /* ChatMainView.swift */; };
		7D4A91082A87DE7E000A138A /* AudioPlayerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D4A91072A87DE7E000A138A /* AudioPlayerViewModel.swift */; };
		7D4A910A2A87E110000A138A /* audio_translation.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 7D4A91092A87E110000A138A /* audio_translation.mp3 */; };
		7D6C8EB92B689D750049AC43 /* audio.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 7D6C8EB82B689D750049AC43 /* audio.mp3 */; };
		7D76E4F82AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D76E4F72AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift */; };
		7DC0E9082A87CF97005C8763 /* CreateTranscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DC0E9072A87CF97005C8763 /* CreateTranscription.swift */; };
		7DDE422E29AFE567000BBB01 /* CreateChatCompletion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DDE422D29AFE567000BBB01 /* CreateChatCompletion.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
		761C250329403883005066C2 /* EditImageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditImageExample.swift; sourceTree = "<group>"; };
		761C250A2940392F005066C2 /* GenerateCompletionExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateCompletionExample.swift; sourceTree = "<group>"; };
		761C250C294039A8005066C2 /* GenerateImageVariationsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateImageVariationsExample.swift; sourceTree = "<group>"; };
		761C251229403AC7005066C2 /* GenerateImageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateImageExample.swift; sourceTree = "<group>"; };
		761C251629403CA0005066C2 /* ListFilesExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFilesExample.swift; sourceTree = "<group>"; };
		761C251A29403CD2005066C2 /* FileDetailsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileDetailsView.swift; sourceTree = "<group>"; };
		761C252329403EDC005066C2 /* ListModelsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListModelsExample.swift; sourceTree = "<group>"; };
		761C252529403F3F005066C2 /* RetrieveFileContentsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetrieveFileContentsExample.swift; sourceTree = "<group>"; };
		761C252729403F7D005066C2 /* RetrieveFileExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetrieveFileExample.swift; sourceTree = "<group>"; };
		761C252B2940400B005066C2 /* RetrieveModelExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetrieveModelExample.swift; sourceTree = "<group>"; };
		761C253029404086005066C2 /* SampleData.jsonl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SampleData.jsonl; sourceTree = "<group>"; };
		761C2532294040A8005066C2 /* UploadFileExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadFileExample.swift; sourceTree = "<group>"; };
		765BB1D6294049B4000BF124 /* FileMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileMainView.swift; sourceTree = "<group>"; };
		765BB1D829404D52000BF124 /* CompletionMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompletionMainView.swift; sourceTree = "<group>"; };
		765BB1DA29404F7C000BF124 /* ImageMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageMainView.swift; sourceTree = "<group>"; };
		765BB1DC29405126000BF124 /* ModelMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelMainView.swift; sourceTree = "<group>"; };
		765BB1FE29405723000BF124 /* variation.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = variation.png; sourceTree = "<group>"; };
		765BB1FF29405723000BF124 /* mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mask.png; sourceTree = "<group>"; };
		765BB20029405723000BF124 /* image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = image.png; sourceTree = "<group>"; };
		76C0C250293FB7CC003075D2 /* iOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
		76C0C253293FB7CC003075D2 /* iOS_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOS_ExampleApp.swift; sourceTree = "<group>"; };
		76C0C255293FB7CC003075D2 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
		76C0C257293FB7CE003075D2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
		76C0C25A293FB7CE003075D2 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
		76C0C263293FB8B0003075D2 /* OpenAIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAIKit; path = ../..; sourceTree = "<group>"; };
		76C0C269293FC8FC003075D2 /* ContentPolicyExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentPolicyExample.swift; sourceTree = "<group>"; };
		76C0C26C293FC9B5003075D2 /* CreateEmbeddingsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateEmbeddingsExample.swift; sourceTree = "<group>"; };
		76C0C273293FDA7B003075D2 /* DeleteFileExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteFileExample.swift; sourceTree = "<group>"; };
		7D3E2ED62A7F228E0014174B /* CreateChatCompletionStreaming.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateChatCompletionStreaming.swift; sourceTree = "<group>"; };
		7D3E2ED82A7F262A0014174B /* ChatMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMainView.swift; sourceTree = "<group>"; };
		7D4A91072A87DE7E000A138A /* AudioPlayerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayerViewModel.swift; sourceTree = "<group>"; };
		7D4A91092A87E110000A138A /* audio_translation.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = audio_translation.mp3; sourceTree = "<group>"; };
		7D6C8EB82B689D750049AC43 /* audio.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = audio.mp3; path = "../../../../../../../Library/Mobile Documents/com~apple~CloudDocs/Desktop/Desktop - Marcus’s Mac mini/OpenAIKit/Examples/iOS_Example/iOS_Example/Audio/audio.mp3"; sourceTree = "<group>"; };
		7D76E4F72AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateChatFunctionCallExample.swift; sourceTree = "<group>"; };
		7DC0E9072A87CF97005C8763 /* CreateTranscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateTranscription.swift; sourceTree = "<group>"; };
		7DDE422D29AFE567000BBB01 /* CreateChatCompletion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateChatCompletion.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		76C0C24D293FB7CC003075D2 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				76C0C265293FB8B6003075D2 /* OpenAIKit in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		761C24FE2940347A005066C2 /* Completion */ = {
			isa = PBXGroup;
			children = (
				761C250A2940392F005066C2 /* GenerateCompletionExample.swift */,
				765BB1D829404D52000BF124 /* CompletionMainView.swift */,
			);
			path = Completion;
			sourceTree = "<group>";
		};
		761C250229403873005066C2 /* Image */ = {
			isa = PBXGroup;
			children = (
				765BB1FD29405723000BF124 /* Images */,
				761C251229403AC7005066C2 /* GenerateImageExample.swift */,
				761C250329403883005066C2 /* EditImageExample.swift */,
				761C250C294039A8005066C2 /* GenerateImageVariationsExample.swift */,
				765BB1DA29404F7C000BF124 /* ImageMainView.swift */,
			);
			path = Image;
			sourceTree = "<group>";
		};
		761C252229403ECF005066C2 /* Model */ = {
			isa = PBXGroup;
			children = (
				761C252329403EDC005066C2 /* ListModelsExample.swift */,
				761C252B2940400B005066C2 /* RetrieveModelExample.swift */,
				765BB1DC29405126000BF124 /* ModelMainView.swift */,
			);
			path = Model;
			sourceTree = "<group>";
		};
		761C252F29404086005066C2 /* File */ = {
			isa = PBXGroup;
			children = (
				761C253029404086005066C2 /* SampleData.jsonl */,
			);
			path = File;
			sourceTree = "<group>";
		};
		765BB1FD29405723000BF124 /* Images */ = {
			isa = PBXGroup;
			children = (
				765BB1FE29405723000BF124 /* variation.png */,
				765BB1FF29405723000BF124 /* mask.png */,
				765BB20029405723000BF124 /* image.png */,
			);
			path = Images;
			sourceTree = "<group>";
		};
		76C0C247293FB7CC003075D2 = {
			isa = PBXGroup;
			children = (
				76C0C252293FB7CC003075D2 /* iOS_Example */,
				76C0C251293FB7CC003075D2 /* Products */,
				76C0C262293FB8AF003075D2 /* Frameworks */,
			);
			sourceTree = "<group>";
		};
		76C0C251293FB7CC003075D2 /* Products */ = {
			isa = PBXGroup;
			children = (
				76C0C250293FB7CC003075D2 /* iOS_Example.app */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		76C0C252293FB7CC003075D2 /* iOS_Example */ = {
			isa = PBXGroup;
			children = (
				7DC0E9062A87CF6F005C8763 /* Audio */,
				7DDE422C29AFE54C000BBB01 /* Chat */,
				761C252229403ECF005066C2 /* Model */,
				761C250229403873005066C2 /* Image */,
				761C24FE2940347A005066C2 /* Completion */,
				76C0C26B293FC9A6003075D2 /* Embeddings */,
				76C0C272293FDA65003075D2 /* File */,
				76C0C268293FC8DF003075D2 /* Content Policy */,
				76C0C253293FB7CC003075D2 /* iOS_ExampleApp.swift */,
				76C0C255293FB7CC003075D2 /* ContentView.swift */,
				76C0C257293FB7CE003075D2 /* Assets.xcassets */,
				76C0C259293FB7CE003075D2 /* Preview Content */,
			);
			path = iOS_Example;
			sourceTree = "<group>";
		};
		76C0C259293FB7CE003075D2 /* Preview Content */ = {
			isa = PBXGroup;
			children = (
				76C0C25A293FB7CE003075D2 /* Preview Assets.xcassets */,
			);
			path = "Preview Content";
			sourceTree = "<group>";
		};
		76C0C262293FB8AF003075D2 /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				76C0C263293FB8B0003075D2 /* OpenAIKit */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};
		76C0C268293FC8DF003075D2 /* Content Policy */ = {
			isa = PBXGroup;
			children = (
				76C0C269293FC8FC003075D2 /* ContentPolicyExample.swift */,
			);
			path = "Content Policy";
			sourceTree = "<group>";
		};
		76C0C26B293FC9A6003075D2 /* Embeddings */ = {
			isa = PBXGroup;
			children = (
				76C0C26C293FC9B5003075D2 /* CreateEmbeddingsExample.swift */,
			);
			path = Embeddings;
			sourceTree = "<group>";
		};
		76C0C272293FDA65003075D2 /* File */ = {
			isa = PBXGroup;
			children = (
				761C252F29404086005066C2 /* File */,
				761C251A29403CD2005066C2 /* FileDetailsView.swift */,
				76C0C273293FDA7B003075D2 /* DeleteFileExample.swift */,
				761C251629403CA0005066C2 /* ListFilesExample.swift */,
				761C252529403F3F005066C2 /* RetrieveFileContentsExample.swift */,
				761C252729403F7D005066C2 /* RetrieveFileExample.swift */,
				761C2532294040A8005066C2 /* UploadFileExample.swift */,
				765BB1D6294049B4000BF124 /* FileMainView.swift */,
			);
			path = File;
			sourceTree = "<group>";
		};
		7DC0E9062A87CF6F005C8763 /* Audio */ = {
			isa = PBXGroup;
			children = (
				7DC0E90B2A87D04D005C8763 /* Sound */,
				7DC0E9072A87CF97005C8763 /* CreateTranscription.swift */,
				7D4A91072A87DE7E000A138A /* AudioPlayerViewModel.swift */,
			);
			path = Audio;
			sourceTree = "<group>";
		};
		7DC0E90B2A87D04D005C8763 /* Sound */ = {
			isa = PBXGroup;
			children = (
				7D6C8EB82B689D750049AC43 /* audio.mp3 */,
				7D4A91092A87E110000A138A /* audio_translation.mp3 */,
			);
			path = Sound;
			sourceTree = "<group>";
		};
		7DDE422C29AFE54C000BBB01 /* Chat */ = {
			isa = PBXGroup;
			children = (
				7DDE422D29AFE567000BBB01 /* CreateChatCompletion.swift */,
				7D3E2ED62A7F228E0014174B /* CreateChatCompletionStreaming.swift */,
				7D3E2ED82A7F262A0014174B /* ChatMainView.swift */,
				7D76E4F72AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift */,
			);
			path = Chat;
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		76C0C24F293FB7CC003075D2 /* iOS_Example */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = 76C0C25E293FB7CE003075D2 /* Build configuration list for PBXNativeTarget "iOS_Example" */;
			buildPhases = (
				76C0C24C293FB7CC003075D2 /* Sources */,
				76C0C24D293FB7CC003075D2 /* Frameworks */,
				76C0C24E293FB7CC003075D2 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = iOS_Example;
			packageProductDependencies = (
				76C0C264293FB8B6003075D2 /* OpenAIKit */,
			);
			productName = iOS_Example;
			productReference = 76C0C250293FB7CC003075D2 /* iOS_Example.app */;
			productType = "com.apple.product-type.application";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		76C0C248293FB7CC003075D2 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				BuildIndependentTargetsInParallel = 1;
				LastSwiftUpdateCheck = 1410;
				LastUpgradeCheck = 1520;
				TargetAttributes = {
					76C0C24F293FB7CC003075D2 = {
						CreatedOnToolsVersion = 14.1;
					};
				};
			};
			buildConfigurationList = 76C0C24B293FB7CC003075D2 /* Build configuration list for PBXProject "iOS_Example" */;
			compatibilityVersion = "Xcode 14.0";
			developmentRegion = en;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
				Base,
			);
			mainGroup = 76C0C247293FB7CC003075D2;
			productRefGroup = 76C0C251293FB7CC003075D2 /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				76C0C24F293FB7CC003075D2 /* iOS_Example */,
			);
		};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
		76C0C24E293FB7CC003075D2 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				76C0C25B293FB7CE003075D2 /* Preview Assets.xcassets in Resources */,
				765BB20229405723000BF124 /* mask.png in Resources */,
				765BB20129405723000BF124 /* variation.png in Resources */,
				7D6C8EB92B689D750049AC43 /* audio.mp3 in Resources */,
				7D4A910A2A87E110000A138A /* audio_translation.mp3 in Resources */,
				76C0C258293FB7CE003075D2 /* Assets.xcassets in Resources */,
				761C253129404086005066C2 /* SampleData.jsonl in Resources */,
				765BB20329405723000BF124 /* image.png in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		76C0C24C293FB7CC003075D2 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				7D3E2ED92A7F262A0014174B /* ChatMainView.swift in Sources */,
				76C0C26D293FC9B5003075D2 /* CreateEmbeddingsExample.swift in Sources */,
				76C0C274293FDA7B003075D2 /* DeleteFileExample.swift in Sources */,
				765BB1DB29404F7C000BF124 /* ImageMainView.swift in Sources */,
				761C250D294039A8005066C2 /* GenerateImageVariationsExample.swift in Sources */,
				761C252629403F3F005066C2 /* RetrieveFileContentsExample.swift in Sources */,
				7D76E4F82AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift in Sources */,
				765BB1DD29405126000BF124 /* ModelMainView.swift in Sources */,
				76C0C26A293FC8FC003075D2 /* ContentPolicyExample.swift in Sources */,
				765BB1D929404D52000BF124 /* CompletionMainView.swift in Sources */,
				76C0C256293FB7CC003075D2 /* ContentView.swift in Sources */,
				761C251329403AC7005066C2 /* GenerateImageExample.swift in Sources */,
				761C251B29403CD2005066C2 /* FileDetailsView.swift in Sources */,
				761C252C2940400B005066C2 /* RetrieveModelExample.swift in Sources */,
				761C251729403CA0005066C2 /* ListFilesExample.swift in Sources */,
				7DDE422E29AFE567000BBB01 /* CreateChatCompletion.swift in Sources */,
				7D3E2ED72A7F228E0014174B /* CreateChatCompletionStreaming.swift in Sources */,
				7DC0E9082A87CF97005C8763 /* CreateTranscription.swift in Sources */,
				761C252829403F7D005066C2 /* RetrieveFileExample.swift in Sources */,
				7D4A91082A87DE7E000A138A /* AudioPlayerViewModel.swift in Sources */,
				761C2533294040A8005066C2 /* UploadFileExample.swift in Sources */,
				761C252429403EDC005066C2 /* ListModelsExample.swift in Sources */,
				76C0C254293FB7CC003075D2 /* iOS_ExampleApp.swift in Sources */,
				765BB1D7294049B4000BF124 /* FileMainView.swift in Sources */,
				761C250429403883005066C2 /* EditImageExample.swift in Sources */,
				761C250B2940392F005066C2 /* GenerateCompletionExample.swift in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
		76C0C25C293FB7CE003075D2 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_ENABLE_OBJC_WEAK = YES;
				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_COMMA = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
				CLANG_WARN_STRICT_PROTOTYPES = YES;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = dwarf;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				ENABLE_TESTABILITY = YES;
				ENABLE_USER_SCRIPT_SANDBOXING = YES;
				GCC_C_LANGUAGE_STANDARD = gnu11;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				IPHONEOS_DEPLOYMENT_TARGET = 16.1;
				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
				MTL_FAST_MATH = YES;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = iphoneos;
				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
			};
			name = Debug;
		};
		76C0C25D293FB7CE003075D2 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_ENABLE_OBJC_WEAK = YES;
				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_COMMA = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
				CLANG_WARN_STRICT_PROTOTYPES = YES;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				ENABLE_NS_ASSERTIONS = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				ENABLE_USER_SCRIPT_SANDBOXING = YES;
				GCC_C_LANGUAGE_STANDARD = gnu11;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				IPHONEOS_DEPLOYMENT_TARGET = 16.1;
				MTL_ENABLE_DEBUG_INFO = NO;
				MTL_FAST_MATH = YES;
				SDKROOT = iphoneos;
				SWIFT_COMPILATION_MODE = wholemodule;
				SWIFT_OPTIMIZATION_LEVEL = "-O";
				VALIDATE_PRODUCT = YES;
			};
			name = Release;
		};
		76C0C25F293FB7CE003075D2 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
				CODE_SIGN_STYLE = Automatic;
				CURRENT_PROJECT_VERSION = 1;
				DEVELOPMENT_ASSET_PATHS = "\"iOS_Example/Preview Content\"";
				DEVELOPMENT_TEAM = 8GNE6ML5WX;
				ENABLE_PREVIEWS = YES;
				GENERATE_INFOPLIST_FILE = YES;
				INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
				INFOPLIST_KEY_UILaunchScreen_Generation = YES;
				INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
				LD_RUNPATH_SEARCH_PATHS = (
					"$(inherited)",
					"@executable_path/Frameworks",
				);
				MARKETING_VERSION = 1.0;
				PRODUCT_BUNDLE_IDENTIFIER = "com.MarcoDotIO.iOS-Example";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_EMIT_LOC_STRINGS = YES;
				SWIFT_VERSION = 5.0;
				TARGETED_DEVICE_FAMILY = "1,2";
			};
			name = Debug;
		};
		76C0C260293FB7CE003075D2 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
				CODE_SIGN_STYLE = Automatic;
				CURRENT_PROJECT_VERSION = 1;
				DEVELOPMENT_ASSET_PATHS = "\"iOS_Example/Preview Content\"";
				DEVELOPMENT_TEAM = 8GNE6ML5WX;
				ENABLE_PREVIEWS = YES;
				GENERATE_INFOPLIST_FILE = YES;
				INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
				INFOPLIST_KEY_UILaunchScreen_Generation = YES;
				INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
				LD_RUNPATH_SEARCH_PATHS = (
					"$(inherited)",
					"@executable_path/Frameworks",
				);
				MARKETING_VERSION = 1.0;
				PRODUCT_BUNDLE_IDENTIFIER = "com.MarcoDotIO.iOS-Example";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_EMIT_LOC_STRINGS = YES;
				SWIFT_VERSION = 5.0;
				TARGETED_DEVICE_FAMILY = "1,2";
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		76C0C24B293FB7CC003075D2 /* Build configuration list for PBXProject "iOS_Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				76C0C25C293FB7CE003075D2 /* Debug */,
				76C0C25D293FB7CE003075D2 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		76C0C25E293FB7CE003075D2 /* Build configuration list for PBXNativeTarget "iOS_Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				76C0C25F293FB7CE003075D2 /* Debug */,
				76C0C260293FB7CE003075D2 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
		76C0C264293FB8B6003075D2 /* OpenAIKit */ = {
			isa = XCSwiftPackageProductDependency;
			productName = OpenAIKit;
		};
/* End XCSwiftPackageProductDependency section */
	};
	rootObject = 76C0C248293FB7CC003075D2 /* Project object */;
}


================================================
FILE: Examples/iOS_Example/iOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:">
   </FileRef>
</Workspace>


================================================
FILE: Examples/iOS_Example/iOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>IDEDidComputeMac32BitWarning</key>
	<true/>
</dict>
</plist>


================================================
FILE: Examples/macOS_Example/macOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
  "colors" : [
    {
      "idiom" : "universal"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/macOS_Example/macOS_Example/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "mac",
      "scale" : "1x",
      "size" : "16x16"
    },
    {
      "idiom" : "mac",
      "scale" : "2x",
      "size" : "16x16"
    },
    {
      "idiom" : "mac",
      "scale" : "1x",
      "size" : "32x32"
    },
    {
      "idiom" : "mac",
      "scale" : "2x",
      "size" : "32x32"
    },
    {
      "idiom" : "mac",
      "scale" : "1x",
      "size" : "128x128"
    },
    {
      "idiom" : "mac",
      "scale" : "2x",
      "size" : "128x128"
    },
    {
      "idiom" : "mac",
      "scale" : "1x",
      "size" : "256x256"
    },
    {
      "idiom" : "mac",
      "scale" : "2x",
      "size" : "256x256"
    },
    {
      "idiom" : "mac",
      "scale" : "1x",
      "size" : "512x512"
    },
    {
      "idiom" : "mac",
      "scale" : "2x",
      "size" : "512x512"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/macOS_Example/macOS_Example/Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/macOS_Example/macOS_Example/ContentView.swift
================================================
//
//  ContentView.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct ContentView: View {
    @State private var image: NSImage = NSImage()
    @State private var isGenerating: Bool = false
    
    var body: some View {
        if isGenerating {
            VStack {
                Image(nsImage: image)
            }
            .padding()
        } else {
            VStack {
                Button {
                    isGenerating = true
                    
                    Task {
                        do {
                            let config = Configuration(
                                organization: "INSERT-ORGANIZATION-ID",
                                apiKey: "INSERT-API-KEY"
                            )

                            let openAi = OpenAI(config)
                            let imageParam = ImageParameters(
                                prompt: "an avocado chair",
                                resolution: .small,
                                responseFormat: .base64Json
                            )

                            let result = try await openAi.createImage(parameters: imageParam)
                            let b64Image = result.data[0].image

                            self.image = try openAi.decodeBase64Image(b64Image)
                        } catch {
                            print("ERROR DETAILS - \(error)")
                        }
                    }
                } label: {
                    Text("Generate Image")
                        .font(.headline)
                        .foregroundColor(.white)
                        .frame(width: 270, height: 50)
                        .background(.blue)
                        .clipShape(Capsule())
                        .padding(.top, 8)
                }
            }
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}


================================================
FILE: Examples/macOS_Example/macOS_Example/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/macOS_Example/macOS_Example/macOS_Example.entitlements
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.app-sandbox</key>
	<true/>
	<key>com.apple.security.files.user-selected.read-only</key>
	<true/>
	<key>com.apple.security.network.client</key>
	<true/>
	<key>com.apple.security.network.server</key>
	<true/>
</dict>
</plist>


================================================
FILE: Examples/macOS_Example/macOS_Example/macOS_ExampleApp.swift
================================================
//
//  macOS_ExampleApp.swift
//  OpenAIKit
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

@main
struct macOS_ExampleApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}


================================================
FILE: Examples/macOS_Example/macOS_Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 56;
	objects = {

/* Begin PBXBuildFile section */
		765BB1EB29405298000BF124 /* macOS_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1EA29405298000BF124 /* macOS_ExampleApp.swift */; };
		765BB1ED29405298000BF124 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1EC29405298000BF124 /* ContentView.swift */; };
		765BB1EF29405299000BF124 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1EE29405299000BF124 /* Assets.xcassets */; };
		765BB1F229405299000BF124 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1F129405299000BF124 /* Preview Assets.xcassets */; };
		765BB1FC29405308000BF124 /* OpenAIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 765BB1FB29405308000BF124 /* OpenAIKit */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
		765BB1E729405298000BF124 /* macOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
		765BB1EA29405298000BF124 /* macOS_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = macOS_ExampleApp.swift; sourceTree = "<group>"; };
		765BB1EC29405298000BF124 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
		765BB1EE29405299000BF124 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
		765BB1F129405299000BF124 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
		765BB1F329405299000BF124 /* macOS_Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS_Example.entitlements; sourceTree = "<group>"; };
		765BB1FA29405304000BF124 /* OpenAIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAIKit; path = ../..; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		765BB1E429405298000BF124 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				765BB1FC29405308000BF124 /* OpenAIKit in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		765BB1DE29405298000BF124 = {
			isa = PBXGroup;
			children = (
				765BB1E929405298000BF124 /* macOS_Example */,
				765BB1E829405298000BF124 /* Products */,
				765BB1F929405304000BF124 /* Frameworks */,
			);
			sourceTree = "<group>";
		};
		765BB1E829405298000BF124 /* Products */ = {
			isa = PBXGroup;
			children = (
				765BB1E729405298000BF124 /* macOS_Example.app */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		765BB1E929405298000BF124 /* macOS_Example */ = {
			isa = PBXGroup;
			children = (
				765BB1EA29405298000BF124 /* macOS_ExampleApp.swift */,
				765BB1EC29405298000BF124 /* ContentView.swift */,
				765BB1EE29405299000BF124 /* Assets.xcassets */,
				765BB1F329405299000BF124 /* macOS_Example.entitlements */,
				765BB1F029405299000BF124 /* Preview Content */,
			);
			path = macOS_Example;
			sourceTree = "<group>";
		};
		765BB1F029405299000BF124 /* Preview Content */ = {
			isa = PBXGroup;
			children = (
				765BB1F129405299000BF124 /* Preview Assets.xcassets */,
			);
			path = "Preview Content";
			sourceTree = "<group>";
		};
		765BB1F929405304000BF124 /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				765BB1FA29405304000BF124 /* OpenAIKit */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		765BB1E629405298000BF124 /* macOS_Example */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = 765BB1F629405299000BF124 /* Build configuration list for PBXNativeTarget "macOS_Example" */;
			buildPhases = (
				765BB1E329405298000BF124 /* Sources */,
				765BB1E429405298000BF124 /* Frameworks */,
				765BB1E529405298000BF124 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = macOS_Example;
			packageProductDependencies = (
				765BB1FB29405308000BF124 /* OpenAIKit */,
			);
			productName = macOS_Example;
			productReference = 765BB1E729405298000BF124 /* macOS_Example.app */;
			productType = "com.apple.product-type.application";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		765BB1DF29405298000BF124 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				BuildIndependentTargetsInParallel = 1;
				LastSwiftUpdateCheck = 1410;
				LastUpgradeCheck = 1410;
				TargetAttributes = {
					765BB1E629405298000BF124 = {
						CreatedOnToolsVersion = 14.1;
					};
				};
			};
			buildConfigurationList = 765BB1E229405298000BF124 /* Build configuration list for PBXProject "macOS_Example" */;
			compatibilityVersion = "Xcode 14.0";
			developmentRegion = en;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
				Base,
			);
			mainGroup = 765BB1DE29405298000BF124;
			productRefGroup = 765BB1E829405298000BF124 /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				765BB1E629405298000BF124 /* macOS_Example */,
			);
		};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
		765BB1E529405298000BF124 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				765BB1F229405299000BF124 /* Preview Assets.xcassets in Resources */,
				765BB1EF29405299000BF124 /* Assets.xcassets in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		765BB1E329405298000BF124 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				765BB1ED29405298000BF124 /* ContentView.swift in Sources */,
				765BB1EB29405298000BF124 /* macOS_ExampleApp.swift in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
		765BB1F429405299000BF124 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_ENABLE_OBJC_WEAK = YES;
				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_COMMA = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
				CLANG_WARN_STRICT_PROTOTYPES = YES;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = dwarf;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				ENABLE_TESTABILITY = YES;
				GCC_C_LANGUAGE_STANDARD = gnu11;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				MACOSX_DEPLOYMENT_TARGET = 13.0;
				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
				MTL_FAST_MATH = YES;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = macosx;
				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
			};
			name = Debug;
		};
		765BB1F529405299000BF124 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_ENABLE_OBJC_WEAK = YES;
				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_COMMA = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
				CLANG_WARN_STRICT_PROTOTYPES = YES;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				ENABLE_NS_ASSERTIONS = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				GCC_C_LANGUAGE_STANDARD = gnu11;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				MACOSX_DEPLOYMENT_TARGET = 13.0;
				MTL_ENABLE_DEBUG_INFO = NO;
				MTL_FAST_MATH = YES;
				SDKROOT = macosx;
				SWIFT_COMPILATION_MODE = wholemodule;
				SWIFT_OPTIMIZATION_LEVEL = "-O";
			};
			name = Release;
		};
		765BB1F729405299000BF124 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
				CODE_SIGN_ENTITLEMENTS = macOS_Example/macOS_Example.entitlements;
				CODE_SIGN_STYLE = Automatic;
				COMBINE_HIDPI_IMAGES = YES;
				CURRENT_PROJECT_VERSION = 1;
				DEVELOPMENT_ASSET_PATHS = "\"macOS_Example/Preview Content\"";
				DEVELOPMENT_TEAM = 8GNE6ML5WX;
				ENABLE_HARDENED_RUNTIME = YES;
				ENABLE_PREVIEWS = YES;
				GENERATE_INFOPLIST_FILE = YES;
				INFOPLIST_KEY_NSHumanReadableCopyright = "";
				LD_RUNPATH_SEARCH_PATHS = (
					"$(inherited)",
					"@executable_path/../Frameworks",
				);
				MARKETING_VERSION = 1.0;
				PRODUCT_BUNDLE_IDENTIFIER = "com.MarcoDotIO.macOS-Example";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_EMIT_LOC_STRINGS = YES;
				SWIFT_VERSION = 5.0;
			};
			name = Debug;
		};
		765BB1F829405299000BF124 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
				CODE_SIGN_ENTITLEMENTS = macOS_Example/macOS_Example.entitlements;
				CODE_SIGN_STYLE = Automatic;
				COMBINE_HIDPI_IMAGES = YES;
				CURRENT_PROJECT_VERSION = 1;
				DEVELOPMENT_ASSET_PATHS = "\"macOS_Example/Preview Content\"";
				DEVELOPMENT_TEAM = 8GNE6ML5WX;
				ENABLE_HARDENED_RUNTIME = YES;
				ENABLE_PREVIEWS = YES;
				GENERATE_INFOPLIST_FILE = YES;
				INFOPLIST_KEY_NSHumanReadableCopyright = "";
				LD_RUNPATH_SEARCH_PATHS = (
					"$(inherited)",
					"@executable_path/../Frameworks",
				);
				MARKETING_VERSION = 1.0;
				PRODUCT_BUNDLE_IDENTIFIER = "com.MarcoDotIO.macOS-Example";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_EMIT_LOC_STRINGS = YES;
				SWIFT_VERSION = 5.0;
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		765BB1E229405298000BF124 /* Build configuration list for PBXProject "macOS_Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				765BB1F429405299000BF124 /* Debug */,
				765BB1F529405299000BF124 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		765BB1F629405299000BF124 /* Build configuration list for PBXNativeTarget "macOS_Example" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				765BB1F729405299000BF124 /* Debug */,
				765BB1F829405299000BF124 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
		765BB1FB29405308000BF124 /* OpenAIKit */ = {
			isa = XCSwiftPackageProductDependency;
			productName = OpenAIKit;
		};
/* End XCSwiftPackageProductDependency section */
	};
	rootObject = 765BB1DF29405298000BF124 /* Project object */;
}


================================================
FILE: Examples/macOS_Example/macOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:">
   </FileRef>
</Workspace>


================================================
FILE: Examples/macOS_Example/macOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>IDEDidComputeMac32BitWarning</key>
	<true/>
</dict>
</plist>


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json
================================================
{
  "colors" : [
    {
      "idiom" : "universal"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  },
  "layers" : [
    {
      "filename" : "Front.imagestacklayer"
    },
    {
      "filename" : "Middle.imagestacklayer"
    },
    {
      "filename" : "Back.imagestacklayer"
    }
  ]
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "1x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  },
  "layers" : [
    {
      "filename" : "Front.imagestacklayer"
    },
    {
      "filename" : "Middle.imagestacklayer"
    },
    {
      "filename" : "Back.imagestacklayer"
    }
  ]
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "1x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "1x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json
================================================
{
  "assets" : [
    {
      "filename" : "App Icon - App Store.imagestack",
      "idiom" : "tv",
      "role" : "primary-app-icon",
      "size" : "1280x768"
    },
    {
      "filename" : "App Icon.imagestack",
      "idiom" : "tv",
      "role" : "primary-app-icon",
      "size" : "400x240"
    },
    {
      "filename" : "Top Shelf Image Wide.imageset",
      "idiom" : "tv",
      "role" : "top-shelf-image-wide",
      "size" : "2320x720"
    },
    {
      "filename" : "Top Shelf Image.imageset",
      "idiom" : "tv",
      "role" : "top-shelf-image",
      "size" : "1920x720"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "1x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json
================================================
{
  "images" : [
    {
      "idiom" : "tv",
      "scale" : "1x"
    },
    {
      "idiom" : "tv",
      "scale" : "2x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "1x"
    },
    {
      "idiom" : "tv-marketing",
      "scale" : "2x"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/ContentView.swift
================================================
//
//  ContentView.swift
//  tvOS_Example
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI
import OpenAIKit

struct ContentView: View {
    @State private var image: UIImage = UIImage()
    
    var body: some View {
        VStack {
            Image(uiImage: image)
        }
        .padding()
        .task {
            do {
                let config = Configuration(
                    organization: "INSERT-ORGANIZATION-ID",
                    apiKey: "INSERT-API-KEY"
                )

                let openAi = OpenAI(config)
                let imageParam = ImageParameters(
                    prompt: "an avocado chair",
                    resolution: .small,
                    responseFormat: .base64Json
                )

                let result = try await openAi.createImage(parameters: imageParam)
                let b64Image = result.data[0].image

                self.image = try openAi.decodeBase64Image(b64Image)
            } catch {
                print("ERROR DETAILS - \(error)")
            }
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/Preview Content/Preview Assets.xcassets/Contents.json
================================================
{
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example/tvOS_ExampleApp.swift
================================================
//
//  tvOS_ExampleApp.swift
//  tvOS_Example
//
//  Copyright (c) 2023 OpenDive
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  

import SwiftUI

@main
struct tvOS_ExampleApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}


================================================
FILE: Examples/tvOS_Example/tvOS_Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 56;
	objects = {

/* Begin PBXBuildFile section */
		765BB22F2940599A000BF124 /* tvOS_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB22E2940599A000BF124 /* tvOS_ExampleApp.swift */; };
		765BB2312940599A000BF124 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB2302940599A000BF124 /* ContentView.swift */; };
		765BB2332940599C000BF124 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB2322940599C000BF124 /* Assets.xcassets */; };
		765BB2362940599C000BF124 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB2352940599C000BF124 /* Preview Assets.xcassets */; };
		765BB23F294059DD000BF124 /* OpenAIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 765BB23E294059DD000BF124 /* OpenAIKit */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
		765BB22B2940599A000BF124 /* tvOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tvOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
		765BB22E2940599A000BF124 /* tvOS_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = tvOS_ExampleApp.swift; sourceTree = "<group>"; };
		765BB2302940599A000BF124 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
		765BB2322940599C000BF124 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
		765BB2352940599C000BF124 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
		765BB23D294059D9000BF124 /* OpenAIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAIKit; path = ../..; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		765BB2282940599A000BF124 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				765BB23F294059DD000BF124 /* OpenAIKit in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		765BB2222940599A000BF124 = {
			isa = PBXGroup;
			children = (
				765BB22D2940599A000BF124 /* tvOS_Example */,
				765BB22C2940599A000BF124 /* Products */,
				765BB23C294059D9000BF124 /* Frameworks */,
			);
			sourceTree = "<group>";
		};
		765BB22C2940599A000BF124 /* Products */ = {
			isa = PBXGroup;
			children = (
				765BB22B2940599A000BF124 /* tvOS_Example.app */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		765BB22D2940599A000BF124 /* tvOS_Example */ = {
			isa = PBXGroup;
			children = (
				765BB22E2940599A000BF124 /* tvOS_ExampleApp.swift */,
				765BB2302940599A000BF124 /* ContentView.swift */,
				765BB2322940599C000BF124 /* Assets.xcassets */,
				765BB2342940599C000BF124 /* Preview Content */,
			);
			path = tvOS_Example;
			sourceTree = "<group>";
		};
		765BB2342940599C000BF124 /* Preview Content */ = {
			isa = PBXGroup;
			children = (
				765BB2352940599C000BF124 /* Preview Assets.xcassets */,
			);
			path = "Preview Content";
			sourceTree = "<group>";
		};
		765BB23C294059D9000BF124 /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				765BB23D294059D9000BF124 /* OpenAIKit */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		765BB22A2940599A000BF124 /* tvOS_Example */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = 765BB2392940599C000BF124 /* Build configuration list for PBXNativeTarget "tvOS_Example" */;
			buildPhases = (
				765BB2272940599A000BF124 /* Sources */,
				765BB2282940599A000BF124 /* Frameworks */,
				765BB2292940599A000BF124 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = tvOS_Example;
			packageProductDependencies = (
				765BB23E294059DD000BF124 /* OpenAIKit */,
			);
			productName = tvOS_Example;
			productReference = 765BB22B2940599A000BF124 /* tvOS_Example.app */;
			productType = "com.apple.product-type.application";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		765BB2232940599A000BF124 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				BuildIndependentTargetsInParallel = 1;
				LastSwiftUpdateCheck = 1410;
				LastUpgradeCheck = 1410;
				TargetAttributes = {
					765BB22A2940599A000BF124 = {
						CreatedOnToolsVersion = 14.1;
					};
				};
			};
			buildConfigurationList = 765BB2262940599A000BF124 /* Build configuration list for PBXProject "tvOS_Example" */;
			compatibilityVersion = "Xcode 14.0";
			developmentRegion = en;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
				Base,
			);
			mainGroup = 765BB2222940599A000BF124;
			productRefGroup = 765BB22C2940599A000BF124 /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				765BB22A2940599A000BF124 /* tvOS_Example */,
			);
		};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
		765BB2292940599A000BF124 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				765BB2362940599C000BF124 /* Preview Assets.xcassets in Resources */,
				765BB2332940599C000BF124 /* Assets.xcassets in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		765BB2272940599A000BF124 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				765BB2312940599A000BF124 /* ContentView.swift in Sources */,
				765BB22F2940599A000BF124 /* tvOS_ExampleApp.swift in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
		765BB2372940599C000BF124 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_ENABLE_OBJC_WEAK = YES;
				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_COMMA = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
				CLANG_WARN_STRICT_PROTOTYPES = YES;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = dwarf;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				ENABLE_TESTABILITY = YES;
				GCC_C_LANGUAGE_STANDARD = gnu11;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
				MTL_FAST_MATH = YES;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = appletvos;
				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
				TVOS_DEPLOYMENT_TARGET = 16.1;
			};
			name = Debug;
		};
		765BB2382940599C000BF124 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_ANALYZER_NONNULL = YES;
				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_ENABLE_OBJC_WEAK = YES;
				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_COMMA = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INFINITE_RECURSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
				CLANG_WARN_STRICT_PROTOTYPES = YES;
				CLANG_WARN_SUSPICIOUS_MOVE = YES;
				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
				CLANG_WARN_UNREACHABLE_CODE = YES;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = NO;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				ENABLE_NS_ASSERTIONS = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				GCC_C_LANGUAGE_STANDARD = gnu11;
				GCC_NO_COMMON_BLOCKS = YES;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				MTL_ENABLE_DEBUG_INFO = NO;
				MTL_FAST_MATH = YES;
				SDKROOT = appletvos;
				SWIFT_COMPILATION_MODE = wholemodule;
				SWIFT_OPTIMIZATION_LEVEL = "-O";
				TVOS_DEPLOYMENT_TARGET = 16.1;
				VALIDATE_PRODUCT = YES;
			};
			name = Release;
		};
		765BB23A2940599C000BF124 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
				CODE_SIGN_STYLE = Automatic;
				CURRENT_PROJECT_VERSION = 1;
				DEVELOPMENT_ASSET_PATHS = "\"tvOS_Example/Preview Content\"";
				DEVELOPMENT_TEAM = 8GNE6ML5WX;
				ENABLE_PREVIEWS = YES;
				GENERATE_INFOPLIST_FILE = YES;
				INFOPLIST_KEY_UILaunchScreen_Generation = YES;
				INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
				LD_RUNPATH_SEARCH_PATHS = (
					"$(inherited)",
					"@executable_path/Frameworks",
				);
				MARKETING_VERSION = 1.0;
				PRODUCT_BUNDLE_IDENTIFIER = "com.MarcoDotIO.tvOS-Example";
				PRODUCT_NAME = "$(TARGET_NAME)";
				SWIFT_EMIT_LOC_STRINGS = YES;
				SWIFT_VERSION = 5.0;
				TARGETED_DEVICE_FAMILY = 3;
			};
			name = Debug;
		};
		765BB23B2940599C000BF124 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = 
Download .txt
gitextract_yuqwznni/

├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   └── feature_request.yml
│   ├── pull_request_template.md
│   └── workflows/
│       └── swift.yml
├── .gitignore
├── .swiftpm/
│   └── xcode/
│       └── package.xcworkspace/
│           └── contents.xcworkspacedata
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Examples/
│   ├── iOS_Example/
│   │   ├── iOS_Example/
│   │   │   ├── Assets.xcassets/
│   │   │   │   ├── AccentColor.colorset/
│   │   │   │   │   └── Contents.json
│   │   │   │   ├── AppIcon.appiconset/
│   │   │   │   │   └── Contents.json
│   │   │   │   └── Contents.json
│   │   │   ├── Audio/
│   │   │   │   ├── AudioPlayerViewModel.swift
│   │   │   │   └── CreateTranscription.swift
│   │   │   ├── Chat/
│   │   │   │   ├── ChatMainView.swift
│   │   │   │   ├── CreateChatCompletion.swift
│   │   │   │   ├── CreateChatCompletionStreaming.swift
│   │   │   │   └── CreateChatFunctionCallExample.swift
│   │   │   ├── Completion/
│   │   │   │   ├── CompletionMainView.swift
│   │   │   │   └── GenerateCompletionExample.swift
│   │   │   ├── Content Policy/
│   │   │   │   └── ContentPolicyExample.swift
│   │   │   ├── ContentView.swift
│   │   │   ├── Embeddings/
│   │   │   │   └── CreateEmbeddingsExample.swift
│   │   │   ├── File/
│   │   │   │   ├── DeleteFileExample.swift
│   │   │   │   ├── File/
│   │   │   │   │   └── SampleData.jsonl
│   │   │   │   ├── FileDetailsView.swift
│   │   │   │   ├── FileMainView.swift
│   │   │   │   ├── ListFilesExample.swift
│   │   │   │   ├── RetrieveFileContentsExample.swift
│   │   │   │   ├── RetrieveFileExample.swift
│   │   │   │   └── UploadFileExample.swift
│   │   │   ├── Image/
│   │   │   │   ├── EditImageExample.swift
│   │   │   │   ├── GenerateImageExample.swift
│   │   │   │   ├── GenerateImageVariationsExample.swift
│   │   │   │   └── ImageMainView.swift
│   │   │   ├── Model/
│   │   │   │   ├── ListModelsExample.swift
│   │   │   │   ├── ModelMainView.swift
│   │   │   │   └── RetrieveModelExample.swift
│   │   │   ├── Preview Content/
│   │   │   │   └── Preview Assets.xcassets/
│   │   │   │       └── Contents.json
│   │   │   └── iOS_ExampleApp.swift
│   │   └── iOS_Example.xcodeproj/
│   │       ├── project.pbxproj
│   │       └── project.xcworkspace/
│   │           ├── contents.xcworkspacedata
│   │           └── xcshareddata/
│   │               └── IDEWorkspaceChecks.plist
│   ├── macOS_Example/
│   │   ├── macOS_Example/
│   │   │   ├── Assets.xcassets/
│   │   │   │   ├── AccentColor.colorset/
│   │   │   │   │   └── Contents.json
│   │   │   │   ├── AppIcon.appiconset/
│   │   │   │   │   └── Contents.json
│   │   │   │   └── Contents.json
│   │   │   ├── ContentView.swift
│   │   │   ├── Preview Content/
│   │   │   │   └── Preview Assets.xcassets/
│   │   │   │       └── Contents.json
│   │   │   ├── macOS_Example.entitlements
│   │   │   └── macOS_ExampleApp.swift
│   │   └── macOS_Example.xcodeproj/
│   │       ├── project.pbxproj
│   │       └── project.xcworkspace/
│   │           ├── contents.xcworkspacedata
│   │           └── xcshareddata/
│   │               └── IDEWorkspaceChecks.plist
│   ├── tvOS_Example/
│   │   ├── tvOS_Example/
│   │   │   ├── Assets.xcassets/
│   │   │   │   ├── AccentColor.colorset/
│   │   │   │   │   └── Contents.json
│   │   │   │   ├── App Icon & Top Shelf Image.brandassets/
│   │   │   │   │   ├── App Icon - App Store.imagestack/
│   │   │   │   │   │   ├── Back.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   ├── Contents.json
│   │   │   │   │   │   ├── Front.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   └── Middle.imagestacklayer/
│   │   │   │   │   │       ├── Content.imageset/
│   │   │   │   │   │       │   └── Contents.json
│   │   │   │   │   │       └── Contents.json
│   │   │   │   │   ├── App Icon.imagestack/
│   │   │   │   │   │   ├── Back.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   ├── Contents.json
│   │   │   │   │   │   ├── Front.imagestacklayer/
│   │   │   │   │   │   │   ├── Content.imageset/
│   │   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   │   └── Contents.json
│   │   │   │   │   │   └── Middle.imagestacklayer/
│   │   │   │   │   │       ├── Content.imageset/
│   │   │   │   │   │       │   └── Contents.json
│   │   │   │   │   │       └── Contents.json
│   │   │   │   │   ├── Contents.json
│   │   │   │   │   ├── Top Shelf Image Wide.imageset/
│   │   │   │   │   │   └── Contents.json
│   │   │   │   │   └── Top Shelf Image.imageset/
│   │   │   │   │       └── Contents.json
│   │   │   │   └── Contents.json
│   │   │   ├── ContentView.swift
│   │   │   ├── Preview Content/
│   │   │   │   └── Preview Assets.xcassets/
│   │   │   │       └── Contents.json
│   │   │   └── tvOS_ExampleApp.swift
│   │   └── tvOS_Example.xcodeproj/
│   │       ├── project.pbxproj
│   │       └── project.xcworkspace/
│   │           ├── contents.xcworkspacedata
│   │           └── xcshareddata/
│   │               └── IDEWorkspaceChecks.plist
│   └── watchOS_Example/
│       ├── watchOS_Example Watch App/
│       │   ├── Assets.xcassets/
│       │   │   ├── AccentColor.colorset/
│       │   │   │   └── Contents.json
│       │   │   ├── AppIcon.appiconset/
│       │   │   │   └── Contents.json
│       │   │   └── Contents.json
│       │   ├── ContentView.swift
│       │   ├── Preview Content/
│       │   │   └── Preview Assets.xcassets/
│       │   │       └── Contents.json
│       │   └── watchOS_ExampleApp.swift
│       └── watchOS_Example.xcodeproj/
│           ├── project.pbxproj
│           └── project.xcworkspace/
│               ├── contents.xcworkspacedata
│               └── xcshareddata/
│                   └── IDEWorkspaceChecks.plist
├── LICENSE
├── Package.swift
├── Package@swift-5.5.swift
├── Package@swift-5.6.swift
├── Package@swift-5.7.swift
├── Package@swift-5.8.swift
├── README.md
├── SECURITY.md
├── Sources/
│   └── OpenAIKit/
│       ├── Client/
│       │   ├── AudioSpeechResource+API.swift
│       │   ├── BatchesResource+API.swift
│       │   ├── BetaResources+API.swift
│       │   ├── ContainersResource+API.swift
│       │   ├── ConversationsResource+API.swift
│       │   ├── EvalsResource+API.swift
│       │   ├── FineTuningResource+API.swift
│       │   ├── RealtimeResource+API.swift
│       │   ├── ResourceNamespaces.swift
│       │   ├── ResponsesResource+API.swift
│       │   ├── SkillsAndVideosResource+API.swift
│       │   ├── UploadsResource+API.swift
│       │   ├── VectorStoresResource+API.swift
│       │   └── WebhooksResource+Helpers.swift
│       ├── Extensions/
│       │   ├── NSImageExtension.swift
│       │   ├── NSMutableDataExtension.swift
│       │   ├── String.swift
│       │   └── StringPropertyMap.swift
│       ├── OpenAI.swift
│       ├── Protocols/
│       │   ├── Chat/
│       │   │   └── Property.swift
│       │   └── OpenAIProtocol.swift
│       ├── Types/
│       │   ├── Enums/
│       │   │   ├── Audio/
│       │   │   │   └── AudioResponseFormat.swift
│       │   │   ├── Chat/
│       │   │   │   ├── ChatModels.swift
│       │   │   │   └── ChatRole.swift
│       │   │   ├── Completions/
│       │   │   │   └── CompletionModels.swift
│       │   │   ├── Files/
│       │   │   │   └── FileStatus.swift
│       │   │   ├── Images/
│       │   │   │   ├── ImageData.swift
│       │   │   │   ├── ImageModel.swift
│       │   │   │   ├── ImageQuality.swift
│       │   │   │   ├── ImageResolutions.swift
│       │   │   │   ├── ImageStyle.swift
│       │   │   │   └── ResponseFormat.swift
│       │   │   ├── Moderations/
│       │   │   │   └── ContentPolicyModels.swift
│       │   │   └── OpenAI/
│       │   │       ├── OpenAIErrors.swift
│       │   │       └── OpenAIObject.swift
│       │   └── Structs/
│       │       ├── Parameters/
│       │       │   ├── Audio/
│       │       │   │   ├── SpeechParameters.swift
│       │       │   │   └── TranscriptionParameters.swift
│       │       │   ├── Batches/
│       │       │   │   └── BatchParameters.swift
│       │       │   ├── Beta/
│       │       │   │   └── AssistantParameters.swift
│       │       │   ├── Chat/
│       │       │   │   ├── ChatParameters.swift
│       │       │   │   ├── ChatResponseFormat.swift
│       │       │   │   ├── ChatTool.swift
│       │       │   │   ├── Function.swift
│       │       │   │   ├── Parameter.swift
│       │       │   │   └── ParameterDetail.swift
│       │       │   ├── Completions/
│       │       │   │   └── CompletionParameters.swift
│       │       │   ├── Containers/
│       │       │   │   └── ContainerParameters.swift
│       │       │   ├── Conversations/
│       │       │   │   └── ConversationParameters.swift
│       │       │   ├── Embeddings/
│       │       │   │   └── EmbeddingsParameters.swift
│       │       │   ├── Evals/
│       │       │   │   └── EvalParameters.swift
│       │       │   ├── Files/
│       │       │   │   └── UploadFileParameters.swift
│       │       │   ├── FineTuning/
│       │       │   │   └── FineTuningParameters.swift
│       │       │   ├── Images/
│       │       │   │   ├── ImageEditParameters.swift
│       │       │   │   ├── ImageParameters.swift
│       │       │   │   └── ImageVariationParameters.swift
│       │       │   ├── Moderations/
│       │       │   │   └── ConentPolicyParameters.swift
│       │       │   ├── Realtime/
│       │       │   │   └── RealtimeParameters.swift
│       │       │   ├── Responses/
│       │       │   │   └── ResponseParameters.swift
│       │       │   ├── Skills/
│       │       │   │   └── SkillParameters.swift
│       │       │   ├── Uploads/
│       │       │   │   └── UploadParameters.swift
│       │       │   ├── VectorStores/
│       │       │   │   └── VectorStoreParameters.swift
│       │       │   └── Videos/
│       │       │       └── VideoParameters.swift
│       │       └── Schemas/
│       │           ├── Audio/
│       │           │   └── TranscriptionResponse.swift
│       │           ├── Batches/
│       │           │   └── BatchModels.swift
│       │           ├── Beta/
│       │           │   └── AssistantModels.swift
│       │           ├── Chat/
│       │           │   └── ChatResponse.swift
│       │           ├── Completions/
│       │           │   └── CompletionResponse.swift
│       │           ├── Containers/
│       │           │   └── ContainerModels.swift
│       │           ├── Conversations/
│       │           │   └── ConversationModels.swift
│       │           ├── Embeddings/
│       │           │   ├── EmbeddingsData.swift
│       │           │   ├── EmbeddingsResponse.swift
│       │           │   └── EmbeddingsUsage.swift
│       │           ├── Evals/
│       │           │   └── EvalModels.swift
│       │           ├── Files/
│       │           │   ├── File.swift
│       │           │   ├── FileContent.swift
│       │           │   └── ListFilesResponse.swift
│       │           ├── FineTuning/
│       │           │   └── FineTuningModels.swift
│       │           ├── Images/
│       │           │   └── ImageResponse.swift
│       │           ├── Models/
│       │           │   ├── ListModelResponse.swift
│       │           │   └── Model.swift
│       │           ├── Moderations/
│       │           │   ├── ContentPolicyCategories.swift
│       │           │   ├── ContentPolicyCategoryScore.swift
│       │           │   ├── ContentPolicyResponse.swift
│       │           │   └── ContentPolicyResult.swift
│       │           ├── OpenAI/
│       │           │   ├── ChatChoice.swift
│       │           │   ├── ChatMessage.swift
│       │           │   ├── Choice.swift
│       │           │   ├── Configuration.swift
│       │           │   ├── DeleteObject.swift
│       │           │   ├── FormData.swift
│       │           │   ├── FunctionCall.swift
│       │           │   ├── OpenAIErrorMessage.swift
│       │           │   ├── OpenAIErrorResponse.swift
│       │           │   ├── OpenAIRequestOptions.swift
│       │           │   └── Usage.swift
│       │           ├── Realtime/
│       │           │   └── RealtimeModels.swift
│       │           ├── Responses/
│       │           │   └── ResponseModels.swift
│       │           ├── Skills/
│       │           │   └── SkillModels.swift
│       │           ├── Uploads/
│       │           │   └── UploadModels.swift
│       │           ├── VectorStores/
│       │           │   └── VectorStoreModels.swift
│       │           └── Videos/
│       │               └── VideoModels.swift
│       └── Utils/
│           ├── ClampedPropertyWrapper.swift
│           ├── FormDataHelper.swift
│           ├── GenericCodingKeys.swift
│           ├── OpenAIKitSession.swift
│           ├── OpenAIStreamer/
│           │   ├── OpenAIEvent.swift
│           │   ├── OpenAISource.swift
│           │   └── OpenAIStreamParser.swift
│           └── Whisper/
│               ├── SRT.swift
│               └── WebVTT.swift
└── Tests/
    ├── OpenAIKitTests/
    │   ├── Client/
    │   │   ├── OpenAIAudioSpeechTests.swift
    │   │   ├── OpenAIBatchesTests.swift
    │   │   ├── OpenAIBetaAssistantsTests.swift
    │   │   ├── OpenAIClientScaffoldTests.swift
    │   │   ├── OpenAIContainersTests.swift
    │   │   ├── OpenAIConversationsTests.swift
    │   │   ├── OpenAIEncodingMigrationTests.swift
    │   │   ├── OpenAIEvalsTests.swift
    │   │   ├── OpenAIFineTuningTests.swift
    │   │   ├── OpenAIRealtimeTests.swift
    │   │   ├── OpenAIResponsesTests.swift
    │   │   ├── OpenAISkillsAndVideosTests.swift
    │   │   ├── OpenAITransportOptionsTests.swift
    │   │   ├── OpenAIUploadsTests.swift
    │   │   ├── OpenAIVectorStoresTests.swift
    │   │   └── OpenAIWebhooksTests.swift
    │   ├── Extension/
    │   │   └── BundleExtension.swift
    │   ├── Mocks/
    │   │   └── MockOpenAI.swift
    │   ├── OpenAIKitTests.swift
    │   └── Types/
    │       └── Enums/
    │           └── MockOpenAIError.swift
    ├── Resources/
    │   └── JSON Responses/
    │       ├── Completions/
    │       │   └── CompletionResponse.json
    │       ├── Content Policy/
    │       │   └── ContentPolicyResponse.json
    │       ├── Delete File/
    │       │   └── DeleteFileResponse.json
    │       ├── Images/
    │       │   ├── Embeddings/
    │       │   │   └── EmbeddingsResponse.json
    │       │   ├── NumberOfImages/
    │       │   │   ├── ImageURL-1.json
    │       │   │   ├── ImageURL0.json
    │       │   │   ├── ImageURL1.json
    │       │   │   ├── ImageURL10.json
    │       │   │   ├── ImageURL11.json
    │       │   │   └── ImageURL2.json
    │       │   ├── Prompt/
    │       │   │   ├── ImageApple.json
    │       │   │   └── ImageOtter.json
    │       │   ├── Resolution/
    │       │   │   ├── Large/
    │       │   │   │   ├── ImageB64Large.json
    │       │   │   │   └── ImageURLLarge.json
    │       │   │   ├── Medium/
    │       │   │   │   ├── ImageB64Medium.json
    │       │   │   │   └── ImageURLMedium.json
    │       │   │   └── Small/
    │       │   │       ├── ImageB64Small.json
    │       │   │       └── ImageURLSmall.json
    │       │   └── ResponseFormat/
    │       │       ├── ImageB64.json
    │       │       └── ImageURL.json
    │       ├── List Files/
    │       │   └── ListFilesResponse.json
    │       ├── List Models/
    │       │   └── ModelsResponse.json
    │       └── Retrieve Model/
    │           └── RetrieveModelResponse.json
    └── Test Plans/
        └── iOS-TS.xctestplan
Condensed preview — 250 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (735K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 18,
    "preview": "github: MarcoDotIO"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "chars": 1535,
    "preview": "name: Bug report\ndescription: Create a report to help us improve\nlabels: [\"bug\"]\nbody:\n  - type: markdown\n    attributes"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "chars": 612,
    "preview": "name: Feature request\ndescription: Suggest an idea for this library\nlabels: [\"feature-request\"]\nbody:\n  - type: markdown"
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 344,
    "preview": "## Describe your changes\n\n## Issue ticket number and link\n\n## Checklist before requesting a review\n- [ ] I have performe"
  },
  {
    "path": ".github/workflows/swift.yml",
    "chars": 431,
    "preview": "# This workflow will build a Swift project\n# For more information see: https://docs.github.com/en/actions/automating-bui"
  },
  {
    "path": ".gitignore",
    "chars": 526,
    "preview": "# Mac OS X\n.DS_Store\n\n# Cursor IDE\n.cursor/\n\n# Xcode\n\n## Build generated\nbuild/\nDerivedData\n\n## Various settings\n*.pbxus"
  },
  {
    "path": ".swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 2016,
    "preview": "# Changelog\n\nAll notable changes to this project are documented in this file.\n\n## 3.0.0 - 2026-02-19\n\n### Breaking Chang"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 5222,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2992,
    "preview": "# Contributing to Transcriptase\nWe love your input! We want to make contributing to this project as easy and transparent"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json",
    "chars": 123,
    "preview": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "chars": 177,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"platform\" : \"ios\",\n      \"size\" : \"1024x1024\"\n    }\n  ],\n  \"i"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Audio/AudioPlayerViewModel.swift",
    "chars": 1679,
    "preview": "//\n//  AudioPlayerViewModel.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Audio/CreateTranscription.swift",
    "chars": 5507,
    "preview": "//\n//  CreateTranscription.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, f"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/ChatMainView.swift",
    "chars": 1958,
    "preview": "//\n//  ChatMainView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/CreateChatCompletion.swift",
    "chars": 4354,
    "preview": "//\n//  CreateChatCompletion.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/CreateChatCompletionStreaming.swift",
    "chars": 4562,
    "preview": "//\n//  CreateChatCompletionStreaming.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/CreateChatFunctionCallExample.swift",
    "chars": 5229,
    "preview": "//\n//  CreateChatFunctionCallExample.swift\n//  iOS_Example\n//\n//  Created by Marcus Arnett on 10/9/23.\n//\n\nimport SwiftU"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Completion/CompletionMainView.swift",
    "chars": 1660,
    "preview": "//\n//  CompletionMainView.swift\n//  iOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Completion/GenerateCompletionExample.swift",
    "chars": 3811,
    "preview": "//\n//  GenerateCompletionExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby gran"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Content Policy/ContentPolicyExample.swift",
    "chars": 3101,
    "preview": "//\n//  ContentPolicyExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/ContentView.swift",
    "chars": 2490,
    "preview": "//\n//  ContentView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of c"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Embeddings/CreateEmbeddingsExample.swift",
    "chars": 4269,
    "preview": "//\n//  CreateEmbeddingsExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby grante"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/DeleteFileExample.swift",
    "chars": 3190,
    "preview": "//\n//  DeleteFileExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fre"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/File/SampleData.jsonl",
    "chars": 19750,
    "preview": "{\"prompt\":\"Ian Knox (admiral)\\n\\n###\\n\\n\",\"completion\":\" Vice Admiral Ian Warren Knox AC is a retired senior officer of "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/FileDetailsView.swift",
    "chars": 1597,
    "preview": "//\n//  FileDetailsView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/FileMainView.swift",
    "chars": 2171,
    "preview": "//\n//  FileMainView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/ListFilesExample.swift",
    "chars": 3183,
    "preview": "//\n//  ListFilesExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/RetrieveFileContentsExample.swift",
    "chars": 3345,
    "preview": "//\n//  RetrieveFileContentsExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby gr"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/RetrieveFileExample.swift",
    "chars": 3265,
    "preview": "//\n//  RetrieveFileExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, f"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/UploadFileExample.swift",
    "chars": 3938,
    "preview": "//\n//  UploadFileExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fre"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/EditImageExample.swift",
    "chars": 3932,
    "preview": "//\n//  EditImageExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/GenerateImageExample.swift",
    "chars": 3416,
    "preview": "//\n//  GenerateImageExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/GenerateImageVariationsExample.swift",
    "chars": 3824,
    "preview": "//\n//  GenerateImageVariationExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/ImageMainView.swift",
    "chars": 1916,
    "preview": "//\n//  ImageMainView.swift\n//  iOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Model/ListModelsExample.swift",
    "chars": 3046,
    "preview": "//\n//  ListModelsExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fre"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Model/ModelMainView.swift",
    "chars": 1759,
    "preview": "//\n//  ModelMainView.swift\n//  iOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Model/RetrieveModelExample.swift",
    "chars": 3133,
    "preview": "//\n//  RetrieveModelExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Preview Content/Preview Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/iOS_ExampleApp.swift",
    "chars": 1317,
    "preview": "//\n//  iOS_ExampleApp.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free o"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example.xcodeproj/project.pbxproj",
    "chars": 30562,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "chars": 238,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json",
    "chars": 123,
    "preview": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "chars": 904,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"1x\",\n      \"size\" : \"16x16\"\n    },\n    {\n      \"idiom\" : "
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/ContentView.swift",
    "chars": 3094,
    "preview": "//\n//  ContentView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of c"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Preview Content/Preview Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/macOS_Example.entitlements",
    "chars": 420,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/macOS_ExampleApp.swift",
    "chars": 1321,
    "preview": "//\n//  macOS_ExampleApp.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example.xcodeproj/project.pbxproj",
    "chars": 13519,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "chars": 238,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json",
    "chars": 123,
    "preview": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json",
    "chars": 194,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json",
    "chars": 250,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  },\n  \"layers\" : [\n    {\n      \"filename\" : \"Front.imagestackl"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json",
    "chars": 194,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json",
    "chars": 194,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json",
    "chars": 326,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json",
    "chars": 250,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  },\n  \"layers\" : [\n    {\n      \"filename\" : \"Front.imagestackl"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json",
    "chars": 326,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json",
    "chars": 326,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json",
    "chars": 663,
    "preview": "{\n  \"assets\" : [\n    {\n      \"filename\" : \"App Icon - App Store.imagestack\",\n      \"idiom\" : \"tv\",\n      \"role\" : \"prima"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json",
    "chars": 326,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json",
    "chars": 326,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/ContentView.swift",
    "chars": 2266,
    "preview": "//\n//  ContentView.swift\n//  tvOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free o"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Preview Content/Preview Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/tvOS_ExampleApp.swift",
    "chars": 1322,
    "preview": "//\n//  tvOS_ExampleApp.swift\n//  tvOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fr"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example.xcodeproj/project.pbxproj",
    "chars": 13199,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "chars": 238,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Assets.xcassets/AccentColor.colorset/Contents.json",
    "chars": 123,
    "preview": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "chars": 181,
    "preview": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"platform\" : \"watchos\",\n      \"size\" : \"1024x1024\"\n    }\n  ],\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/ContentView.swift",
    "chars": 2279,
    "preview": "//\n//  ContentView.swift\n//  watchOS_Example Watch App\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby gr"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Preview Content/Preview Assets.xcassets/Contents.json",
    "chars": 63,
    "preview": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/watchOS_ExampleApp.swift",
    "chars": 1351,
    "preview": "//\n//  watchOS_ExampleApp.swift\n//  watchOS_Example Watch App\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is he"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example.xcodeproj/project.pbxproj",
    "chars": 13672,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 135,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "chars": 238,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "LICENSE",
    "chars": 1052,
    "preview": "Copyright (c) OpenDive 2023\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this softwa"
  },
  {
    "path": "Package.swift",
    "chars": 1999,
    "preview": "//  swift-tools-version: 6.2\n//\n//  Package.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is "
  },
  {
    "path": "Package@swift-5.5.swift",
    "chars": 1843,
    "preview": "//  swift-tools-version: 5.5\n//\n//  Package@swift-5.5.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Perm"
  },
  {
    "path": "Package@swift-5.6.swift",
    "chars": 1841,
    "preview": "//  swift-tools-version: 5.6\n//\n//  Package@swift-5.6.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Perm"
  },
  {
    "path": "Package@swift-5.7.swift",
    "chars": 1841,
    "preview": "//  swift-tools-version: 5.7\n//\n//  Package@swift-5.7.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Perm"
  },
  {
    "path": "Package@swift-5.8.swift",
    "chars": 1841,
    "preview": "//  swift-tools-version: 5.8\n//\n//  Package@swift-5.8.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Perm"
  },
  {
    "path": "README.md",
    "chars": 30568,
    "preview": "[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOpenDive%2FOpenAIKit%2Fb"
  },
  {
    "path": "SECURITY.md",
    "chars": 392,
    "preview": "# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 2.0.1 | :w"
  },
  {
    "path": "Sources/OpenAIKit/Client/AudioSpeechResource+API.swift",
    "chars": 483,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension AudioSpeechResource {\n    fun"
  },
  {
    "path": "Sources/OpenAIKit/Client/BatchesResource+API.swift",
    "chars": 1420,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension BatchesResource {\n    func cr"
  },
  {
    "path": "Sources/OpenAIKit/Client/BetaResources+API.swift",
    "chars": 5720,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension BetaAssistantsResource {\n    "
  },
  {
    "path": "Sources/OpenAIKit/Client/ContainersResource+API.swift",
    "chars": 3658,
    "preview": "import Foundation\n\nprivate struct EmptyContainerContentBody: Encodable {\n    init() {}\n}\n\n@available(macOS 10.15, iOS 13"
  },
  {
    "path": "Sources/OpenAIKit/Client/ConversationsResource+API.swift",
    "chars": 3188,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ConversationsResource {\n    f"
  },
  {
    "path": "Sources/OpenAIKit/Client/EvalsResource+API.swift",
    "chars": 3439,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension EvalsResource {\n    func crea"
  },
  {
    "path": "Sources/OpenAIKit/Client/FineTuningResource+API.swift",
    "chars": 2267,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension FineTuningJobsResource {\n    "
  },
  {
    "path": "Sources/OpenAIKit/Client/RealtimeResource+API.swift",
    "chars": 3943,
    "preview": "import Foundation\n\npublic struct RealtimeConnectionOptions: Sendable {\n    public var model: String?\n    public var call"
  },
  {
    "path": "Sources/OpenAIKit/Client/ResourceNamespaces.swift",
    "chars": 8319,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic class OpenAIResource {\n    internal uno"
  },
  {
    "path": "Sources/OpenAIKit/Client/ResponsesResource+API.swift",
    "chars": 2978,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ResponsesResource {\n    func "
  },
  {
    "path": "Sources/OpenAIKit/Client/SkillsAndVideosResource+API.swift",
    "chars": 5353,
    "preview": "import Foundation\n\nprivate struct EmptySkillBody: Encodable {\n    init() {}\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6"
  },
  {
    "path": "Sources/OpenAIKit/Client/UploadsResource+API.swift",
    "chars": 1918,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension UploadsResource {\n    func cr"
  },
  {
    "path": "Sources/OpenAIKit/Client/VectorStoresResource+API.swift",
    "chars": 5255,
    "preview": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension VectorStoresResource {\n    fu"
  },
  {
    "path": "Sources/OpenAIKit/Client/WebhooksResource+Helpers.swift",
    "chars": 3327,
    "preview": "import CryptoKit\nimport Foundation\n\npublic enum OpenAIWebhookError: Error {\n    case missingWebhookSecret\n    case missi"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/NSImageExtension.swift",
    "chars": 3157,
    "preview": "//\n//  NSImageExtension.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/NSMutableDataExtension.swift",
    "chars": 1430,
    "preview": "//\n//  NSMutableDataExtension.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/String.swift",
    "chars": 813,
    "preview": "//\n//  File.swift\n//  \n//\n//  Created by Marcus Arnett on 8/12/23.\n//\n\nimport Foundation\n\nextension String {\n    interna"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/StringPropertyMap.swift",
    "chars": 392,
    "preview": "//\n//  SwiftUIView.swift\n//  \n//\n//  Created by Marcus Arnett on 10/10/23.\n//\n\nimport SwiftUI\n\ninternal extension [Strin"
  },
  {
    "path": "Sources/OpenAIKit/OpenAI.swift",
    "chars": 11819,
    "preview": "//\n//  OpenAI.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge"
  },
  {
    "path": "Sources/OpenAIKit/Protocols/Chat/Property.swift",
    "chars": 1370,
    "preview": "//\n//  Property.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of char"
  },
  {
    "path": "Sources/OpenAIKit/Protocols/OpenAIProtocol.swift",
    "chars": 8962,
    "preview": "//\n//  OpenAIProtocol.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free o"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Audio/AudioResponseFormat.swift",
    "chars": 396,
    "preview": "//\n//  AudioResponseFormat.swift\n//  \n//\n//  Created by Marcus Arnett on 8/6/23.\n//\n\nimport Foundation\n\npublic enum Audi"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Chat/ChatModels.swift",
    "chars": 4042,
    "preview": "//\n//  ChatModels.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of ch"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Chat/ChatRole.swift",
    "chars": 1404,
    "preview": "//\n//  ChatRole.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of char"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Completions/CompletionModels.swift",
    "chars": 2466,
    "preview": "//\n//  CompletionModels.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Files/FileStatus.swift",
    "chars": 1360,
    "preview": "//\n//  FileStatus.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of ch"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageData.swift",
    "chars": 2090,
    "preview": "//\n//  ImageData.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of cha"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageModel.swift",
    "chars": 1379,
    "preview": "//\n//  ImageModel.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of ch"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageQuality.swift",
    "chars": 1472,
    "preview": "//\n//  ImageQuality.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of "
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageResolutions.swift",
    "chars": 1665,
    "preview": "//\n//  ImageResolutions.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageStyle.swift",
    "chars": 1407,
    "preview": "//\n//  ImageStyle.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of ch"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ResponseFormat.swift",
    "chars": 1436,
    "preview": "//\n//  ResponseFormat.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free o"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Moderations/ContentPolicyModels.swift",
    "chars": 1926,
    "preview": "//\n//  ContentPolicyModels.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, f"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/OpenAI/OpenAIErrors.swift",
    "chars": 2667,
    "preview": "//\n//  OpenAIError.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of c"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/OpenAI/OpenAIObject.swift",
    "chars": 1812,
    "preview": "//\n//  OpenAIObject.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Audio/SpeechParameters.swift",
    "chars": 1339,
    "preview": "import Foundation\n\n/// Parameters for text-to-speech generation.\npublic struct SpeechParameters: Encodable {\n    enum Co"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Audio/TranscriptionParameters.swift",
    "chars": 5157,
    "preview": "//\n//  TranscriptionParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby grante"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Batches/BatchParameters.swift",
    "chars": 732,
    "preview": "import Foundation\n\npublic struct BatchCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        cas"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Beta/AssistantParameters.swift",
    "chars": 2470,
    "preview": "import Foundation\n\npublic struct AssistantCreateParameters: Encodable {\n    public var model: String\n    public var name"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ChatParameters.swift",
    "chars": 10721,
    "preview": "//\n//  ChatParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free o"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ChatResponseFormat.swift",
    "chars": 348,
    "preview": "import Foundation\n\n/// Response format options for chat completions.\npublic struct ChatResponseFormat: Codable {\n    pub"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ChatTool.swift",
    "chars": 371,
    "preview": "import Foundation\n\n/// Tool definition for modern chat completions.\npublic struct ChatTool: Codable {\n    /// Tool type."
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/Function.swift",
    "chars": 2543,
    "preview": "//\n//  Function.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of char"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/Parameter.swift",
    "chars": 3220,
    "preview": "//\n//  Parameter.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of cha"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ParameterDetail.swift",
    "chars": 2258,
    "preview": "//\n//  ParameterDetail.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Completions/CompletionParameters.swift",
    "chars": 8884,
    "preview": "//\n//  CompletionParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Containers/ContainerParameters.swift",
    "chars": 517,
    "preview": "import Foundation\n\npublic struct ContainerCreateParameters: Encodable {\n    public var name: String\n    public var metad"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Conversations/ConversationParameters.swift",
    "chars": 534,
    "preview": "import Foundation\n\npublic struct ConversationCreateParameters: Encodable {\n    public var metadata: [String: String]?\n\n "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Embeddings/EmbeddingsParameters.swift",
    "chars": 2526,
    "preview": "//\n//  EmbeddingsParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Evals/EvalParameters.swift",
    "chars": 720,
    "preview": "import Foundation\n\npublic struct EvalCreateParameters: Encodable {\n    public var name: String\n    public var metadata: "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Files/UploadFileParameters.swift",
    "chars": 2243,
    "preview": "//\n//  UploadFileParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/FineTuning/FineTuningParameters.swift",
    "chars": 708,
    "preview": "import Foundation\n\npublic struct FineTuningJobCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n   "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Images/ImageEditParameters.swift",
    "chars": 5852,
    "preview": "//\n//  ImageEditParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, f"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Images/ImageParameters.swift",
    "chars": 5239,
    "preview": "//\n//  ImageParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Images/ImageVariationParameters.swift",
    "chars": 4685,
    "preview": "//\n//  ImageVariationParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby grant"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Moderations/ConentPolicyParameters.swift",
    "chars": 2200,
    "preview": "//\n//  ContentPolicyParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby grante"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Realtime/RealtimeParameters.swift",
    "chars": 783,
    "preview": "import Foundation\n\npublic struct RealtimeCallCreateParameters: Encodable {\n    public var model: String?\n    public var "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Responses/ResponseParameters.swift",
    "chars": 810,
    "preview": "import Foundation\n\npublic struct ResponseCreateParameters: Encodable {\n    public var model: String\n    public var input"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Skills/SkillParameters.swift",
    "chars": 905,
    "preview": "import Foundation\n\npublic struct SkillCreateParameters: Encodable {\n    public var name: String\n    public var descripti"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Uploads/UploadParameters.swift",
    "chars": 954,
    "preview": "import Foundation\n\npublic struct UploadCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        ca"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/VectorStores/VectorStoreParameters.swift",
    "chars": 1268,
    "preview": "import Foundation\n\npublic struct VectorStoreCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n     "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Videos/VideoParameters.swift",
    "chars": 241,
    "preview": "import Foundation\n\npublic struct VideoCreateParameters: Encodable {\n    public var model: String\n    public var prompt: "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Audio/TranscriptionResponse.swift",
    "chars": 2929,
    "preview": "//\n//  TranscriptionResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted,"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Batches/BatchModels.swift",
    "chars": 818,
    "preview": "import Foundation\n\npublic struct BatchObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n       "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Beta/AssistantModels.swift",
    "chars": 2208,
    "preview": "import Foundation\n\npublic struct AssistantTool: Codable {\n    public var type: String\n\n    public init(type: String) {\n "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Chat/ChatResponse.swift",
    "chars": 1611,
    "preview": "//\n//  ChatResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Completions/CompletionResponse.swift",
    "chars": 1727,
    "preview": "//\n//  CompletionResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fr"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Containers/ContainerModels.swift",
    "chars": 975,
    "preview": "import Foundation\n\npublic struct ContainerObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n   "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Conversations/ConversationModels.swift",
    "chars": 1006,
    "preview": "import Foundation\n\npublic struct ConversationObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Embeddings/EmbeddingsData.swift",
    "chars": 1528,
    "preview": "//\n//  EmbeddingsData.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free o"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Embeddings/EmbeddingsResponse.swift",
    "chars": 1629,
    "preview": "//\n//  EmbeddingsResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fr"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Embeddings/EmbeddingsUsage.swift",
    "chars": 1553,
    "preview": "//\n//  EmbeddingsUsage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Evals/EvalModels.swift",
    "chars": 1267,
    "preview": "import Foundation\n\npublic struct EvalObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Files/File.swift",
    "chars": 2121,
    "preview": "//\n//  File.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Files/FileContent.swift",
    "chars": 1469,
    "preview": "//\n//  FileContent.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of c"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Files/ListFilesResponse.swift",
    "chars": 1432,
    "preview": "//\n//  ListFilesResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fre"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/FineTuning/FineTuningModels.swift",
    "chars": 1607,
    "preview": "import Foundation\n\npublic struct FineTuningJobObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Images/ImageResponse.swift",
    "chars": 1443,
    "preview": "//\n//  ImageResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Models/ListModelResponse.swift",
    "chars": 1442,
    "preview": "//\n//  ListModelResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fre"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Models/Model.swift",
    "chars": 1658,
    "preview": "//\n//  Model.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge,"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyCategories.swift",
    "chars": 2708,
    "preview": "//\n//  ContentPolicyCategories.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby grante"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyCategoryScore.swift",
    "chars": 2730,
    "preview": "//\n//  ContentPolicyCategoryScore.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby gra"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyResponse.swift",
    "chars": 1547,
    "preview": "//\n//  ContentPolicyResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted,"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyResult.swift",
    "chars": 1714,
    "preview": "//\n//  ContentPolicyResult.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, f"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/ChatChoice.swift",
    "chars": 2009,
    "preview": "//\n//  ChatChoice.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of ch"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/ChatMessage.swift",
    "chars": 2265,
    "preview": "//\n//  ChatMessage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of c"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/Choice.swift",
    "chars": 1717,
    "preview": "//\n//  Choice.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/Configuration.swift",
    "chars": 2803,
    "preview": "//\n//  Configuration.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/DeleteObject.swift",
    "chars": 1517,
    "preview": "//\n//  DeleteObject.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/FormData.swift",
    "chars": 1513,
    "preview": "//\n//  FormData.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of char"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/FunctionCall.swift",
    "chars": 1643,
    "preview": "//\n//  FunctionCall.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/OpenAIErrorMessage.swift",
    "chars": 1618,
    "preview": "//\n//  OpenAIErrorMessage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fr"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/OpenAIErrorResponse.swift",
    "chars": 1360,
    "preview": "//\n//  OpenAIErrorResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, f"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/OpenAIRequestOptions.swift",
    "chars": 736,
    "preview": "import Foundation\n\n/// Request behavior options used by OpenAIKit transport calls.\npublic struct OpenAIRequestOptions: S"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/Usage.swift",
    "chars": 1705,
    "preview": "//\n//  Usage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge,"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Realtime/RealtimeModels.swift",
    "chars": 800,
    "preview": "import Foundation\n\npublic struct RealtimeCallObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Responses/ResponseModels.swift",
    "chars": 952,
    "preview": "import Foundation\n\npublic struct ResponseObject: Codable, Sendable {\n    enum CodingKeys: String, CodingKey {\n        ca"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Skills/SkillModels.swift",
    "chars": 922,
    "preview": "import Foundation\n\npublic struct SkillObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n       "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Uploads/UploadModels.swift",
    "chars": 745,
    "preview": "import Foundation\n\npublic struct UploadObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n      "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/VectorStores/VectorStoreModels.swift",
    "chars": 1629,
    "preview": "import Foundation\n\npublic struct VectorStoreObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n "
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Videos/VideoModels.swift",
    "chars": 479,
    "preview": "import Foundation\n\npublic struct VideoObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n       "
  },
  {
    "path": "Sources/OpenAIKit/Utils/ClampedPropertyWrapper.swift",
    "chars": 1497,
    "preview": "//\n//  ClampedPropertyWrapper.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted"
  },
  {
    "path": "Sources/OpenAIKit/Utils/FormDataHelper.swift",
    "chars": 3964,
    "preview": "//\n//  FormDataHelper.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free o"
  },
  {
    "path": "Sources/OpenAIKit/Utils/GenericCodingKeys.swift",
    "chars": 1815,
    "preview": "//\n//  GenericCodingKeys.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, fre"
  }
]

// ... and 50 more files (download for full content)

About this extraction

This page contains the full source code of the MarcoDotIO/OpenAIKit GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 250 files (665.2 KB), approximately 185.6k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!