[
  {
    "path": ".github/FUNDING.yml",
    "content": "github: MarcoDotIO"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: Bug report\ndescription: Create a report to help us improve\nlabels: [\"bug\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report!\n  - type: textarea\n    id: what-happened\n    attributes:\n      label: Describe the bug\n      description: A clear and concise description of what the bug is, and any additional context.\n      placeholder: Tell us what you see!\n    validations:\n      required: true\n  - type: textarea\n    id: repro-steps\n    attributes:\n      label: To Reproduce\n      description: Steps to reproduce the behavior.\n      placeholder: |\n        1. Fetch a '...'\n        2. Update the '....'\n        3. See error\n    validations:\n      required: true\n  - type: textarea\n    id: code-snippets\n    attributes:\n      label: Code snippets\n      description: If applicable, add code snippets to help explain your problem.\n      render: Swift\n    validations:\n      required: false\n  - type: input\n    id: os\n    attributes:\n      label: OS\n      placeholder: macOS\n    validations:\n      required: true\n  - type: input\n    id: language-version\n    attributes:\n      label: Swift Version\n      placeholder: Swift 5.7\n    validations:\n      required: true\n  - type: input\n    id: xcode-version\n    attributes:\n      label: Xcode Version\n      placeholder: Xcode 14.1\n    validations:\n      required: true\n  - type: input\n    id: lib-version\n    attributes:\n      label: Library version\n      placeholder: OpenAIKit v1.0.0\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: Feature request\ndescription: Suggest an idea for this library\nlabels: [\"feature-request\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this feature request!\n  - type: textarea\n    id: feature\n    attributes:\n      label: Describe the feature or improvement you're requesting\n      description: A clear and concise description of what you want to happen.\n    validations:\n      required: true\n  - type: textarea\n    id: context\n    attributes:\n      label: Additional context\n      description: Add any other context about the feature request here.\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "## Describe your changes\n\n## Issue ticket number and link\n\n## Checklist before requesting a review\n- [ ] I have performed a self-review of my code\n- [ ] If it is a core feature, I have added thorough tests.\n- [ ] Do we need to implement analytics?\n- [ ] Will this be part of a product update? If yes, please write one phrase about this update.\n"
  },
  {
    "path": ".github/workflows/swift.yml",
    "content": "# This workflow will build a Swift project\n# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift\n\nname: Swift\n\non:\n  push:\n    branches: [ \"main\" ]\n  pull_request:\n    branches: [ \"main\" ]\n\njobs:\n  build:\n\n    runs-on: macos-latest\n\n    steps:\n    - uses: actions/checkout@v3\n    - name: Build\n      run: swift build -v\n    - name: Run tests\n      run: swift test -v\n"
  },
  {
    "path": ".gitignore",
    "content": "# 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*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n\n## Other\n*.xccheckout\n*.moved-aside\n*.xcuserstate\n*.xcscmblueprint\n\n## Obj-C/Swift specific\n*.hmap\n*.ipa\n\n## Playgrounds\ntimeline.xctimeline\nplayground.xcworkspace\n\n# Swift Package Manager\n.build/\n\n# Carthage\nCarthage/Build\n.UlyssesRoot\n.Ulysses-Settings.plist\n.Ulysses-Group.plist"
  },
  {
    "path": ".swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project are documented in this file.\n\n## 3.0.0 - 2026-02-19\n\n### Breaking Changes\n- Introduced a modular resource-first client surface (for example `client.chat.completions`, `client.responses`, `client.uploads`) as the primary 3.x API.\n- Migrated core request payloads from manual dictionaries to strongly typed `Encodable` request models.\n- Updated package language mode to Swift 6.2 with Swift 6 concurrency checks enabled.\n\n### Added\n- Added Responses resources (`create`, `stream`, `parse`, `retrieve`, `cancel`, `delete`) and typed input item/token helpers.\n- Added Realtime resources with calls, client secret support, and connection manager abstractions.\n- Added Uploads resources with upload parts and upload completion flows.\n- Added Conversations resources with nested conversation items APIs.\n- Added Containers resources with nested files/content APIs.\n- Added Evals resources with runs and output items APIs.\n- Added Skills resources (including versions and content APIs) and Videos resources.\n- Added webhook signature verification and typed `unwrap` helpers.\n- Added/expanded resource coverage for Audio speech, Vector stores, Batches, Fine-tuning jobs, and Beta assistants/threads.\n\n### Changed\n- Improved transport configuration with typed request options (timeouts, retries, additional headers) and typed status error mapping.\n- Expanded `Configuration` to include project ID, webhook secret, base URL, and richer request options.\n- Modernized chat parameter modeling to cover current chat completion fields (tools, response format, token controls, etc.).\n\n### Concurrency and Hardening\n- Hardened streaming and transport internals for Swift 6.2 concurrency compatibility.\n- Added `Sendable` conformances and safe type constraints across streamed/response model surfaces.\n\n### Docs and Tests\n- Added migration guidance for 2.x -> 3.x in the README.\n- Added comprehensive step-based tests for each newly introduced resource area and compatibility behavior.\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n  overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n  advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n  address, without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n@OpenDive on Twitter.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior,  harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to Transcriptase\nWe love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:\n\n- Reporting a bug\n- Discussing the current state of the code\n- Submitting a fix\n- Proposing new features\n- Becoming a maintainer\n\n## We Develop with Github\nWe use github to host code, to track issues and feature requests, as well as accept pull requests.\n\n## We Use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow), So All Code Changes Happen Through Pull Requests\nPull 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:\n\n1. Fork the repo and create your branch from `main`.\n2. If you've added code that should be tested, add tests.\n3. If you've changed APIs, update the documentation.\n4. Ensure the test suite passes.\n5. Make sure your code lints.\n6. Issue that pull request!\n\n## Any contributions you make will be under the MIT Software License\nIn 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.\n\n## Report bugs using Github's [issues](https://github.com/OpenDive/OpenAIKit/issues)\nWe 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!\n\n## Write bug reports with detail, background, and sample code\n[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.\n\n**Great Bug Reports** tend to have:\n\n- A quick summary and/or background\n- Steps to reproduce\n  - Be specific!\n  - 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\n- What you expected would happen\n- What actually happens\n- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)\n\nPeople *love* thorough bug reports. I'm not even kidding.\n\n## Use a Consistent Coding Style\nI'm again borrowing these from [Facebook's Guidelines](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)\n\n* 2 spaces for indentation rather than tabs\n* You can try running `swiftlint` for style unification\n\n## License\nBy contributing, you agree that your contributions will be licensed under its MIT License.\n\n## References\nThis document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json",
    "content": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"platform\" : \"ios\",\n      \"size\" : \"1024x1024\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Audio/AudioPlayerViewModel.swift",
    "content": "//\n//  AudioPlayerViewModel.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport SwiftUI\nimport AVFoundation\n\nclass AudioPlayerViewModel: ObservableObject {\n    private var audioPlayer: AVAudioPlayer?\n\n    func play(audioData: Data?) {\n        guard let data = audioData else {\n            print(\"No audio data set\")\n            return\n        }\n        \n        do {\n            audioPlayer = try AVAudioPlayer(data: data)\n            audioPlayer?.play()\n        } catch {\n            print(\"Error initializing audio player: \\(error.localizedDescription)\")\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Audio/CreateTranscription.swift",
    "content": "//\n//  CreateTranscription.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport SwiftUI\nimport OpenAIKit\nimport AVFoundation\n\nenum TranscriptionType: String, CaseIterable, Identifiable {\n    case english\n    case dutch\n\n    var id: Self { self }\n}\n\nstruct CreateTranscriptionExample: View {\n    @StateObject private var viewModel = AudioPlayerViewModel()\n\n    @State private var isCompleting: Bool = false\n    @State private var transcription: String = \"\"\n    @State private var selectedLanguage: TranscriptionType = .english\n\n    var audioData: Data? {\n        switch selectedLanguage {\n        case .english:\n            return self.retrieveAudio(type: .english)\n        case .dutch:\n            return self.retrieveAudio(type: .dutch)\n        }\n    }\n\n    // English Audio Source: https://librivox.org/12-creepy-tales-by-edgar-allan-poe/\n    // 12 - THE PIT AND THE PENDULUM -- Narrator: Eden Rea-Hedrick\n    // ---------------------------------------------------------------------------------------\n    // Dutch Audio Source: https://librivox.org/the-raven-multilingual-by-edgar-allan-poe/\n    // 04 - Dutch: De Raaf (John F. Malta) -- Narrator: Julie VW\n    private func retrieveAudio(type: TranscriptionType) -> Data? {\n        guard\n            let filePath = Bundle.main.path(\n                forResource: type == .english ? \"audio\" : \"audio_translation\",\n                ofType: \"mp3\"\n            ),\n            let audio = try? Data(contentsOf: URL(fileURLWithPath: filePath))\n        else {\n            return nil\n        }\n\n        return audio\n    }\n\n    var body: some View {\n        VStack {\n            Picker(\"Transcription Type\", selection: $selectedLanguage) {\n                Text(\"Regular Transcription\").tag(TranscriptionType.english)\n                Text(\"Translation Transcription\").tag(TranscriptionType.dutch)\n            }\n            .padding(.bottom, 90)\n\n            Button {\n                self.viewModel.play(audioData: self.audioData)\n            } label: {\n                Text(\"Play Audio\")\n                    .font(.headline)\n                    .foregroundColor(.white)\n                    .frame(width: 270, height: 50)\n                    .background(.blue)\n                    .clipShape(Capsule())\n                    .padding(.top, 8)\n            }\n\n            if isCompleting {\n                VStack {\n                    Text(transcription)\n                }\n                .padding()\n            } else {\n                VStack {\n                    Button {\n                        isCompleting = true\n\n                        Task {\n                            do {\n                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                                let config = Configuration(\n                                    organizationId: \"INSERT-ORGANIZATION-ID\",\n                                    apiKey: \"INSERT-API-KEY\"\n                                )\n                                let openAI = OpenAI(config)\n\n                                guard let audio = self.audioData else { throw OpenAIError.invalidData }\n\n                                let audioParameters = TranscriptionParameters(file: audio)\n                                let transcriptionCompletion = try await self.selectedLanguage == .english ?\n                                    openAI.createTranscription(parameters: audioParameters) :\n                                    openAI.createTranslation(parameters: audioParameters)\n\n                                if let text = transcriptionCompletion.text {\n                                    self.transcription = text\n                                }\n                            } catch {\n                                print(\"ERROR DETAILS - \\(error)\")\n                            }\n                        }\n                    } label: {\n                        Text(\"Generate Transcription\")\n                            .font(.headline)\n                            .foregroundColor(.white)\n                            .frame(width: 270, height: 50)\n                            .background(.blue)\n                            .clipShape(Capsule())\n                            .padding(.top, 8)\n                    }\n                }\n            }\n        }\n    }\n}\n\n#Preview {\n    CreateTranscriptionExample()\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/ChatMainView.swift",
    "content": "//\n//  ChatMainView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport SwiftUI\n\nstruct ChatMainView: View {\n    var body: some View {\n        List {\n            NavigationLink(destination: CreateChatCompletionExample()) {\n                Text(\"Generate Chat Completion Example\")\n            }\n\n            NavigationLink(destination: CreateChatCompletionStreamingExample()) {\n                Text(\"Generate Chat Completion Streaming Example\")\n            }\n\n            NavigationLink(destination: CreateChatFunctionCallExample()) {\n                Text(\"Generate Chat Completion Function Call Example\")\n            }\n        }\n        .listStyle(.plain)\n        .navigationTitle(\"Chat\")\n    }\n}\n\nstruct ChatMainView_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            ChatMainView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/CreateChatCompletion.swift",
    "content": "//\n//  CreateChatCompletion.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n// \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct CreateChatCompletionExample: View {\n    @State private var responseText: String?\n    @State private var isCompleting: Bool = false\n\n    let chat: [ChatMessage] = [\n        ChatMessage(role: .system, content: \"You are a helpful assistant.\"),\n        ChatMessage(role: .user, content: \"Who won the world series in 2020?\"),\n        ChatMessage(role: .assistant, content: \"The Los Angeles Dodgers won the World Series in 2020.\"),\n        ChatMessage(role: .user, content: \"Where was it played?\")\n    ]\n\n    var body: some View {\n        VStack {\n            VStack(alignment: .leading) {\n                ForEach(chat) { message in\n                    Text(\"\\(message.role.rawValue.capitalized): \\(message.content ?? \"NO CONTENT\")\")\n                        .padding(.vertical, 10)\n                }\n            }\n            .padding(20)\n\n            if isCompleting {\n                VStack {\n                    if let responseText = self.responseText {\n                        Text(\"Assistant: \\(responseText)\")\n                    } else {\n                        Text(\"Assistant: ...\")\n                    }\n                }\n                .padding()\n            } else {\n                VStack {\n                    Button {\n                        isCompleting = true\n\n                        Task {\n                            do {\n                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                                let config = Configuration(\n                                    organizationId: \"INSERT-ORGANIZATION-ID\",\n                                    apiKey: \"INSERT-API-KEY\"\n                                )\n                                let openAI = OpenAI(config)\n                                let chatParameters = ChatParameters(model: .chatGPTTurbo, messages: chat)\n                                let chatCompletion = try await openAI.generateChatCompletion(\n                                    parameters: chatParameters\n                                )\n                                \n                                if let message = chatCompletion.choices[0].message {\n                                    self.responseText = message.content\n                                }\n                            } catch {\n                                print(\"ERROR DETAILS - \\(error)\")\n                            }\n                        }\n                    } label: {\n                        Text(\"Generate Completion\")\n                            .font(.headline)\n                            .foregroundColor(.white)\n                            .frame(width: 270, height: 50)\n                            .background(.blue)\n                            .clipShape(Capsule())\n                            .padding(.top, 8)\n                    }\n                }\n            }\n        }\n\n        Spacer()\n    }\n}\n\nstruct CreateChatCompletionExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            CreateChatCompletionExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/CreateChatCompletionStreaming.swift",
    "content": "//\n//  CreateChatCompletionStreaming.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport SwiftUI\nimport OpenAIKit\n\nstruct CreateChatCompletionStreamingExample: View {\n    @State private var responseText: String = \"\"\n    @State private var isCompleting: Bool = false\n\n    let chat: [ChatMessage] = [\n        ChatMessage(role: .system, content: \"You are a helpful assistant.\"),\n        ChatMessage(role: .user, content: \"Who won the world series in 2020?\"),\n        ChatMessage(role: .assistant, content: \"The Los Angeles Dodgers won the World Series in 2020.\"),\n        ChatMessage(role: .user, content: \"Where was it played?\")\n    ]\n\n    var body: some View {\n        VStack {\n            VStack(alignment: .leading) {\n                ForEach(chat) { message in\n                    Text(\"\\(message.role.rawValue.capitalized): \\(message.content ?? \"NO CONTENT\")\")\n                        .padding(.vertical, 10)\n                }\n            }\n            .padding(20)\n\n            if isCompleting {\n                VStack {\n                    Text(responseText)\n                }\n                .padding()\n            } else {\n                VStack {\n                    Button {\n                        self.isCompleting = true\n\n                        Task {\n                            do {\n                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                                let config = Configuration(\n                                    organizationId: \"INSERT-ORGANIZATION-ID\",\n                                    apiKey: \"INSERT-API-KEY\"\n                                )\n                                let openAI = OpenAI(config)\n                                let chatParameters = ChatParameters(model: .chatGPTTurbo, messages: chat)\n                                let stream = try openAI.generateChatCompletionStreaming(\n                                    parameters: chatParameters\n                                )\n\n                                for try await result in stream {\n                                    if let delta = result.choices[0].delta {\n                                        if let role = delta.role {\n                                            self.responseText += \"\\(role.rawValue.capitalized): \"\n                                        } else if let content = delta.content {\n                                            self.responseText += content\n                                        }\n                                    }\n                                }\n                            } catch {\n                                print(\"ERROR DETAILS - \\(error)\")\n                            }\n                        }\n                    } label: {\n                        Text(\"Stream Completion\")\n                            .font(.headline)\n                            .foregroundColor(.white)\n                            .frame(width: 270, height: 50)\n                            .background(.blue)\n                            .clipShape(Capsule())\n                            .padding(.top, 8)\n                    }\n                }\n            }\n        }\n\n        Spacer()\n    }\n}\n\nstruct CreateChatCompletionStreamingExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            CreateChatCompletionStreamingExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Chat/CreateChatFunctionCallExample.swift",
    "content": "//\n//  CreateChatFunctionCallExample.swift\n//  iOS_Example\n//\n//  Created by Marcus Arnett on 10/9/23.\n//\n\nimport SwiftUI\nimport OpenAIKit\n\nstruct CreateChatFunctionCallExample: View {\n    @State private var isCompleting: Bool = false\n    @State private var weatherInfo: WeatherInfo? = nil\n\n    enum TemperatureUnit: String, Codable {\n        case fahrenheit\n        case celsius\n    }\n\n    struct WeatherInfo: Codable {\n        let location: String\n        let temperature: String\n        let unit: TemperatureUnit\n        let forecast: [String]\n    }\n\n    func getCurrentWeather(location: String, unit: TemperatureUnit = .fahrenheit) -> WeatherInfo {\n        return WeatherInfo(location: location, temperature: \"72\", unit: unit, forecast: [\"sunny\", \"windy\"])\n    }\n\n    let messages: [ChatMessage] = [ChatMessage(role: .user, content: \"What's the weather like in Boston?\")]\n\n    let functions: [Function] = [\n        Function(\n            name: \"getCurrentWeather\",\n            description: \"Get the current weather in a given location\",\n            parameters: Parameters(\n                type: \"object\",\n                properties: [\n                    \"location\": ParameterDetail(type: \"string\", description: \"The city and state, e.g. San Francisco, CA\"),\n                    \"unit\": ParameterDetail(type: \"string\", enumValues: [\"fahrenheit\", \"celsius\"])\n                ],\n                required: [\"location\"]\n            )\n        )\n    ]\n\n    var body: some View {\n        VStack {\n            VStack(alignment: .leading) {\n                ForEach(messages) { message in\n                    Text(\"\\(message.role.rawValue.capitalized): \\(message.content ?? \"NO CONTENT\")\")\n                        .padding(.vertical, 10)\n                }\n            }\n            .padding(20)\n\n            if isCompleting {\n                VStack {\n                    if let weatherInfo {\n                        Text(\"Assistant: The current weather in \\(weatherInfo.location) is \\(weatherInfo.temperature) degrees \\(weatherInfo.unit.rawValue).\")\n                    } else {\n                        Text(\"Assistant: ...\")\n                    }\n                }\n                .padding()\n            } else {\n                VStack {\n                    Button {\n                        isCompleting = true\n\n                        Task {\n                            do {\n                                // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                                let config = Configuration(\n                                    organizationId: \"INSERT-ORGANIZATION-ID\",\n                                    apiKey: \"INSERT-API-KEY\"\n                                )\n                                let openAI = OpenAI(config)\n                                let chatParameters = ChatParameters(\n                                    model: .chatGPTTurbo,\n                                    messages: messages,\n                                    functionCall: \"auto\",\n                                    functions: functions\n                                )\n\n                                let chatCompletion = try await openAI.generateChatCompletion(\n                                    parameters: chatParameters\n                                )\n\n                                if let message = chatCompletion.choices[0].message, let functionCall = message.functionCall {\n                                    let jsonString = functionCall.arguments\n                                    if let data = jsonString.data(using: .utf8) {\n                                        do {\n                                            if \n                                                let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],\n                                                let location = json[\"location\"] as? String\n                                            {\n                                                self.weatherInfo = self.getCurrentWeather(location: location)\n                                            }\n                                        } catch {\n                                            print(\"Error parsing JSON: \\(error)\")\n                                        }\n                                    }\n                                }\n                            } catch {\n                                print(\"ERROR DETAILS - \\(error)\")\n                            }\n                        }\n                    } label: {\n                        Text(\"Generate Completion\")\n                            .font(.headline)\n                            .foregroundColor(.white)\n                            .frame(width: 270, height: 50)\n                            .background(.blue)\n                            .clipShape(Capsule())\n                            .padding(.top, 8)\n                    }\n                }\n            }\n        }\n\n        Spacer()\n    }\n}\n\nstruct CreateChatFunctionCallExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            CreateChatFunctionCallExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Completion/CompletionMainView.swift",
    "content": "//\n//  CompletionMainView.swift\n//  iOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\nstruct CompletionMainView: View {\n    var body: some View {\n        List {\n            NavigationLink(destination: GenerateCompletionExample()) {\n                Text(\"Generate Completion Example\")\n            }\n        }\n        .listStyle(.plain)\n        .navigationTitle(\"Completion\")\n    }\n}\n\nstruct CompletionMainView_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            CompletionMainView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Completion/GenerateCompletionExample.swift",
    "content": "//\n//  GenerateCompletionExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct GenerateCompletionExample: View {\n    @State private var responseText: String?\n    @State private var isCompleting: Bool = false\n    \n    let prompt = \"Say this is a test\"\n\n    var body: some View {\n        if isCompleting {\n            VStack {\n                Text(\"Input Prompt: \\(prompt)\")\n\n                if let responseText = self.responseText {\n                    Text(\"Output Text: \\(responseText)\")\n                } else {\n                    Text(\"Output Text: ...\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isCompleting = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(\n                                organizationId: \"INSERT-ORGANIZATION-ID\",\n                                apiKey: \"INSERT-API-KEY\"\n                            )\n                            let openAI = OpenAI(config)\n                            let completionParameter = CompletionParameters(\n                                model: .davinci,\n                                prompt: [prompt],\n                                maxTokens: 20,\n                                temperature: 0.98\n                            )\n                            let completionResponse = try await openAI.generateCompletion(\n                                parameters: completionParameter\n                            )\n\n                            self.responseText = completionResponse\n                                .choices[0]\n                                .text\n                                .replacingOccurrences(of: \"\\n\", with: \"\")\n                        } catch {\n                            print(\"ERROR DETAILS - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Generate Completion\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct GenerateCompletionExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            GenerateCompletionExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Content Policy/ContentPolicyExample.swift",
    "content": "//\n//  ContentPolicyExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct ContentPolicyExample: View {\n    @State private var isFlagged: Bool?\n    @State private var isEvaluating: Bool = false\n    \n    let input = \"I want to kill them.\"\n\n    var body: some View {\n        if isEvaluating {\n            VStack {\n                Text(\"Input Text: \\(input)\")\n\n                if let isFlagged = isFlagged {\n                    Text(\"Flagged: \\(isFlagged ? \"Yes\" : \"No\")\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isEvaluating = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let openAI = OpenAI(Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\"))\n                            let contentParameter = ContentPolicyParameters(input: input)\n                            let contentResult = try await openAI.checkContentPolicy(parameters: contentParameter)\n\n                            self.isFlagged = contentResult.results[0].flagged\n                        } catch {\n                            print(\"CRASHED WITH ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Evaluate Prompt\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct ContentPolicyExample_Preview: PreviewProvider {\n    static var previews: some View {\n        ContentPolicyExample()\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/ContentView.swift",
    "content": "//\n//  ContentView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\nstruct ContentView: View {\n    var body: some View {\n        NavigationStack {\n            List {\n                NavigationLink(destination: ModelMainView()) {\n                    Text(\"Model\")\n                }\n\n                NavigationLink(destination: CompletionMainView()) {\n                    Text(\"Completion\")\n                }\n\n                NavigationLink(destination: ChatMainView()) {\n                    Text(\"Chat\")\n                }\n\n                NavigationLink(destination: ImageMainView()) {\n                    Text(\"Image\")\n                }\n\n                NavigationLink(destination: CreateEmbeddingsExample()) {\n                    Text(\"Embeddings\")\n                }\n\n                NavigationLink(destination: CreateTranscriptionExample()) {\n                    Text(\"Audio\")\n                }\n\n                NavigationLink(destination: FileMainView()) {\n                    Text(\"File\")\n                }\n\n                NavigationLink(destination: ContentPolicyExample()) {\n                    Text(\"Content Policy\")\n                }\n            }\n            .navigationTitle(\"OpenAIKit Examples\")\n            .listStyle(.plain)\n        }\n    }\n}\n\nstruct ContentView_Previews: PreviewProvider {\n    static var previews: some View {\n        ContentView()\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Embeddings/CreateEmbeddingsExample.swift",
    "content": "//\n//  CreateEmbeddingsExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct CreateEmbeddingsExample: View {\n    @State private var embeddingsResponse: EmbeddingsResponse?\n    @State private var isCreatingEmbeds: Bool = false\n    \n    let input: String = \"The food was delicious and the waiter...\"\n\n    var body: some View {\n        if isCreatingEmbeds {\n            VStack {\n                Text(\"Input: \\(input)\")\n                if let embeddingsResponse = self.embeddingsResponse {\n                    Text(\"Object Type: \\(embeddingsResponse.object.rawValue)\")\n                        .padding(.bottom)\n\n                    Text(\"Embeddings Details\").bold().font(.title)\n                    Text(\"Object Type: \\(embeddingsResponse.data[0].object.rawValue)\")\n                    Text(\"First Embedding (See Print For Full Embedding output):\")\n                        .multilineTextAlignment(.center)\n                    Text(\"\\(embeddingsResponse.data[0].embedding[0])\")\n                    Text(\"Index: \\(embeddingsResponse.data[0].index)\")\n\n                    Text(\"Embeddings Usage\").bold().font(.title).padding(.top)\n                    Text(\"Prompt Tokens: \\(embeddingsResponse.usage.promptTokens)\")\n                    Text(\"Total Tokens: \\(embeddingsResponse.usage.totalTokens)\")\n\n                } else {\n                    Text(\"Loading Embeddings...\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isCreatingEmbeds = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\")\n                            let openAI = OpenAI(config)\n                            let embeddingsParam = EmbeddingsParameters(model: \"text-similarity-ada-002\", input: input)\n\n                            self.embeddingsResponse = try await openAI.createEmbeddings(parameters: embeddingsParam)\n\n                            print(\"Embeddings Result: \")\n                            self.embeddingsResponse?.data[0].embedding.forEach { embed in\n                                print(\"\\(embed)\")\n                            }\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Create Embeddings\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct CreateEmbeddingsExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            CreateEmbeddingsExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/DeleteFileExample.swift",
    "content": "//\n//  DeleteFileExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct DeleteFileExample: View {\n    @State private var deleteFileResponse: DeleteObject?\n    @State private var isDeleting: Bool = false\n\n    var body: some View {\n        if isDeleting {\n            VStack {\n                if let deleteFileResponse = deleteFileResponse {\n                    Text(\"File deletion complete!\")\n                    Text(\"ID: \\(deleteFileResponse.id)\")\n                    Text(\"Object: \\(deleteFileResponse.object.rawValue)\")\n                    Text(\"Deleted: \\(String(deleteFileResponse.deleted))\")\n                } else {\n                    Text(\"Deleting file...\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isDeleting = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\")\n                            let openAI = OpenAI(config)\n\n                            self.deleteFileResponse = try await openAI.deleteFile(fileId: \"INSERT-FILE-ID\")\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Delete File\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct DeleteFileExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            DeleteFileExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/File/SampleData.jsonl",
    "content": "{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Fonteia (gens)\\n\\n###\\n\\n\",\"completion\":\" The gens Fonteia was a plebeian family at Rome. END\"}\n{\"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\"}\n{\"prompt\":\"Lewis Seiler\\n\\n###\\n\\n\",\"completion\":\" Lewis Seiler was an American film director. END\"}\n{\"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\"}\n{\"prompt\":\"Port Aransas, Texas\\n\\n###\\n\\n\",\"completion\":\" Port Aransas is a city in Nueces County, Texas, United States. END\"}\n{\"prompt\":\"Bellocq\\n\\n###\\n\\n\",\"completion\":\" Bellocq is a commune of the Pyrénées-Atlantiques department in southwestern France. END\"}\n{\"prompt\":\"List of birds of Sweden\\n\\n###\\n\\n\",\"completion\":\" This is a list of the bird species recorded in Sweden. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Guglielmo Achille Cavellini\\n\\n###\\n\\n\",\"completion\":\" Guglielmo Achille Cavellini, also known as GAC, was an Italian artist and art collector. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Sør Arena\\n\\n###\\n\\n\",\"completion\":\" Sparebanken Sør Arena is a football stadium located at Torsvika in Kristiansand, Norway. END\"}\n{\"prompt\":\"Piatnik\\n\\n###\\n\\n\",\"completion\":\" Wiener Spielkartenfabrik Ferd. END\"}\n{\"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\"}\n{\"prompt\":\"List of beaches\\n\\n###\\n\\n\",\"completion\":\" This is a list of beaches of the world, sorted by country. END\"}\n{\"prompt\":\"Rufous-chinned laughingthrush\\n\\n###\\n\\n\",\"completion\":\" The rufous-chinned laughingthrush is a bird species in the family Leiothrichidae. END\"}\n{\"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\"}\n{\"prompt\":\"Ramtek\\n\\n###\\n\\n\",\"completion\":\" Ramtek is a city and municipal council in Nagpur district of the Maharashtra, India. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Lepotrema acanthochromidis\\n\\n###\\n\\n\",\"completion\":\" Lepotrema acanthochromidis is a species of lepocreadiid digenean parasitic in the intestine of marine fish. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Columbina\\n\\n###\\n\\n\",\"completion\":\" Columbina is a stock character in the Commedia dell'Arte. END\"}\n{\"prompt\":\"Pietro I Orseolo\\n\\n###\\n\\n\",\"completion\":\" Pietro I Orseolo, O.S.B. END\"}\n{\"prompt\":\"Galisteo, Cáceres\\n\\n###\\n\\n\",\"completion\":\" Galisteo is a municipality located in the province of Cáceres, Extremadura, Spain. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Battle of Killdeer Mountain\\n\\n###\\n\\n\",\"completion\":\" The Battle of Killdeer Mountain took place during Brig. END\"}\n{\"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\"}\n{\"prompt\":\"Bradenham, Buckinghamshire\\n\\n###\\n\\n\",\"completion\":\" Bradenham is a village and civil parish within Wycombe district in Buckinghamshire, England. END\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Danny Rozin\\n\\n###\\n\\n\",\"completion\":\" Daniel Rozin is an Israeli-American artist working in the area of interactive digital art. END\"}\n{\"prompt\":\"Frédéric Antonetti\\n\\n###\\n\\n\",\"completion\":\" Frédéric Antonetti is a French professional football manager and former player. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"George Washington Rains\\n\\n###\\n\\n\",\"completion\":\" George Washington Rains was a United States Army and later Confederate States Army officer. END\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Melothria scabra\\n\\n###\\n\\n\",\"completion\":\" Melothria scabra, also known as the cucamelon, is a vine grown for its edible fruit. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Prydain\\n\\n###\\n\\n\",\"completion\":\" Prydain is the modern Welsh name for Great Britain. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Frank D. Thompson\\n\\n###\\n\\n\",\"completion\":\" Frank D. Thompson was a Vermont attorney and judge. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"prompt\":\"Raaberbahn\\n\\n###\\n\\n\",\"completion\":\" The Raaberbahn or GySEV is a Hungarian-Austrian railway company based in Sopron, Hungary. END\"}\n{\"prompt\":\"Paul Judge\\n\\n###\\n\\n\",\"completion\":\" Sir Paul Rupert Judge was an English business and political figure. END\"}\n{\"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\"}\n{\"prompt\":\"Võõpste\\n\\n###\\n\\n\",\"completion\":\" Võõpste is a village in Kastre Parish, Tartu County in eastern Estonia. END\"}\n{\"prompt\":\"Leningrad Oblast\\n\\n###\\n\\n\",\"completion\":\" Leningrad Oblast is a federal subject of Russia. END\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n{\"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\"}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/FileDetailsView.swift",
    "content": "//\n//  FileDetailsView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct FileDetailsView: View {\n    var file: File\n\n    var body: some View {\n        VStack {\n            Text(\"ID: \\(file.id)\")\n            Text(\"Object: \\(file.object.rawValue)\")\n            Text(\"Bytes: \\(file.bytes)\")\n            Text(\"Created At: \\(String(file.createdAt))\")\n            Text(\"Filename: \\(file.filename)\")\n            Text(\"Purpose: \\(file.purpose)\")\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/FileMainView.swift",
    "content": "//\n//  FileMainView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\nstruct FileMainView: View {\n    var body: some View {\n        List {\n            NavigationLink(destination: DeleteFileExample()) {\n                Text(\"Delete File Example\")\n            }\n            \n            NavigationLink(destination: ListFilesExample()) {\n                Text(\"List Files Example\")\n            }\n            \n            NavigationLink(destination: RetrieveFileExample()) {\n                Text(\"Retrieve File Example\")\n            }\n            \n            NavigationLink(destination: RetrieveFileContentsExample()) {\n                Text(\"Retrieve File Contents Example\")\n            }\n            \n            NavigationLink(destination: UploadFileExample()) {\n                Text(\"Upload File Example\")\n            }\n        }\n        .listStyle(.plain)\n        .navigationTitle(\"File\")\n    }\n}\n\nstruct FileMainView_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            FileMainView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/ListFilesExample.swift",
    "content": "//\n//  ListFilesExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct ListFilesExample: View {\n    @State private var files: [File]?\n    @State private var isListing: Bool = false\n\n    var body: some View {\n        if isListing {\n            if let files = files {\n                if files.isEmpty {\n                    Text(\"No files found.\")\n                } else {\n                    List(files) { file in\n                        NavigationLink(file.id) {\n                            FileDetailsView(file: file)\n                        }\n                    }\n                    .padding()\n                }\n            } else {\n                Text(\"Loading files...\")\n            }\n        } else {\n            VStack {\n                Button {\n                    isListing = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\")\n                            let openAI = OpenAI(config)\n                            let filesResponse = try await openAI.listFiles()\n\n                            self.files = filesResponse.data\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"List Files\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct ListFilesExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            ListFilesExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/RetrieveFileContentsExample.swift",
    "content": "//\n//  RetrieveFileContentsExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct RetrieveFileContentsExample: View {\n    @State private var files: [FileContent]?\n    @State private var isRetrieving: Bool = false\n\n    var body: some View {\n        if isRetrieving {\n            VStack {\n                if let files = self.files {\n                    Text(\"Retrieved file!\")\n                    Text(\"Files size: \\(files.count)\")\n                    Text(\"First three indexes (see log for full object): \")\n                    Text(\"\\(files[0].prompt) - \\(files[0].completion)\")\n                    Text(\"\\(files[1].prompt) - \\(files[1].completion)\")\n                    Text(\"\\(files[2].prompt) - \\(files[2].completion)\")\n                } else {\n                    Text(\"Retrieving file...\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isRetrieving = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\")\n                            let openAI = OpenAI(config)\n\n                            self.files = try await openAI.retrieveFileContent(fileId: \"INSERT-FILE-ID\")\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Retrieve File Contents\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct RetrieveFileContentsExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            RetrieveFileContentsExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/RetrieveFileExample.swift",
    "content": "//\n//  RetrieveFileExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct RetrieveFileExample: View {\n    @State private var file: File?\n    @State private var isRetrieving: Bool = false\n    \n    var body: some View {\n        if isRetrieving {\n            VStack {\n                if let file = file {\n                    Text(\"Loading file complete!\")\n                    Text(\"ID: \\(file.id)\")\n                    Text(\"Object: \\(file.object.rawValue)\")\n                    Text(\"Size: \\(file.bytes)\")\n                    Text(\"Created At: \\(String(file.createdAt))\")\n                    Text(\"Filename: \\(file.filename)\")\n                    Text(\"Purpose: \\(file.purpose)\")\n                } else {\n                    Text(\"Loading file...\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isRetrieving = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\")\n                            let openAI = OpenAI(config)\n\n                            self.file = try await openAI.retrieveFile(fileId: \"INSERT-FILE-ID\")\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Retrieve File\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct RetrieveFileExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            RetrieveFileExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/File/UploadFileExample.swift",
    "content": "//\n//  UploadFileExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct UploadFileExample: View {\n    @State private var file: File?\n    @State private var isUploading: Bool = false\n\n    var body: some View {\n        if isUploading {\n            VStack {\n                if let file = file {\n                    Text(\"Upload complete!\")\n                    Text(\"ID: \\(file.id)\")\n                    Text(\"Object: \\(file.object.rawValue)\")\n                    Text(\"Size: \\(file.bytes)\")\n                    Text(\"Created At: \\(String(file.createdAt))\")\n                    Text(\"Filename: \\(file.filename)\")\n                    Text(\"Purpose: \\(file.purpose)\")\n                } else {\n                    Text(\"Uploading file...\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isUploading = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\")\n                            let openAI = OpenAI(config)\n\n                            guard let urlFile = Bundle.main.url(\n                                forResource: \"SampleData\",\n                                withExtension: \"jsonl\"\n                            ) else {\n                                throw OpenAIError.invalidData\n                            }\n                            guard let jsonData = try? Data(contentsOf: urlFile) else { throw OpenAIError.invalidUrl }\n\n                            let uploadFileParam = UploadFileParameters(\n                                file: jsonData,\n                                fileName: \"SampleData.jsonl\",\n                                purpose: \"fine-tune\"\n                            )\n\n                            self.file = try await openAI.uploadFile(parameters: uploadFileParam)\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Upload File\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct UploadFileExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            UploadFileExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/EditImageExample.swift",
    "content": "//\n//  EditImageExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct EditImageExample: View {\n    @State private var image: UIImage = UIImage()\n    @State private var isEditing: Bool = false\n\n    var body: some View {\n        if isEditing {\n            VStack {\n                if image == UIImage() {\n                    Text(\"Loading edit...\")\n                } else {\n                    Image(uiImage: image)\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isEditing = true\n\n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(\n                                organizationId: \"INSERT-ORGANIZATION-ID\",\n                                apiKey: \"INSERT-API-KEY\"\n                            )\n                            let openAI = OpenAI(config)\n\n                            guard let image = UIImage(named: \"image\") else {\n                                throw OpenAIError.invalidData\n                            }\n\n                            guard let mask = UIImage(named: \"mask\") else {\n                                throw OpenAIError.invalidData\n                            }\n\n                            let imageEditParam = try ImageEditParameters(\n                                image: image,\n                                mask: mask,\n                                prompt: \"A cute baby sea otter wearing a beret\",\n                                resolution: .small,\n                                responseFormat: .base64Json\n                            )\n\n                            let imageResponse = try await openAI.generateImageEdits(\n                                parameters: imageEditParam\n                            )\n\n                            self.image = try openAI\n                                .decodeBase64Image(imageResponse.data[0].image)\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Edit Image\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct EditImageExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            EditImageExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/GenerateImageExample.swift",
    "content": "//\n//  GenerateImageExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct GenerateImageExample: View {\n    @State private var image: UIImage = UIImage()\n    @State private var isGenerating: Bool = false\n\n    var body: some View {\n        if isGenerating {\n            VStack {\n                Image(uiImage: image)\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isGenerating = true\n\n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(\n                                organizationId: \"INSERT-ORGANIZATION-ID\",\n                                apiKey: \"INSERT-API-KEY\"\n                            )\n\n                            let openAi = OpenAI(config)\n                            let imageParam = ImageParameters(\n                                prompt: \"an avocado chair\",\n                                resolution: .extraLargePortrait,\n                                quality: .hd,\n                                model: .dalle3,\n                                responseFormat: .base64Json\n                            )\n\n                            let result = try await openAi.createImage(parameters: imageParam)\n                            let b64Image = result.data[0].image\n\n                            self.image = try openAi.decodeBase64Image(b64Image)\n                        } catch {\n                            print(\"ERROR DETAILS - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Generate Image\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct GenerateImageExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            GenerateImageExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/GenerateImageVariationsExample.swift",
    "content": "//\n//  GenerateImageVariationExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct GenerateImageVariationExample: View {\n    @State private var image: UIImage = UIImage()\n    @State private var isGeneratingVariation: Bool = false\n\n    var body: some View {\n        if isGeneratingVariation {\n            VStack {\n                if image == UIImage() {\n                    Text(\"Variation is loading...\")\n                } else {\n                    Image(uiImage: image)\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isGeneratingVariation = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(\n                                organizationId: \"INSERT-ORGANIZATION-ID\",\n                                apiKey: \"INSERT-API-KEY\"\n                            )\n                            let openAI = OpenAI(config)\n\n                            guard let image = UIImage(named: \"variation\") else {\n                                throw OpenAIError.invalidData\n                            }\n\n                            let imageVariationParam = try ImageVariationParameters(\n                                image: image,\n                                resolution: .small,\n                                responseFormat: .base64Json\n                            )\n                            let variationResponse = try await openAI.generateImageVariations(\n                                parameters: imageVariationParam\n                            )\n\n                            self.image = try openAI.decodeBase64Image(\n                                variationResponse.data[0].image\n                            )\n                        } catch {\n                            print(\"ERROR - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Generate Variations\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct GenerateImageVariationExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            GenerateImageVariationExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Image/ImageMainView.swift",
    "content": "//\n//  ImageMainView.swift\n//  iOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\nstruct ImageMainView: View {\n    var body: some View {\n        List {\n            NavigationLink(destination: GenerateImageExample()) {\n                Text(\"Generate Image Example\")\n            }\n            \n            NavigationLink(destination: EditImageExample()) {\n                Text(\"Edit Image Example\")\n            }\n            \n            NavigationLink(destination: GenerateImageVariationExample()) {\n                Text(\"Generate Image Variation Example\")\n            }\n        }\n        .listStyle(.plain)\n        .navigationTitle(\"Image\")\n    }\n}\n\nstruct ImageMainView_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            ImageMainView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Model/ListModelsExample.swift",
    "content": "//\n//  ListModelsExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct ListModelsExample: View {\n    @State private var models = [Model]()\n    @State private var isListing: Bool = false\n\n    var body: some View {\n        if isListing {\n            if !models.isEmpty {\n                List(models) { model in\n                    Text(\"\\(model.id)\")\n                }\n            } else {\n                Text(\"Loading Models...\")\n            }\n        } else {\n            VStack {\n                Button {\n                    isListing = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(\n                                organizationId: \"INSERT-ORGANIZATION-ID\",\n                                apiKey: \"INSERT-API-KEY\"\n                            )\n                            let openAi = OpenAI(config)\n                            let modelsResponse = try await openAi.listModels()\n\n                            self.models = modelsResponse.data\n                        } catch {\n                            print(\"ERROR DETAILS - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"List Models\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct ListModelsExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            ListModelsExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Model/ModelMainView.swift",
    "content": "//\n//  ModelMainView.swift\n//  iOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\nstruct ModelMainView: View {\n    var body: some View {\n        List {\n            NavigationLink(destination: ListModelsExample()) {\n                Text(\"List Models Example\")\n            }\n            \n            NavigationLink(destination: RetrieveModelExample()) {\n                Text(\"Retrieve Model Example\")\n            }\n        }\n        .listStyle(.plain)\n        .navigationTitle(\"Model\")\n    }\n}\n\nstruct ModelMainView_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            ModelMainView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Model/RetrieveModelExample.swift",
    "content": "//\n//  RetrieveModelExample.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct RetrieveModelExample: View {\n    @State private var model: Model?\n    @State private var isRetrieving: Bool = false\n    \n    var body: some View {\n        if isRetrieving {\n            VStack {\n                if let model = model {\n                    Text(\"Model Details\").bold().font(.title)\n                    Text(\"Name: \\(model.id)\")\n                    Text(\"Object: \\(model.object.rawValue)\")\n                    Text(\"Owned By: \\(model.ownedBy)\")\n                } else {\n                    Text(\"Loading Model...\")\n                }\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isRetrieving = true\n                    \n                    Task {\n                        do {\n                            // ⚠️🔑 NEVER store OpenAI API keys directly in code. Use environment variables or secrets management. Avoid git commits of keys! 🔑⚠️\n                            let config = Configuration(organizationId: \"INSERT-ORGANIZATION-ID\", apiKey: \"INSERT-API-KEY\")\n                            let openAI = OpenAI(config)\n\n                            self.model = try await openAI.retrieveModel(modelId: \"text-davinci-001\")\n                        } catch {\n                            print(\"ERROR WITH - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Retrieve Model\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct RetrieveModelExample_Previews: PreviewProvider {\n    static var previews: some View {\n        NavigationStack {\n            RetrieveModelExample()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/Preview Content/Preview Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example/iOS_ExampleApp.swift",
    "content": "//\n//  iOS_ExampleApp.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\n@main\nstruct iOS_ExampleApp: App {\n    var body: some Scene {\n        WindowGroup {\n            ContentView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t761C250429403883005066C2 /* EditImageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C250329403883005066C2 /* EditImageExample.swift */; };\n\t\t761C250B2940392F005066C2 /* GenerateCompletionExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C250A2940392F005066C2 /* GenerateCompletionExample.swift */; };\n\t\t761C250D294039A8005066C2 /* GenerateImageVariationsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C250C294039A8005066C2 /* GenerateImageVariationsExample.swift */; };\n\t\t761C251329403AC7005066C2 /* GenerateImageExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C251229403AC7005066C2 /* GenerateImageExample.swift */; };\n\t\t761C251729403CA0005066C2 /* ListFilesExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C251629403CA0005066C2 /* ListFilesExample.swift */; };\n\t\t761C251B29403CD2005066C2 /* FileDetailsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C251A29403CD2005066C2 /* FileDetailsView.swift */; };\n\t\t761C252429403EDC005066C2 /* ListModelsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252329403EDC005066C2 /* ListModelsExample.swift */; };\n\t\t761C252629403F3F005066C2 /* RetrieveFileContentsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252529403F3F005066C2 /* RetrieveFileContentsExample.swift */; };\n\t\t761C252829403F7D005066C2 /* RetrieveFileExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252729403F7D005066C2 /* RetrieveFileExample.swift */; };\n\t\t761C252C2940400B005066C2 /* RetrieveModelExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C252B2940400B005066C2 /* RetrieveModelExample.swift */; };\n\t\t761C253129404086005066C2 /* SampleData.jsonl in Resources */ = {isa = PBXBuildFile; fileRef = 761C253029404086005066C2 /* SampleData.jsonl */; };\n\t\t761C2533294040A8005066C2 /* UploadFileExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761C2532294040A8005066C2 /* UploadFileExample.swift */; };\n\t\t765BB1D7294049B4000BF124 /* FileMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1D6294049B4000BF124 /* FileMainView.swift */; };\n\t\t765BB1D929404D52000BF124 /* CompletionMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1D829404D52000BF124 /* CompletionMainView.swift */; };\n\t\t765BB1DB29404F7C000BF124 /* ImageMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1DA29404F7C000BF124 /* ImageMainView.swift */; };\n\t\t765BB1DD29405126000BF124 /* ModelMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1DC29405126000BF124 /* ModelMainView.swift */; };\n\t\t765BB20129405723000BF124 /* variation.png in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1FE29405723000BF124 /* variation.png */; };\n\t\t765BB20229405723000BF124 /* mask.png in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1FF29405723000BF124 /* mask.png */; };\n\t\t765BB20329405723000BF124 /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = 765BB20029405723000BF124 /* image.png */; };\n\t\t76C0C254293FB7CC003075D2 /* iOS_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C253293FB7CC003075D2 /* iOS_ExampleApp.swift */; };\n\t\t76C0C256293FB7CC003075D2 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C255293FB7CC003075D2 /* ContentView.swift */; };\n\t\t76C0C258293FB7CE003075D2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 76C0C257293FB7CE003075D2 /* Assets.xcassets */; };\n\t\t76C0C25B293FB7CE003075D2 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 76C0C25A293FB7CE003075D2 /* Preview Assets.xcassets */; };\n\t\t76C0C265293FB8B6003075D2 /* OpenAIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 76C0C264293FB8B6003075D2 /* OpenAIKit */; };\n\t\t76C0C26A293FC8FC003075D2 /* ContentPolicyExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C269293FC8FC003075D2 /* ContentPolicyExample.swift */; };\n\t\t76C0C26D293FC9B5003075D2 /* CreateEmbeddingsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C26C293FC9B5003075D2 /* CreateEmbeddingsExample.swift */; };\n\t\t76C0C274293FDA7B003075D2 /* DeleteFileExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C0C273293FDA7B003075D2 /* DeleteFileExample.swift */; };\n\t\t7D3E2ED72A7F228E0014174B /* CreateChatCompletionStreaming.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3E2ED62A7F228E0014174B /* CreateChatCompletionStreaming.swift */; };\n\t\t7D3E2ED92A7F262A0014174B /* ChatMainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3E2ED82A7F262A0014174B /* ChatMainView.swift */; };\n\t\t7D4A91082A87DE7E000A138A /* AudioPlayerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D4A91072A87DE7E000A138A /* AudioPlayerViewModel.swift */; };\n\t\t7D4A910A2A87E110000A138A /* audio_translation.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 7D4A91092A87E110000A138A /* audio_translation.mp3 */; };\n\t\t7D6C8EB92B689D750049AC43 /* audio.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 7D6C8EB82B689D750049AC43 /* audio.mp3 */; };\n\t\t7D76E4F82AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D76E4F72AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift */; };\n\t\t7DC0E9082A87CF97005C8763 /* CreateTranscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DC0E9072A87CF97005C8763 /* CreateTranscription.swift */; };\n\t\t7DDE422E29AFE567000BBB01 /* CreateChatCompletion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DDE422D29AFE567000BBB01 /* CreateChatCompletion.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t761C250329403883005066C2 /* EditImageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditImageExample.swift; sourceTree = \"<group>\"; };\n\t\t761C250A2940392F005066C2 /* GenerateCompletionExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateCompletionExample.swift; sourceTree = \"<group>\"; };\n\t\t761C250C294039A8005066C2 /* GenerateImageVariationsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateImageVariationsExample.swift; sourceTree = \"<group>\"; };\n\t\t761C251229403AC7005066C2 /* GenerateImageExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateImageExample.swift; sourceTree = \"<group>\"; };\n\t\t761C251629403CA0005066C2 /* ListFilesExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFilesExample.swift; sourceTree = \"<group>\"; };\n\t\t761C251A29403CD2005066C2 /* FileDetailsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileDetailsView.swift; sourceTree = \"<group>\"; };\n\t\t761C252329403EDC005066C2 /* ListModelsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListModelsExample.swift; sourceTree = \"<group>\"; };\n\t\t761C252529403F3F005066C2 /* RetrieveFileContentsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetrieveFileContentsExample.swift; sourceTree = \"<group>\"; };\n\t\t761C252729403F7D005066C2 /* RetrieveFileExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetrieveFileExample.swift; sourceTree = \"<group>\"; };\n\t\t761C252B2940400B005066C2 /* RetrieveModelExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetrieveModelExample.swift; sourceTree = \"<group>\"; };\n\t\t761C253029404086005066C2 /* SampleData.jsonl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SampleData.jsonl; sourceTree = \"<group>\"; };\n\t\t761C2532294040A8005066C2 /* UploadFileExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadFileExample.swift; sourceTree = \"<group>\"; };\n\t\t765BB1D6294049B4000BF124 /* FileMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileMainView.swift; sourceTree = \"<group>\"; };\n\t\t765BB1D829404D52000BF124 /* CompletionMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompletionMainView.swift; sourceTree = \"<group>\"; };\n\t\t765BB1DA29404F7C000BF124 /* ImageMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageMainView.swift; sourceTree = \"<group>\"; };\n\t\t765BB1DC29405126000BF124 /* ModelMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelMainView.swift; sourceTree = \"<group>\"; };\n\t\t765BB1FE29405723000BF124 /* variation.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = variation.png; sourceTree = \"<group>\"; };\n\t\t765BB1FF29405723000BF124 /* mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mask.png; sourceTree = \"<group>\"; };\n\t\t765BB20029405723000BF124 /* image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = image.png; sourceTree = \"<group>\"; };\n\t\t76C0C250293FB7CC003075D2 /* iOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t76C0C253293FB7CC003075D2 /* iOS_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOS_ExampleApp.swift; sourceTree = \"<group>\"; };\n\t\t76C0C255293FB7CC003075D2 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = \"<group>\"; };\n\t\t76C0C257293FB7CE003075D2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t76C0C25A293FB7CE003075D2 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = \"Preview Assets.xcassets\"; sourceTree = \"<group>\"; };\n\t\t76C0C263293FB8B0003075D2 /* OpenAIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAIKit; path = ../..; sourceTree = \"<group>\"; };\n\t\t76C0C269293FC8FC003075D2 /* ContentPolicyExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentPolicyExample.swift; sourceTree = \"<group>\"; };\n\t\t76C0C26C293FC9B5003075D2 /* CreateEmbeddingsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateEmbeddingsExample.swift; sourceTree = \"<group>\"; };\n\t\t76C0C273293FDA7B003075D2 /* DeleteFileExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteFileExample.swift; sourceTree = \"<group>\"; };\n\t\t7D3E2ED62A7F228E0014174B /* CreateChatCompletionStreaming.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateChatCompletionStreaming.swift; sourceTree = \"<group>\"; };\n\t\t7D3E2ED82A7F262A0014174B /* ChatMainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMainView.swift; sourceTree = \"<group>\"; };\n\t\t7D4A91072A87DE7E000A138A /* AudioPlayerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayerViewModel.swift; sourceTree = \"<group>\"; };\n\t\t7D4A91092A87E110000A138A /* audio_translation.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = audio_translation.mp3; sourceTree = \"<group>\"; };\n\t\t7D6C8EB82B689D750049AC43 /* 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>\"; };\n\t\t7D76E4F72AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateChatFunctionCallExample.swift; sourceTree = \"<group>\"; };\n\t\t7DC0E9072A87CF97005C8763 /* CreateTranscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateTranscription.swift; sourceTree = \"<group>\"; };\n\t\t7DDE422D29AFE567000BBB01 /* CreateChatCompletion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateChatCompletion.swift; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t76C0C24D293FB7CC003075D2 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t76C0C265293FB8B6003075D2 /* OpenAIKit in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t761C24FE2940347A005066C2 /* Completion */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t761C250A2940392F005066C2 /* GenerateCompletionExample.swift */,\n\t\t\t\t765BB1D829404D52000BF124 /* CompletionMainView.swift */,\n\t\t\t);\n\t\t\tpath = Completion;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t761C250229403873005066C2 /* Image */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB1FD29405723000BF124 /* Images */,\n\t\t\t\t761C251229403AC7005066C2 /* GenerateImageExample.swift */,\n\t\t\t\t761C250329403883005066C2 /* EditImageExample.swift */,\n\t\t\t\t761C250C294039A8005066C2 /* GenerateImageVariationsExample.swift */,\n\t\t\t\t765BB1DA29404F7C000BF124 /* ImageMainView.swift */,\n\t\t\t);\n\t\t\tpath = Image;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t761C252229403ECF005066C2 /* Model */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t761C252329403EDC005066C2 /* ListModelsExample.swift */,\n\t\t\t\t761C252B2940400B005066C2 /* RetrieveModelExample.swift */,\n\t\t\t\t765BB1DC29405126000BF124 /* ModelMainView.swift */,\n\t\t\t);\n\t\t\tpath = Model;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t761C252F29404086005066C2 /* File */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t761C253029404086005066C2 /* SampleData.jsonl */,\n\t\t\t);\n\t\t\tpath = File;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB1FD29405723000BF124 /* Images */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB1FE29405723000BF124 /* variation.png */,\n\t\t\t\t765BB1FF29405723000BF124 /* mask.png */,\n\t\t\t\t765BB20029405723000BF124 /* image.png */,\n\t\t\t);\n\t\t\tpath = Images;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C247293FB7CC003075D2 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t76C0C252293FB7CC003075D2 /* iOS_Example */,\n\t\t\t\t76C0C251293FB7CC003075D2 /* Products */,\n\t\t\t\t76C0C262293FB8AF003075D2 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C251293FB7CC003075D2 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t76C0C250293FB7CC003075D2 /* iOS_Example.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C252293FB7CC003075D2 /* iOS_Example */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7DC0E9062A87CF6F005C8763 /* Audio */,\n\t\t\t\t7DDE422C29AFE54C000BBB01 /* Chat */,\n\t\t\t\t761C252229403ECF005066C2 /* Model */,\n\t\t\t\t761C250229403873005066C2 /* Image */,\n\t\t\t\t761C24FE2940347A005066C2 /* Completion */,\n\t\t\t\t76C0C26B293FC9A6003075D2 /* Embeddings */,\n\t\t\t\t76C0C272293FDA65003075D2 /* File */,\n\t\t\t\t76C0C268293FC8DF003075D2 /* Content Policy */,\n\t\t\t\t76C0C253293FB7CC003075D2 /* iOS_ExampleApp.swift */,\n\t\t\t\t76C0C255293FB7CC003075D2 /* ContentView.swift */,\n\t\t\t\t76C0C257293FB7CE003075D2 /* Assets.xcassets */,\n\t\t\t\t76C0C259293FB7CE003075D2 /* Preview Content */,\n\t\t\t);\n\t\t\tpath = iOS_Example;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C259293FB7CE003075D2 /* Preview Content */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t76C0C25A293FB7CE003075D2 /* Preview Assets.xcassets */,\n\t\t\t);\n\t\t\tpath = \"Preview Content\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C262293FB8AF003075D2 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t76C0C263293FB8B0003075D2 /* OpenAIKit */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C268293FC8DF003075D2 /* Content Policy */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t76C0C269293FC8FC003075D2 /* ContentPolicyExample.swift */,\n\t\t\t);\n\t\t\tpath = \"Content Policy\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C26B293FC9A6003075D2 /* Embeddings */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t76C0C26C293FC9B5003075D2 /* CreateEmbeddingsExample.swift */,\n\t\t\t);\n\t\t\tpath = Embeddings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t76C0C272293FDA65003075D2 /* File */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t761C252F29404086005066C2 /* File */,\n\t\t\t\t761C251A29403CD2005066C2 /* FileDetailsView.swift */,\n\t\t\t\t76C0C273293FDA7B003075D2 /* DeleteFileExample.swift */,\n\t\t\t\t761C251629403CA0005066C2 /* ListFilesExample.swift */,\n\t\t\t\t761C252529403F3F005066C2 /* RetrieveFileContentsExample.swift */,\n\t\t\t\t761C252729403F7D005066C2 /* RetrieveFileExample.swift */,\n\t\t\t\t761C2532294040A8005066C2 /* UploadFileExample.swift */,\n\t\t\t\t765BB1D6294049B4000BF124 /* FileMainView.swift */,\n\t\t\t);\n\t\t\tpath = File;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7DC0E9062A87CF6F005C8763 /* Audio */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7DC0E90B2A87D04D005C8763 /* Sound */,\n\t\t\t\t7DC0E9072A87CF97005C8763 /* CreateTranscription.swift */,\n\t\t\t\t7D4A91072A87DE7E000A138A /* AudioPlayerViewModel.swift */,\n\t\t\t);\n\t\t\tpath = Audio;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7DC0E90B2A87D04D005C8763 /* Sound */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7D6C8EB82B689D750049AC43 /* audio.mp3 */,\n\t\t\t\t7D4A91092A87E110000A138A /* audio_translation.mp3 */,\n\t\t\t);\n\t\t\tpath = Sound;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7DDE422C29AFE54C000BBB01 /* Chat */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7DDE422D29AFE567000BBB01 /* CreateChatCompletion.swift */,\n\t\t\t\t7D3E2ED62A7F228E0014174B /* CreateChatCompletionStreaming.swift */,\n\t\t\t\t7D3E2ED82A7F262A0014174B /* ChatMainView.swift */,\n\t\t\t\t7D76E4F72AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift */,\n\t\t\t);\n\t\t\tpath = Chat;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t76C0C24F293FB7CC003075D2 /* iOS_Example */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 76C0C25E293FB7CE003075D2 /* Build configuration list for PBXNativeTarget \"iOS_Example\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t76C0C24C293FB7CC003075D2 /* Sources */,\n\t\t\t\t76C0C24D293FB7CC003075D2 /* Frameworks */,\n\t\t\t\t76C0C24E293FB7CC003075D2 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = iOS_Example;\n\t\t\tpackageProductDependencies = (\n\t\t\t\t76C0C264293FB8B6003075D2 /* OpenAIKit */,\n\t\t\t);\n\t\t\tproductName = iOS_Example;\n\t\t\tproductReference = 76C0C250293FB7CC003075D2 /* iOS_Example.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t76C0C248293FB7CC003075D2 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = 1;\n\t\t\t\tLastSwiftUpdateCheck = 1410;\n\t\t\t\tLastUpgradeCheck = 1520;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t76C0C24F293FB7CC003075D2 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 14.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 76C0C24B293FB7CC003075D2 /* Build configuration list for PBXProject \"iOS_Example\" */;\n\t\t\tcompatibilityVersion = \"Xcode 14.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 76C0C247293FB7CC003075D2;\n\t\t\tproductRefGroup = 76C0C251293FB7CC003075D2 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t76C0C24F293FB7CC003075D2 /* iOS_Example */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t76C0C24E293FB7CC003075D2 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t76C0C25B293FB7CE003075D2 /* Preview Assets.xcassets in Resources */,\n\t\t\t\t765BB20229405723000BF124 /* mask.png in Resources */,\n\t\t\t\t765BB20129405723000BF124 /* variation.png in Resources */,\n\t\t\t\t7D6C8EB92B689D750049AC43 /* audio.mp3 in Resources */,\n\t\t\t\t7D4A910A2A87E110000A138A /* audio_translation.mp3 in Resources */,\n\t\t\t\t76C0C258293FB7CE003075D2 /* Assets.xcassets in Resources */,\n\t\t\t\t761C253129404086005066C2 /* SampleData.jsonl in Resources */,\n\t\t\t\t765BB20329405723000BF124 /* image.png in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t76C0C24C293FB7CC003075D2 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t7D3E2ED92A7F262A0014174B /* ChatMainView.swift in Sources */,\n\t\t\t\t76C0C26D293FC9B5003075D2 /* CreateEmbeddingsExample.swift in Sources */,\n\t\t\t\t76C0C274293FDA7B003075D2 /* DeleteFileExample.swift in Sources */,\n\t\t\t\t765BB1DB29404F7C000BF124 /* ImageMainView.swift in Sources */,\n\t\t\t\t761C250D294039A8005066C2 /* GenerateImageVariationsExample.swift in Sources */,\n\t\t\t\t761C252629403F3F005066C2 /* RetrieveFileContentsExample.swift in Sources */,\n\t\t\t\t7D76E4F82AD46B7500E2F4C3 /* CreateChatFunctionCallExample.swift in Sources */,\n\t\t\t\t765BB1DD29405126000BF124 /* ModelMainView.swift in Sources */,\n\t\t\t\t76C0C26A293FC8FC003075D2 /* ContentPolicyExample.swift in Sources */,\n\t\t\t\t765BB1D929404D52000BF124 /* CompletionMainView.swift in Sources */,\n\t\t\t\t76C0C256293FB7CC003075D2 /* ContentView.swift in Sources */,\n\t\t\t\t761C251329403AC7005066C2 /* GenerateImageExample.swift in Sources */,\n\t\t\t\t761C251B29403CD2005066C2 /* FileDetailsView.swift in Sources */,\n\t\t\t\t761C252C2940400B005066C2 /* RetrieveModelExample.swift in Sources */,\n\t\t\t\t761C251729403CA0005066C2 /* ListFilesExample.swift in Sources */,\n\t\t\t\t7DDE422E29AFE567000BBB01 /* CreateChatCompletion.swift in Sources */,\n\t\t\t\t7D3E2ED72A7F228E0014174B /* CreateChatCompletionStreaming.swift in Sources */,\n\t\t\t\t7DC0E9082A87CF97005C8763 /* CreateTranscription.swift in Sources */,\n\t\t\t\t761C252829403F7D005066C2 /* RetrieveFileExample.swift in Sources */,\n\t\t\t\t7D4A91082A87DE7E000A138A /* AudioPlayerViewModel.swift in Sources */,\n\t\t\t\t761C2533294040A8005066C2 /* UploadFileExample.swift in Sources */,\n\t\t\t\t761C252429403EDC005066C2 /* ListModelsExample.swift in Sources */,\n\t\t\t\t76C0C254293FB7CC003075D2 /* iOS_ExampleApp.swift in Sources */,\n\t\t\t\t765BB1D7294049B4000BF124 /* FileMainView.swift in Sources */,\n\t\t\t\t761C250429403883005066C2 /* EditImageExample.swift in Sources */,\n\t\t\t\t761C250B2940392F005066C2 /* GenerateCompletionExample.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t76C0C25C293FB7CE003075D2 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 16.1;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t76C0C25D293FB7CE003075D2 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 16.1;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t76C0C25F293FB7CE003075D2 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"iOS_Example/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;\n\t\t\t\tINFOPLIST_KEY_UILaunchScreen_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations = \"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait\";\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = \"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.MarcoDotIO.iOS-Example\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t76C0C260293FB7CE003075D2 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"iOS_Example/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;\n\t\t\t\tINFOPLIST_KEY_UILaunchScreen_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations = \"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait\";\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = \"UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.MarcoDotIO.iOS-Example\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t76C0C24B293FB7CC003075D2 /* Build configuration list for PBXProject \"iOS_Example\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t76C0C25C293FB7CE003075D2 /* Debug */,\n\t\t\t\t76C0C25D293FB7CE003075D2 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t76C0C25E293FB7CE003075D2 /* Build configuration list for PBXNativeTarget \"iOS_Example\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t76C0C25F293FB7CE003075D2 /* Debug */,\n\t\t\t\t76C0C260293FB7CE003075D2 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\n/* Begin XCSwiftPackageProductDependency section */\n\t\t76C0C264293FB8B6003075D2 /* OpenAIKit */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tproductName = OpenAIKit;\n\t\t};\n/* End XCSwiftPackageProductDependency section */\n\t};\n\trootObject = 76C0C248293FB7CC003075D2 /* Project object */;\n}\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "Examples/iOS_Example/iOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json",
    "content": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"1x\",\n      \"size\" : \"16x16\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"2x\",\n      \"size\" : \"16x16\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"1x\",\n      \"size\" : \"32x32\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"2x\",\n      \"size\" : \"32x32\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"1x\",\n      \"size\" : \"128x128\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"2x\",\n      \"size\" : \"128x128\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"1x\",\n      \"size\" : \"256x256\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"2x\",\n      \"size\" : \"256x256\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"1x\",\n      \"size\" : \"512x512\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"scale\" : \"2x\",\n      \"size\" : \"512x512\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/ContentView.swift",
    "content": "//\n//  ContentView.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct ContentView: View {\n    @State private var image: NSImage = NSImage()\n    @State private var isGenerating: Bool = false\n    \n    var body: some View {\n        if isGenerating {\n            VStack {\n                Image(nsImage: image)\n            }\n            .padding()\n        } else {\n            VStack {\n                Button {\n                    isGenerating = true\n                    \n                    Task {\n                        do {\n                            let config = Configuration(\n                                organization: \"INSERT-ORGANIZATION-ID\",\n                                apiKey: \"INSERT-API-KEY\"\n                            )\n\n                            let openAi = OpenAI(config)\n                            let imageParam = ImageParameters(\n                                prompt: \"an avocado chair\",\n                                resolution: .small,\n                                responseFormat: .base64Json\n                            )\n\n                            let result = try await openAi.createImage(parameters: imageParam)\n                            let b64Image = result.data[0].image\n\n                            self.image = try openAi.decodeBase64Image(b64Image)\n                        } catch {\n                            print(\"ERROR DETAILS - \\(error)\")\n                        }\n                    }\n                } label: {\n                    Text(\"Generate Image\")\n                        .font(.headline)\n                        .foregroundColor(.white)\n                        .frame(width: 270, height: 50)\n                        .background(.blue)\n                        .clipShape(Capsule())\n                        .padding(.top, 8)\n                }\n            }\n        }\n    }\n}\n\nstruct ContentView_Previews: PreviewProvider {\n    static var previews: some View {\n        ContentView()\n    }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/Preview Content/Preview Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/macOS_Example.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n\t<key>com.apple.security.files.user-selected.read-only</key>\n\t<true/>\n\t<key>com.apple.security.network.client</key>\n\t<true/>\n\t<key>com.apple.security.network.server</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example/macOS_ExampleApp.swift",
    "content": "//\n//  macOS_ExampleApp.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\n@main\nstruct macOS_ExampleApp: App {\n    var body: some Scene {\n        WindowGroup {\n            ContentView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t765BB1EB29405298000BF124 /* macOS_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1EA29405298000BF124 /* macOS_ExampleApp.swift */; };\n\t\t765BB1ED29405298000BF124 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB1EC29405298000BF124 /* ContentView.swift */; };\n\t\t765BB1EF29405299000BF124 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1EE29405299000BF124 /* Assets.xcassets */; };\n\t\t765BB1F229405299000BF124 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB1F129405299000BF124 /* Preview Assets.xcassets */; };\n\t\t765BB1FC29405308000BF124 /* OpenAIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 765BB1FB29405308000BF124 /* OpenAIKit */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t765BB1E729405298000BF124 /* macOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t765BB1EA29405298000BF124 /* macOS_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = macOS_ExampleApp.swift; sourceTree = \"<group>\"; };\n\t\t765BB1EC29405298000BF124 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = \"<group>\"; };\n\t\t765BB1EE29405299000BF124 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t765BB1F129405299000BF124 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = \"Preview Assets.xcassets\"; sourceTree = \"<group>\"; };\n\t\t765BB1F329405299000BF124 /* macOS_Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS_Example.entitlements; sourceTree = \"<group>\"; };\n\t\t765BB1FA29405304000BF124 /* OpenAIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAIKit; path = ../..; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t765BB1E429405298000BF124 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB1FC29405308000BF124 /* OpenAIKit in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t765BB1DE29405298000BF124 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB1E929405298000BF124 /* macOS_Example */,\n\t\t\t\t765BB1E829405298000BF124 /* Products */,\n\t\t\t\t765BB1F929405304000BF124 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB1E829405298000BF124 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB1E729405298000BF124 /* macOS_Example.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB1E929405298000BF124 /* macOS_Example */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB1EA29405298000BF124 /* macOS_ExampleApp.swift */,\n\t\t\t\t765BB1EC29405298000BF124 /* ContentView.swift */,\n\t\t\t\t765BB1EE29405299000BF124 /* Assets.xcassets */,\n\t\t\t\t765BB1F329405299000BF124 /* macOS_Example.entitlements */,\n\t\t\t\t765BB1F029405299000BF124 /* Preview Content */,\n\t\t\t);\n\t\t\tpath = macOS_Example;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB1F029405299000BF124 /* Preview Content */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB1F129405299000BF124 /* Preview Assets.xcassets */,\n\t\t\t);\n\t\t\tpath = \"Preview Content\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB1F929405304000BF124 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB1FA29405304000BF124 /* OpenAIKit */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t765BB1E629405298000BF124 /* macOS_Example */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 765BB1F629405299000BF124 /* Build configuration list for PBXNativeTarget \"macOS_Example\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t765BB1E329405298000BF124 /* Sources */,\n\t\t\t\t765BB1E429405298000BF124 /* Frameworks */,\n\t\t\t\t765BB1E529405298000BF124 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = macOS_Example;\n\t\t\tpackageProductDependencies = (\n\t\t\t\t765BB1FB29405308000BF124 /* OpenAIKit */,\n\t\t\t);\n\t\t\tproductName = macOS_Example;\n\t\t\tproductReference = 765BB1E729405298000BF124 /* macOS_Example.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t765BB1DF29405298000BF124 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = 1;\n\t\t\t\tLastSwiftUpdateCheck = 1410;\n\t\t\t\tLastUpgradeCheck = 1410;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t765BB1E629405298000BF124 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 14.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 765BB1E229405298000BF124 /* Build configuration list for PBXProject \"macOS_Example\" */;\n\t\t\tcompatibilityVersion = \"Xcode 14.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 765BB1DE29405298000BF124;\n\t\t\tproductRefGroup = 765BB1E829405298000BF124 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t765BB1E629405298000BF124 /* macOS_Example */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t765BB1E529405298000BF124 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB1F229405299000BF124 /* Preview Assets.xcassets in Resources */,\n\t\t\t\t765BB1EF29405299000BF124 /* Assets.xcassets in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t765BB1E329405298000BF124 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB1ED29405298000BF124 /* ContentView.swift in Sources */,\n\t\t\t\t765BB1EB29405298000BF124 /* macOS_ExampleApp.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t765BB1F429405299000BF124 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t765BB1F529405299000BF124 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t765BB1F729405299000BF124 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = macOS_Example/macOS_Example.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"macOS_Example/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_HARDENED_RUNTIME = YES;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_NSHumanReadableCopyright = \"\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.MarcoDotIO.macOS-Example\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t765BB1F829405299000BF124 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = macOS_Example/macOS_Example.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"macOS_Example/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_HARDENED_RUNTIME = YES;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_NSHumanReadableCopyright = \"\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.MarcoDotIO.macOS-Example\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t765BB1E229405298000BF124 /* Build configuration list for PBXProject \"macOS_Example\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t765BB1F429405299000BF124 /* Debug */,\n\t\t\t\t765BB1F529405299000BF124 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t765BB1F629405299000BF124 /* Build configuration list for PBXNativeTarget \"macOS_Example\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t765BB1F729405299000BF124 /* Debug */,\n\t\t\t\t765BB1F829405299000BF124 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\n/* Begin XCSwiftPackageProductDependency section */\n\t\t765BB1FB29405308000BF124 /* OpenAIKit */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tproductName = OpenAIKit;\n\t\t};\n/* End XCSwiftPackageProductDependency section */\n\t};\n\trootObject = 765BB1DF29405298000BF124 /* Project object */;\n}\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "Examples/macOS_Example/macOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/AccentColor.colorset/Contents.json",
    "content": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\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/Back.imagestacklayer/Content.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    }\n  ],\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/Back.imagestacklayer/Contents.json",
    "content": "{\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",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  },\n  \"layers\" : [\n    {\n      \"filename\" : \"Front.imagestacklayer\"\n    },\n    {\n      \"filename\" : \"Middle.imagestacklayer\"\n    },\n    {\n      \"filename\" : \"Back.imagestacklayer\"\n    }\n  ]\n}\n"
  },
  {
    "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",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    }\n  ],\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/Front.imagestacklayer/Contents.json",
    "content": "{\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",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    }\n  ],\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/Contents.json",
    "content": "{\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",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"2x\"\n    }\n  ],\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/Contents.json",
    "content": "{\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",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  },\n  \"layers\" : [\n    {\n      \"filename\" : \"Front.imagestacklayer\"\n    },\n    {\n      \"filename\" : \"Middle.imagestacklayer\"\n    },\n    {\n      \"filename\" : \"Back.imagestacklayer\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"2x\"\n    }\n  ],\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/Front.imagestacklayer/Contents.json",
    "content": "{\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",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"2x\"\n    }\n  ],\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/Contents.json",
    "content": "{\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",
    "content": "{\n  \"assets\" : [\n    {\n      \"filename\" : \"App Icon - App Store.imagestack\",\n      \"idiom\" : \"tv\",\n      \"role\" : \"primary-app-icon\",\n      \"size\" : \"1280x768\"\n    },\n    {\n      \"filename\" : \"App Icon.imagestack\",\n      \"idiom\" : \"tv\",\n      \"role\" : \"primary-app-icon\",\n      \"size\" : \"400x240\"\n    },\n    {\n      \"filename\" : \"Top Shelf Image Wide.imageset\",\n      \"idiom\" : \"tv\",\n      \"role\" : \"top-shelf-image-wide\",\n      \"size\" : \"2320x720\"\n    },\n    {\n      \"filename\" : \"Top Shelf Image.imageset\",\n      \"idiom\" : \"tv\",\n      \"role\" : \"top-shelf-image\",\n      \"size\" : \"1920x720\"\n    }\n  ],\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/Top Shelf Image Wide.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"2x\"\n    }\n  ],\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/Top Shelf Image.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"tv-marketing\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/ContentView.swift",
    "content": "//\n//  ContentView.swift\n//  tvOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct ContentView: View {\n    @State private var image: UIImage = UIImage()\n    \n    var body: some View {\n        VStack {\n            Image(uiImage: image)\n        }\n        .padding()\n        .task {\n            do {\n                let config = Configuration(\n                    organization: \"INSERT-ORGANIZATION-ID\",\n                    apiKey: \"INSERT-API-KEY\"\n                )\n\n                let openAi = OpenAI(config)\n                let imageParam = ImageParameters(\n                    prompt: \"an avocado chair\",\n                    resolution: .small,\n                    responseFormat: .base64Json\n                )\n\n                let result = try await openAi.createImage(parameters: imageParam)\n                let b64Image = result.data[0].image\n\n                self.image = try openAi.decodeBase64Image(b64Image)\n            } catch {\n                print(\"ERROR DETAILS - \\(error)\")\n            }\n        }\n    }\n}\n\nstruct ContentView_Previews: PreviewProvider {\n    static var previews: some View {\n        ContentView()\n    }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/Preview Content/Preview Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example/tvOS_ExampleApp.swift",
    "content": "//\n//  tvOS_ExampleApp.swift\n//  tvOS_Example\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\n@main\nstruct tvOS_ExampleApp: App {\n    var body: some Scene {\n        WindowGroup {\n            ContentView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t765BB22F2940599A000BF124 /* tvOS_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB22E2940599A000BF124 /* tvOS_ExampleApp.swift */; };\n\t\t765BB2312940599A000BF124 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB2302940599A000BF124 /* ContentView.swift */; };\n\t\t765BB2332940599C000BF124 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB2322940599C000BF124 /* Assets.xcassets */; };\n\t\t765BB2362940599C000BF124 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB2352940599C000BF124 /* Preview Assets.xcassets */; };\n\t\t765BB23F294059DD000BF124 /* OpenAIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 765BB23E294059DD000BF124 /* OpenAIKit */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t765BB22B2940599A000BF124 /* tvOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tvOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t765BB22E2940599A000BF124 /* tvOS_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = tvOS_ExampleApp.swift; sourceTree = \"<group>\"; };\n\t\t765BB2302940599A000BF124 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = \"<group>\"; };\n\t\t765BB2322940599C000BF124 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t765BB2352940599C000BF124 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = \"Preview Assets.xcassets\"; sourceTree = \"<group>\"; };\n\t\t765BB23D294059D9000BF124 /* OpenAIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAIKit; path = ../..; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t765BB2282940599A000BF124 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB23F294059DD000BF124 /* OpenAIKit in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t765BB2222940599A000BF124 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB22D2940599A000BF124 /* tvOS_Example */,\n\t\t\t\t765BB22C2940599A000BF124 /* Products */,\n\t\t\t\t765BB23C294059D9000BF124 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB22C2940599A000BF124 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB22B2940599A000BF124 /* tvOS_Example.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB22D2940599A000BF124 /* tvOS_Example */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB22E2940599A000BF124 /* tvOS_ExampleApp.swift */,\n\t\t\t\t765BB2302940599A000BF124 /* ContentView.swift */,\n\t\t\t\t765BB2322940599C000BF124 /* Assets.xcassets */,\n\t\t\t\t765BB2342940599C000BF124 /* Preview Content */,\n\t\t\t);\n\t\t\tpath = tvOS_Example;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB2342940599C000BF124 /* Preview Content */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB2352940599C000BF124 /* Preview Assets.xcassets */,\n\t\t\t);\n\t\t\tpath = \"Preview Content\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB23C294059D9000BF124 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB23D294059D9000BF124 /* OpenAIKit */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t765BB22A2940599A000BF124 /* tvOS_Example */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 765BB2392940599C000BF124 /* Build configuration list for PBXNativeTarget \"tvOS_Example\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t765BB2272940599A000BF124 /* Sources */,\n\t\t\t\t765BB2282940599A000BF124 /* Frameworks */,\n\t\t\t\t765BB2292940599A000BF124 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = tvOS_Example;\n\t\t\tpackageProductDependencies = (\n\t\t\t\t765BB23E294059DD000BF124 /* OpenAIKit */,\n\t\t\t);\n\t\t\tproductName = tvOS_Example;\n\t\t\tproductReference = 765BB22B2940599A000BF124 /* tvOS_Example.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t765BB2232940599A000BF124 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = 1;\n\t\t\t\tLastSwiftUpdateCheck = 1410;\n\t\t\t\tLastUpgradeCheck = 1410;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t765BB22A2940599A000BF124 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 14.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 765BB2262940599A000BF124 /* Build configuration list for PBXProject \"tvOS_Example\" */;\n\t\t\tcompatibilityVersion = \"Xcode 14.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 765BB2222940599A000BF124;\n\t\t\tproductRefGroup = 765BB22C2940599A000BF124 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t765BB22A2940599A000BF124 /* tvOS_Example */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t765BB2292940599A000BF124 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB2362940599C000BF124 /* Preview Assets.xcassets in Resources */,\n\t\t\t\t765BB2332940599C000BF124 /* Assets.xcassets in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t765BB2272940599A000BF124 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB2312940599A000BF124 /* ContentView.swift in Sources */,\n\t\t\t\t765BB22F2940599A000BF124 /* tvOS_ExampleApp.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t765BB2372940599C000BF124 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = appletvos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tTVOS_DEPLOYMENT_TARGET = 16.1;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t765BB2382940599C000BF124 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = appletvos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tTVOS_DEPLOYMENT_TARGET = 16.1;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t765BB23A2940599C000BF124 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = \"App Icon & Top Shelf Image\";\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"tvOS_Example/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_UILaunchScreen_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UIUserInterfaceStyle = Automatic;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.MarcoDotIO.tvOS-Example\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 3;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t765BB23B2940599C000BF124 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = \"App Icon & Top Shelf Image\";\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"tvOS_Example/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_UILaunchScreen_Generation = YES;\n\t\t\t\tINFOPLIST_KEY_UIUserInterfaceStyle = Automatic;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.MarcoDotIO.tvOS-Example\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 3;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t765BB2262940599A000BF124 /* Build configuration list for PBXProject \"tvOS_Example\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t765BB2372940599C000BF124 /* Debug */,\n\t\t\t\t765BB2382940599C000BF124 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t765BB2392940599C000BF124 /* Build configuration list for PBXNativeTarget \"tvOS_Example\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t765BB23A2940599C000BF124 /* Debug */,\n\t\t\t\t765BB23B2940599C000BF124 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\n/* Begin XCSwiftPackageProductDependency section */\n\t\t765BB23E294059DD000BF124 /* OpenAIKit */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tproductName = OpenAIKit;\n\t\t};\n/* End XCSwiftPackageProductDependency section */\n\t};\n\trootObject = 765BB2232940599A000BF124 /* Project object */;\n}\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "Examples/tvOS_Example/tvOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Assets.xcassets/AccentColor.colorset/Contents.json",
    "content": "{\n  \"colors\" : [\n    {\n      \"idiom\" : \"universal\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"platform\" : \"watchos\",\n      \"size\" : \"1024x1024\"\n    }\n  ],\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/ContentView.swift",
    "content": "//\n//  ContentView.swift\n//  watchOS_Example Watch App\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\nimport OpenAIKit\n\nstruct ContentView: View {\n    @State private var image: UIImage = UIImage()\n    \n    var body: some View {\n        VStack {\n            Image(uiImage: image)\n        }\n        .padding()\n        .task {\n            do {\n                let config = Configuration(\n                    organization: \"INSERT-ORGANIZATION-ID\",\n                    apiKey: \"INSERT-API-KEY\"\n                )\n\n                let openAi = OpenAI(config)\n                let imageParam = ImageParameters(\n                    prompt: \"an avocado chair\",\n                    resolution: .small,\n                    responseFormat: .base64Json\n                )\n\n                let result = try await openAi.createImage(parameters: imageParam)\n                let b64Image = result.data[0].image\n\n                self.image = try openAi.decodeBase64Image(b64Image)\n            } catch {\n                print(\"ERROR DETAILS - \\(error)\")\n            }\n        }\n    }\n}\n\nstruct ContentView_Previews: PreviewProvider {\n    static var previews: some View {\n        ContentView()\n    }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/Preview Content/Preview Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example Watch App/watchOS_ExampleApp.swift",
    "content": "//\n//  watchOS_ExampleApp.swift\n//  watchOS_Example Watch App\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport SwiftUI\n\n@main\nstruct watchOS_Example_Watch_AppApp: App {\n    var body: some Scene {\n        WindowGroup {\n            ContentView()\n        }\n    }\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 56;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t765BB21129405873000BF124 /* watchOS_ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB21029405873000BF124 /* watchOS_ExampleApp.swift */; };\n\t\t765BB21329405873000BF124 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765BB21229405873000BF124 /* ContentView.swift */; };\n\t\t765BB21529405874000BF124 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB21429405874000BF124 /* Assets.xcassets */; };\n\t\t765BB21829405874000BF124 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 765BB21729405874000BF124 /* Preview Assets.xcassets */; };\n\t\t765BB2212940589A000BF124 /* OpenAIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 765BB2202940589A000BF124 /* OpenAIKit */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t765BB20D29405873000BF124 /* watchOS_Example Watch App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"watchOS_Example Watch App.app\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t765BB21029405873000BF124 /* watchOS_ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = watchOS_ExampleApp.swift; sourceTree = \"<group>\"; };\n\t\t765BB21229405873000BF124 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = \"<group>\"; };\n\t\t765BB21429405874000BF124 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t765BB21729405874000BF124 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = \"Preview Assets.xcassets\"; sourceTree = \"<group>\"; };\n\t\t765BB21F29405896000BF124 /* OpenAIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenAIKit; path = ../..; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t765BB20A29405873000BF124 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB2212940589A000BF124 /* OpenAIKit in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t765BB20429405873000BF124 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB20F29405873000BF124 /* watchOS_Example Watch App */,\n\t\t\t\t765BB20E29405873000BF124 /* Products */,\n\t\t\t\t765BB21E29405896000BF124 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB20E29405873000BF124 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB20D29405873000BF124 /* watchOS_Example Watch App.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB20F29405873000BF124 /* watchOS_Example Watch App */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB21029405873000BF124 /* watchOS_ExampleApp.swift */,\n\t\t\t\t765BB21229405873000BF124 /* ContentView.swift */,\n\t\t\t\t765BB21429405874000BF124 /* Assets.xcassets */,\n\t\t\t\t765BB21629405874000BF124 /* Preview Content */,\n\t\t\t);\n\t\t\tpath = \"watchOS_Example Watch App\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB21629405874000BF124 /* Preview Content */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB21729405874000BF124 /* Preview Assets.xcassets */,\n\t\t\t);\n\t\t\tpath = \"Preview Content\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t765BB21E29405896000BF124 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t765BB21F29405896000BF124 /* OpenAIKit */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t765BB20C29405873000BF124 /* watchOS_Example Watch App */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 765BB21B29405874000BF124 /* Build configuration list for PBXNativeTarget \"watchOS_Example Watch App\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t765BB20929405873000BF124 /* Sources */,\n\t\t\t\t765BB20A29405873000BF124 /* Frameworks */,\n\t\t\t\t765BB20B29405873000BF124 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = \"watchOS_Example Watch App\";\n\t\t\tpackageProductDependencies = (\n\t\t\t\t765BB2202940589A000BF124 /* OpenAIKit */,\n\t\t\t);\n\t\t\tproductName = \"watchOS_Example Watch App\";\n\t\t\tproductReference = 765BB20D29405873000BF124 /* watchOS_Example Watch App.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t765BB20529405873000BF124 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = 1;\n\t\t\t\tLastSwiftUpdateCheck = 1410;\n\t\t\t\tLastUpgradeCheck = 1410;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t765BB20C29405873000BF124 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 14.1;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 765BB20829405873000BF124 /* Build configuration list for PBXProject \"watchOS_Example\" */;\n\t\t\tcompatibilityVersion = \"Xcode 14.0\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 765BB20429405873000BF124;\n\t\t\tproductRefGroup = 765BB20E29405873000BF124 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t765BB20C29405873000BF124 /* watchOS_Example Watch App */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t765BB20B29405873000BF124 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB21829405874000BF124 /* Preview Assets.xcassets in Resources */,\n\t\t\t\t765BB21529405874000BF124 /* Assets.xcassets in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t765BB20929405873000BF124 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t765BB21329405873000BF124 /* ContentView.swift in Sources */,\n\t\t\t\t765BB21129405873000BF124 /* watchOS_ExampleApp.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t765BB21929405874000BF124 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t765BB21A29405874000BF124 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++20\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t765BB21C29405874000BF124 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"watchOS_Example Watch App/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_CFBundleDisplayName = watchOS_Example;\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations = \"UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown\";\n\t\t\t\tINFOPLIST_KEY_WKCompanionAppBundleIdentifier = \"\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = .watchkitapp;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSDKROOT = watchos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 4;\n\t\t\t\tWATCHOS_DEPLOYMENT_TARGET = 9.1;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t765BB21D29405874000BF124 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEVELOPMENT_ASSET_PATHS = \"\\\"watchOS_Example Watch App/Preview Content\\\"\";\n\t\t\t\tDEVELOPMENT_TEAM = 8GNE6ML5WX;\n\t\t\t\tENABLE_PREVIEWS = YES;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tINFOPLIST_KEY_CFBundleDisplayName = watchOS_Example;\n\t\t\t\tINFOPLIST_KEY_UISupportedInterfaceOrientations = \"UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown\";\n\t\t\t\tINFOPLIST_KEY_WKCompanionAppBundleIdentifier = \"\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = .watchkitapp;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSDKROOT = watchos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_EMIT_LOC_STRINGS = YES;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 4;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t\tWATCHOS_DEPLOYMENT_TARGET = 9.1;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t765BB20829405873000BF124 /* Build configuration list for PBXProject \"watchOS_Example\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t765BB21929405874000BF124 /* Debug */,\n\t\t\t\t765BB21A29405874000BF124 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t765BB21B29405874000BF124 /* Build configuration list for PBXNativeTarget \"watchOS_Example Watch App\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t765BB21C29405874000BF124 /* Debug */,\n\t\t\t\t765BB21D29405874000BF124 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\n/* Begin XCSwiftPackageProductDependency section */\n\t\t765BB2202940589A000BF124 /* OpenAIKit */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tproductName = OpenAIKit;\n\t\t};\n/* End XCSwiftPackageProductDependency section */\n\t};\n\trootObject = 765BB20529405873000BF124 /* Project object */;\n}\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "Examples/watchOS_Example/watchOS_Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) OpenDive 2023\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "Package.swift",
    "content": "//  swift-tools-version: 6.2\n//\n//  Package.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"OpenAIKit\",\n    platforms: [.iOS(.v13), .macOS(.v10_15), .watchOS(.v6), .tvOS(.v13)],\n    products: [\n        .library(\n            name: \"OpenAIKit\",\n            targets: [\"OpenAIKit\"])\n    ],\n    dependencies: [\n    ],\n    targets: [\n        .target(\n            name: \"OpenAIKit\",\n            dependencies: [],\n            path: \"Sources\",\n            swiftSettings: [\n                .swiftLanguageMode(.v6)\n            ]\n        ),\n        .testTarget(\n            name: \"OpenAIKitTests\",\n            dependencies: [\"OpenAIKit\"],\n            path: \"Tests\",\n            resources: [.process(\"Resources\")],\n            swiftSettings: [\n                .swiftLanguageMode(.v6)\n            ]\n        )\n    ],\n    swiftLanguageVersions: [.v6]\n)\n"
  },
  {
    "path": "Package@swift-5.5.swift",
    "content": "//  swift-tools-version: 5.5\n//\n//  Package@swift-5.5.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport PackageDescription\n\nlet package = Package(\n    name: \"OpenAIKit\",\n    platforms: [.iOS(.v13), .macOS(.v10_15), .watchOS(.v6), .tvOS(.v13)],\n    products: [\n        .library(\n            name: \"OpenAIKit\",\n            targets: [\"OpenAIKit\"])\n    ],\n    dependencies: [\n    ],\n    targets: [\n        .target(\n            name: \"OpenAIKit\",\n            dependencies: [],\n            path: \"Sources\"\n        ),\n        .testTarget(\n            name: \"OpenAIKitTests\",\n            dependencies: [\"OpenAIKit\"],\n            path: \"Tests\",\n            resources: [.process(\"Resources\")]\n        )\n    ],\n    swiftLanguageVersions: [.v5]\n)\n"
  },
  {
    "path": "Package@swift-5.6.swift",
    "content": "//  swift-tools-version: 5.6\n//\n//  Package@swift-5.6.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"OpenAIKit\",\n    platforms: [.iOS(.v13), .macOS(.v10_15), .watchOS(.v6), .tvOS(.v13)],\n    products: [\n        .library(\n            name: \"OpenAIKit\",\n            targets: [\"OpenAIKit\"])\n    ],\n    dependencies: [\n    ],\n    targets: [\n        .target(\n            name: \"OpenAIKit\",\n            dependencies: [],\n            path: \"Sources\"\n        ),\n        .testTarget(\n            name: \"OpenAIKitTests\",\n            dependencies: [\"OpenAIKit\"],\n            path: \"Tests\",\n            resources: [.process(\"Resources\")]\n        )\n    ],\n    swiftLanguageVersions: [.v5]\n)\n"
  },
  {
    "path": "Package@swift-5.7.swift",
    "content": "//  swift-tools-version: 5.7\n//\n//  Package@swift-5.7.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"OpenAIKit\",\n    platforms: [.iOS(.v13), .macOS(.v10_15), .watchOS(.v6), .tvOS(.v13)],\n    products: [\n        .library(\n            name: \"OpenAIKit\",\n            targets: [\"OpenAIKit\"])\n    ],\n    dependencies: [\n    ],\n    targets: [\n        .target(\n            name: \"OpenAIKit\",\n            dependencies: [],\n            path: \"Sources\"\n        ),\n        .testTarget(\n            name: \"OpenAIKitTests\",\n            dependencies: [\"OpenAIKit\"],\n            path: \"Tests\",\n            resources: [.process(\"Resources\")]\n        )\n    ],\n    swiftLanguageVersions: [.v5]\n)\n"
  },
  {
    "path": "Package@swift-5.8.swift",
    "content": "//  swift-tools-version: 5.8\n//\n//  Package@swift-5.8.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"OpenAIKit\",\n    platforms: [.iOS(.v13), .macOS(.v10_15), .watchOS(.v6), .tvOS(.v13)],\n    products: [\n        .library(\n            name: \"OpenAIKit\",\n            targets: [\"OpenAIKit\"])\n    ],\n    dependencies: [\n    ],\n    targets: [\n        .target(\n            name: \"OpenAIKit\",\n            dependencies: [],\n            path: \"Sources\"\n        ),\n        .testTarget(\n            name: \"OpenAIKitTests\",\n            dependencies: [\"OpenAIKit\"],\n            path: \"Tests\",\n            resources: [.process(\"Resources\")]\n        )\n    ],\n    swiftLanguageVersions: [.v5]\n)\n"
  },
  {
    "path": "README.md",
    "content": "[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOpenDive%2FOpenAIKit%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/OpenDive/OpenAIKit)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOpenDive%2FOpenAIKit%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/OpenDive/OpenAIKit)\n[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)\n[![Swift](https://github.com/OpenDive/OpenAIKit/actions/workflows/swift.yml/badge.svg?branch=main)](https://github.com/OpenDive/OpenAIKit/actions/workflows/swift.yml)\n[![Twitter](https://img.shields.io/static/v1?label=Twitter&message=@OpenDiveHQ&color=ca333b)](https://twitter.com/OpenDiveHQ)\n\n<div align=\"center\">\n  <a href=\"https://github.com/OpenDive/OpenAIKit\">\n     <img src=\"Resources/Logo.png\" alt=\"OpenAIKit Logo\" width=\"80\" height=\"80\">\n  </a>\n  <h3 align=\"center\">OpenAIKit</h3>\n  <p align=\"center\">\n  A community-maintained Swift SDK for the OpenAI API.\n  <br />\n  <br />\n     <a href=\"https://github.com/OpenDive/OpenAIKit/issues\">Report Bug</a>\n  ·\n     <a href=\"https://github.com/OpenDive/OpenAIKit/issues\">Request Feature</a>\n </p>\n</div>\n\n\n## Table of Contents\n\n- [About the Project](#about-the-project)\n  - [Motivation](#motivation)\n  - [Our Vision](#our-vision)\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n  - [Swift Package Manager](#swift-package-manager)\n    - [SPM Through Xcode Project](#spm-through-xcode-project)\n    - [SPM Through Xcode Package](#spm-through-xcode-package)\n- [Using OpenAIKit](#using-openaikit)\n  - [Obtaining API Keys](#obtaining-api-keys)\n  - [Image](#image)\n  - [Chat](#chat)\n  - [Audio](#audio)\n  - [Utilities](#utilities)\n    - [Embeddings](#embeddings)\n    - [Models](#models)\n  - [Completion](#completion)\n  - [Migration From 2.x to 3.x](#migration-from-2.x-to-3.x)\n  - [Migration From 1.x to 2.x](#migration-from-1.x-to-2.x)\n- [Example Projects](#example-projects)\n- [Development and Testing](#development-and-testing)\n- [License](#license)\n\n## About the Project\n\n**OpenAIKit** is a community-driven Swift SDK designed to provide Swift developers with a seamless, efficient, and Swifty way to interact with the OpenAI REST endpoint. Our aim is to lower the barrier for Swift developers, enabling them to integrate the power of OpenAI into their apps without delving deep into the intricacies of RESTful services.\n\n### Motivation\n\nWith the increasing demand for AI-powered features in modern applications, it's crucial for developers to have access to tools that simplify the integration process. While OpenAI offers an incredible suite of capabilities, there was a clear need for a dedicated Swift SDK that aligns with the idiomatic practices of the language and the expectations of the Swift developer community.\n\n### Our Vision\n\nWe envisioned a tool that not only provides raw access to OpenAI functionalities but also enhances the developer experience with a clear and intuitive API. Our ultimate goal is to foster innovation by providing the Swift community with the right tools to integrate AI capabilities into their applications effortlessly.\n\n## Features\n\n- [x] Generate new, edited, and variations of images using Dall-E 2 (with Dall-E 3 coming soon).\n- [x] Generate edits and completions using GPT-3 and GPT-4.\n- [x] List avaiable models for use with GPT-3 and GPT-4.\n- [x] Retrieve embeddings for GPT-3 and GPT-4 prompts.\n- [x] Stream data for GPT-3 and GPT-4 completions.\n- [x] Generate Chat responses using ChatGPT.\n- [x] View and Upload training files.\n- [x] View whether a prompt is flagged by the Moderations endpoint or not.\n- [x] Comprehensive Unit and Integration Test coverage.\n- [x] Swift Concurrency compatibility back to iOS 13, macOS 10.15, tvOS 13, watchOS 6, and visionOS 1.0.\n- [x] Complete documentation of OpenAIKit.\n\n## Requirements\n\n| Platform                                                     | Minimum Swift Version | Installation                                    | Status       |\n| ------------------------------------------------------------ | --------------------- | ----------------------------------------------- | ------------ |\n| iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+ / visionOS 1.0+ | 6.2                   | [Swift Package Manager](#swift-package-manager) | Fully Tested |\n\n## Installation\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) allows for developers to easily integrate packages into their Xcode projects and packages; and is also fully integrated into the `swift` compiler.\n\n#### SPM Through XCode Project\n\n* File > Swift Packages > Add Package Dependency\n* Add `https://github.com/OpenDive/OpenAIKit.git`\n* Select \"Up to next Major\" with \"3.0.0\"\n\n#### SPM Through Xcode Package\n\nOnce you have your Swift package set up, add the Git link within the `dependencies` value of your `Package.swift` file.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/OpenDive/OpenAIKit.git\", .upToNextMajor(from: \"3.0.0\"))\n]\n```\n\n## Using OpenAIKit\n\n### Obtaining API Keys\n\nTo obtain an API Key, go to your `API Keys` page on your account page [here](https://platform.openai.com/account/api-keys).\n\n<img src=\"Resources/APIKeysPage.png\" alt=\"API Keys Page\">\n\n> ## ⚠️ 🔑 **Important: Do Not Store OpenAI API Keys Directly in Code!** 🔑⚠️\n>\n> When working with OpenAI's API, it's essential for security reasons not to embed your API keys directly within the codebase of your application. Embedding keys directly in your source code can expose them to unauthorized users and malicious actors, leading to potential misuse.\n>\n> **Best Practices:**\n>\n> 1. **Environment Variables:** Store your API keys in environment variables and access them in your code. This way, they aren't hard-coded into your application and can be managed securely.\n> 2. **Secrets Management:** Use a secure secrets management tool or service to store and retrieve your API keys. Tools like AWS Secrets Manager, HashiCorp Vault, Firebase, CloudKit, or Azure Key Vault are designed to store, manage, and retrieve sensitive data. This way, the user does not have on-device access to the keys.\n> 3. **.gitignore:** If you store your API keys in a configuration file, always ensure that this file is added to `.gitignore` or a similar mechanism to prevent it from being accidentally committed to a source control system.\n> 4. **Regularly Rotate Keys:** Rotate your API keys periodically to mitigate the potential impact of a leak.\n>\n> Remember, security is of utmost importance. Always prioritize the safe handling of sensitive information like API keys!\n>\n> For more information, check out [this article](https://nshipster.com/secrets/) all about API key management for Swift developers.\n\n\n### Image\n\nDive into the next evolution of AI-powered image generation with DALL-E 2 (and coming soon, DALL-E 3), brought to you by OpenAI. Building upon the legacy of its predecessor, DALL-E 2 offers enhanced capabilities to materialize intricate visuals from textual prompts, creating a seamless bridge between language and imagery. Developers can harness this groundbreaking technology to enrich user experiences, craft dynamic content, and inspire new avenues of creativity. Revolutionize your applications and projects by integrating the cutting-edge power of DALL-E 2.\n\nThere are three endpoints provided by OpenAI to interact with DALL-E 2:\n    - `createImage` is the main endpoint that allows direct image generation from a text prompt. Here's an example on how to use the endpoint, along with the correlating output:\n\n```swift\ndo {\n    let imageParam = ImageParameters(\n        // A text description of the desired image(s).\n        prompt: \"An armchair in the shape of an avocado\",\n        // The size of the generated images.\n        resolution: .large,\n        // The format in which the generated images are returned.\n        responseFormat: .base64Json\n    )\n    let result = try await openAi.createImage(\n        parameters: imageParam\n    )\n    let b64Image = result.data[0].image\n    let image = try openAi.decodeBase64Image(b64Image)\n} catch {\n    // Insert your own error handling method here.\n}\n```\n<img src=\"Resources/AvocadoChair.png\" alt=\"Avocado Chair\" width=\"1024\" height=\"1024\">\n​\t\n​    - `createImageEdit` allows the developer to create edits based on the original image inputted, along with a transparent-enabled image, with the transparent portions being the areas to edit in; and a prompt of the original image with the edit the developer wants. Here's an example on how to use the endpoint, along with the correlating output:\n\n```swift\ndo {\n    let imageEditParam = try ImageEditParameters(\n        // The image to edit.\n        image: image,\n        // An additional image whose fully transparent areas indicate where image should be edited.\n        mask: mask,\n        // A text description of the desired image(s).\n        prompt: \"The Mona Lisa wearing a beret, in the style of Leonardo DaVinci\",\n        // The size of the generated images.\n        resolution: .large,\n        // The format in which the generated images are returned.\n        responseFormat: .base64Json\n    )\n\n    let imageResponse = try await openAI.generateImageEdits(\n        parameters: imageEditParam\n    )\n\n    let image = try openAI.decodeBase64Image(imageResponse.data[0].image)\n} catch {\n    // Insert your own error handling method here.\n}\n```\n| ![Original](Resources/OriginalMonaLisa.png) | ![Mask](Resources/MonaLisaMask.png) | ![Edit](Resources/MonaLisaBeret.png) |\n|-----------------------|---------------------------|---------------------------------|\n| **Original** | **Mask** | **Edit** |   \n\n​\t- `createImageVariation` allows the developer to create variations of a given input image. Here's an example on how to use the endpoint, along with the correlating output:\n```swift\ndo {\n    let imageVariationParam = try ImageVariationParameters(\n        // The image to use as the basis for the variation(s).\n        image: image,\n        // The size of the generated images.\n        resolution: .large,\n        // The format in which the generated images are returned.\n        responseFormat: .base64Json\n    )\n\n    let variationResponse = try await openAI.generateImageVariations(\n        parameters: imageVariationParam\n    )\n\n    self.image = try openAI.decodeBase64Image(\n        variationResponse.data[0].image\n    )\n} catch {\n    // Insert your own error handling method here.\n}\n```\n| ![Original](Resources/OriginalWave.png) | ![Variation](Resources/WaveVariation.png) |\n|-----------------------|---------------------------------|\n| **Original** | **Variation** |   \n\n### Chat\n\nChatGPT, built on OpenAI's GPT-4 architecture, is a cutting-edge conversational AI model. It provides developers with a robust tool for integrating advanced natural language processing capabilities into applications. Using ChatGPT can enhance user interactions, improve efficiency, and offer AI-driven solutions in various use cases. Incorporate GPT-4's strength into your projects for tangible results.\n\nThere is a single endpoint for this feature, however, this SDK splits the endpoint into two functions with three separate features in total:\n    - `generateChatCompletion` allows the developer to generate chat completions using the provided models from OpenAI; or the developer's owned fine tuned models. Here's an example on how to use the endpoint, along with the correlating output:\n```swift\ndo {\n    let chat: [ChatMessage] = [\n        ChatMessage(role: .system, content: \"You are a helpful assistant.\"),\n        ChatMessage(role: .user, content: \"Who won the world series in 2020?\"),\n        ChatMessage(role: .assistant, content: \"The Los Angeles Dodgers won the World Series in 2020.\"),\n        ChatMessage(role: .user, content: \"Where was it played?\")\n    ]\n\n    let chatParameters = ChatParameters(\n        model: .gpt4,  // ID of the model to use.\n        messages: chat  // A list of messages comprising the conversation so far.\n    )\n\n    let chatCompletion = try await openAI.generateChatCompletion(\n        parameters: chatParameters\n    )\n\n    if let message = chatCompletion.choices[0].message {\n        let content = message.content\n    }\n} catch {\n    // Insert your own error handling method here.\n}\n```\n```\nChatResponse(\n    id: \"chatcmpl-88eG5VruffcNHPNVGBKGVAV5HGk4j\", \n    object: OpenAIKit.OpenAIObject.chatCompletion, \n    created: 1697072069, \n    choices: [\n        OpenAIKit.ChatChoice(\n            message: Optional(\n                OpenAIKit.ChatMessage(\n                    id: \"250FDA2D-2F38-4E6F-B97E-DAD74FED1FB6\", \n                    role: OpenAIKit.ChatRole.assistant, \n                    content: Optional(\n                        \"The 2020 World Series was played at Globe Life Field in Arlington, Texas.\"\n                    ), \n                    functionCall: nil\n                )\n            ), \n            delta: nil, \n            index: 0, \n            logprobs: nil, \n            finishReason: Optional(\"stop\")\n        )\n    ], \n    usage: Optional(\n        OpenAIKit.Usage(\n            promptTokens: 53, \n            completionTokens: 17, \n            totalTokens: 70\n        )\n    )\n)\n```\nThe developer is also able to use function calls to execute various functions (i.e., fetching weather info, uploading files, etc). Here's an example on how to use the parameter, the corresponding response, and example usage with a local function.\n```swift\ndo {\n    let functions: [Function] = [\n        Function(\n            name: \"getCurrentWeather\",\n            description: \"Get the current weather in a given location\",\n            parameters: Parameters(\n                type: \"object\",\n                properties: [\n                    \"location\": ParameterDetail(\n                        type: \"string\", \n                        description: \"The city and state, e.g. San Francisco, CA\"\n                    ),\n                    \"unit\": ParameterDetail(\n                        type: \"string\", enumValues: [\"fahrenheit\", \"celsius\"]\n                    )\n                ],\n                required: [\"location\"]\n            )\n        )\n    ]\n    let messages: [ChatMessage] = [\n        ChatMessage(role: .user, content: \"What's the weather like in Boston?\")\n    ]\n\n    let chatParameters = ChatParameters(\n        model: .gpt4,  // ID of the model to use.\n        messages: messages,  // A list of messages comprising the conversation so far.\n        functionCall: \"auto\",  // Controls how the model calls functions.\n        functions: functions  // A list of functions the model may generate JSON inputs for.\n    )\n\n    let chatCompletion = try await openAI.generateChatCompletion(\n        parameters: chatParameters\n    )\n} catch {\n    // Insert your own error handling method here.\n}\n```\n```\nChatResponse(\n    id: \"chatcmpl-88eVjsHEPtDDiSEuCexsqO8iuhnfG\", \n    object: OpenAIKit.OpenAIObject.chatCompletion, \n    created: 1697073039, \n    choices: [\n        OpenAIKit.ChatChoice(\n            message: Optional(\n                OpenAIKit.ChatMessage(\n                    id: \"DCE5EECB-9521-481D-9E75-C7FF9390E4CF\", \n                    role: OpenAIKit.ChatRole.assistant, \n                    content: nil, \n                    functionCall: Optional(\n                        OpenAIKit.FunctionCall(\n                            arguments: \"{\\n\\\"location\\\": \\\"Boston, MA\\\"\\n}\", \n                            name: \"getCurrentWeather\"\n                        )\n                    )\n                )\n            ), \n            delta: nil, \n            index: 0, \n            logprobs: nil, \n            finishReason: Optional(\"function_call\")\n        )\n    ], \n    usage: Optional(OpenAIKit.Usage(promptTokens: 81, completionTokens: 16, totalTokens: 97))\n)\n```\n```swift\nfunc getCurrentWeather(location: String, unit: TemperatureUnit = .fahrenheit) -> WeatherInfo {\n    return WeatherInfo(location: location, temperature: \"72\", unit: unit, forecast: [\"sunny\", \"windy\"])\n}\n\nif let message = chatCompletion.choices[0].message, let functionCall = message.functionCall {\n    let jsonString = functionCall.arguments\n    if let data = jsonString.data(using: .utf8) {\n        do {\n            if \n                let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],\n                let location = json[\"location\"] as? String\n            {\n                self.weatherInfo = self.getCurrentWeather(location: location)\n            }\n        } catch {\n            // Insert your own error handling method here.\n        }\n    }\n}\n```\n\n​\t- `generateChatCompletionStreaming` allows the developr to stream chat completion data from the endpoint. Here's an example on how to use the endpoint, along with the correlating output:\n```swift\ndo {\n    let chat: [ChatMessage] = [\n        ChatMessage(role: .system, content: \"You are a helpful assistant.\"),\n        ChatMessage(role: .user, content: \"Who won the world series in 2020?\"),\n        ChatMessage(role: .assistant, content: \"The Los Angeles Dodgers won the World Series in 2020.\"),\n        ChatMessage(role: .user, content: \"Where was it played?\")\n    ]\n    \n    let chatParameters = ChatParameters(model: .chatGPTTurbo, messages: chat)\n\n    let stream = try openAI.generateChatCompletionStreaming(\n        parameters: chatParameters\n    )\n} catch {\n    // Insert your own error handling method here.\n}\n```\n```\nChatResponse(\n    id: \"chatcmpl-88enklY0vmc4fNkM1mJQCkzW6hcST\", \n    object: OpenAIKit.OpenAIObject.chatCompletionChunk, \n    created: 1697074156, \n    choices: [\n        OpenAIKit.ChatChoice(\n            message: nil, \n            delta: Optional(\n                OpenAIKit.ChatDelta(\n                    role: Optional(OpenAIKit.ChatRole.assistant), \n                    content: Optional(\"\")\n                )\n            ), \n            index: 0, \n            logprobs: nil, \n            finishReason: nil\n        )\n    ], \n    usage: nil\n)\nChatResponse(\n    id: \"chatcmpl-88enklY0vmc4fNkM1mJQCkzW6hcST\", \n    object: OpenAIKit.OpenAIObject.chatCompletionChunk, \n    created: 1697074156, \n    choices: [\n        OpenAIKit.ChatChoice(\n            message: nil, \n            delta: Optional(\n                OpenAIKit.ChatDelta(\n                    role: nil, \n                    content: Optional(\"The\")\n                )\n            ), \n            index: 0, \n            logprobs: nil, \n            finishReason: nil\n        )\n    ],\n    usage: nil\n)\n\n// ...\n\nChatResponse(\n    id: \"chatcmpl-88enklY0vmc4fNkM1mJQCkzW6hcST\", \n    object: OpenAIKit.OpenAIObject.chatCompletionChunk, \n    created: 1697074156, \n    choices: [\n        OpenAIKit.ChatChoice(\n            message: nil, \n            delta: Optional(\n                OpenAIKit.ChatDelta(\n                    role: nil, \n                    content: Optional(\".\")\n                )\n            ), \n            index: 0, \n            logprobs: nil, \n            finishReason: nil\n        )\n    ], \n    usage: nil\n)\nChatResponse(\n    id: \"chatcmpl-88enklY0vmc4fNkM1mJQCkzW6hcST\", \n    object: OpenAIKit.OpenAIObject.chatCompletionChunk, \n    created: 1697074156, \n    choices: [\n        OpenAIKit.ChatChoice(\n            message: nil, \n            delta: Optional(\n                OpenAIKit.ChatDelta(\n                    role: nil, \n                    content: nil\n                )\n            ), \n            index: 0, \n            logprobs: nil, \n            finishReason: Optional(\"stop\")\n        )\n    ], \n    usage: nil\n)\n```\n\n### Audio\n\nWhisper is OpenAI's speech-to-text AI model, designed for accurate transcription of spoken content. By converting audio into text, it offers developers a straightforward tool for tasks like transcription services, voice commands, vocal language translations, or audio indexing. Implementing Whisper can help streamline processes, make applications more accessible, and leverage voice data efficiently.\n\nThere are the two main endpoints that use the Whisper model:\n    - `createTranscription` is the main endpoint that allows developers to transcribe spoken audio into text. Here's an example on how to use the endpoint, and the corresponding returned item:\n\n```swift\ndo {\n    let audioParameters = TranscriptionParameters(file: audio)\n    \n    let transcriptionCompletion = try await openAI.createTranscription(parameters: audioParameters)\n} catch {\n    // Insert your own error handling method here.\n}\n```\n\n<audio controls>\n    <source src=\"Resources/InputTranscriptionAudio.mp3\" type=\"audio/mpeg\">\nYour browser does not support the audio element.\n</audio>\n\n```\nArousing from the most profound of slumbers, we break the gossamer web of some dream. Yet in a second afterward, so frail may that web have been, we remember not that we have dreamed. In the return to life \nfrom the swoon there are two stages, first, that of the sense of mental or spiritual, secondly, that of the sense of physical existence. It seems probable that if, upon reaching the second stage, we could \nrecall the impressions of the first, we should find these impressions eloquent in memories of the gulf beyond. And that gulf is what? How at least shall we distinguish its shadows from those of the tomb?\n```\n\n​\t- `createTranslation` is the second endpoint that allows developers to translate any non-English audio into transcribed English text. Here's an example on how to use the endpoint, and the corresponding returned item:\n\n```swift\ndo {\n    let audioParameters = TranscriptionParameters(file: audio)\n    \n    let transcriptionCompletion = try await openAI.createTranslation(parameters: audioParameters)\n} catch {\n    // Insert your own error handling method here.\n}\n```\n\n<audio controls>\n    <source src=\"Resources/InputTranslationAudio.mp3\" type=\"audio/mpeg\">\nYour browser does not support the audio element.\n</audio>\n\n```\nIn the night, when I was out of my mind, and I, pained, numb and tired, thought about the beauty and goodness of a long-forgotten lesson, and my head began to shake, I suddenly heard something tick that scared \nme out of my sleep. Who could it be in that weather? A visitor is knocking, I thought, at my room in that weather. That's all it is, and nothing more.\n```\n\n### Utilities\n\n#### Embeddings\n\nEmbeddings utilize OpenAI's GPT models to generate dense vector representations for text. These embeddings capture semantic information, enabling developers to perform tasks like similarity search, clustering, or fine-tuning on specific tasks. By integrating GPT Embeddings into applications, developers can enhance text analysis and retrieval capabilities, leading to more effective data processing and insights.\n\nHere's an example on how to use it, and the expected output for the endpoint:\n\n```swift\ndo {\n    let embeddingsParam = EmbeddingsParameters(model: \"text-similarity-ada-002\", input: input)\n\n    self.embeddingsResponse = try await openAI.createEmbeddings(parameters: embeddingsParam)\n} catch {\n    // Insert your own error handling method here.\n}\n```\n```\nOpenAIKit.EmbeddingsResponse(\n    object: OpenAIKit.OpenAIObject.list, \n    data: [\n        OpenAIKit.EmbeddingsData(\n            object: OpenAIKit.OpenAIObject.embedding, \n            embedding: [\n                0.0028667077, \n                0.018867997, \n                -0.030135695,\n                // ...\n                -0.004177677, \n                -0.015615467, \n                -0.008131327\n            ], \n            index: 0\n        )\n    ], \n    model: \"text-similarity-ada:002\", \n    usage: OpenAIKit.EmbeddingsUsage(\n        promptTokens: 8, \n        totalTokens: 8\n    )\n)\n```\n\n#### Models\n\nThe models endpoint allows developers to fetch the currently available models from OpenAI, along with their own fine-tuned models.\n\nThere are two endpoints available for use with this feature:\n- `listModels` fetches the entire list of models avaialbe to the developer. Here's an example usage, along with the corresponding output:\n\n```swift\ndo {\n    let modelsResponse = try await openAi.listModels()\n} catch {\n    // Insert your own error handling method here.\n}\n```\n```\nListModelResponse(\n    object: OpenAIKit.OpenAIObject.list, \n    data: [\n        OpenAIKit.Model(\n            id: \"text-search-babbage-doc-001\", \n            object: OpenAIKit.OpenAIObject.model, \n            created: 1651172509, \n            ownedBy: \"openai-dev\"\n        ), \n        OpenAIKit.Model(\n            id: \"curie-search-query\", \n            object: OpenAIKit.OpenAIObject.model, \n            created: 1651172509, \n            ownedBy: \"openai-dev\"\n        ), \n        OpenAIKit.Model(\n            id: \"text-search-babbage-query-001\", \n            object: OpenAIKit.OpenAIObject.model, \n            created: 1651172509, \n            ownedBy: \"openai-dev\"\n        ), \n        OpenAIKit.Model(\n            id: \"babbage\", \n            object: OpenAIKit.OpenAIObject.model, \n            created: 1649358449, \n            ownedBy: \"openai\"\n        ), \n        OpenAIKit.Model(\n            id: \"gpt-3.5-turbo-instruct-0914\", \n            object: OpenAIKit.OpenAIObject.model, \n            created: 1694122472, \n            ownedBy: \"system\"\n        )\n        // ...\n    ]\n)\n```\n\n- `retrieveModels` fetches a single model, given the input model's ID. Here's an example usage, along with the corresponding output:\n\n```swift\ndo {\n    let model = try await openAI.retrieveModel(modelId: \"text-davinci-001\")\n} catch {\n    // Insert your own error handling method here.\n}\n```\n```\nOpenAIKit.Model(\n    id: \"text-davinci-001\", \n    object: OpenAIKit.OpenAIObject.model, \n    created: 1649364042, \n    ownedBy: \"openai\"\n)\n```\n\n### Completion\n\n#### ⚠️ Deprecation Notice for Completion API ⚠️\n\nAs of July 6, 2023, OpenAI has announced the deprecation of the older models in the Completions API, which are set to retire at the beginning of 2024. It's highly recommended to transition to the Chat Completions API which provides a more structured prompt interface and multi-turn conversation capabilities. The Chat Completions API has proven to handle a vast majority of previous use cases and new conversational needs with higher flexibility and specificity, significantly enhancing the developer experience. For more details, refer to the [official announcement](https://openai.com/blog/gpt-4-api-general-availability).\n\n### Migration From 2.x to 3.x\n\nOpenAIKit 3.x aligns with the modern OpenAI SDK shape and adopts Swift 6.2 concurrency checks.\nCore usage is now centered around namespaced resources (for example `openAI.responses.create(...)`), while some legacy flat methods are still available for compatibility during migration.\n\n#### 1) Move from flat client methods to namespaced resources\n\n```swift\n// ❌ 2.x style\nlet audio = try await openAI.createSpeech(parameters: speechParameters)\n\n// ✅ 3.x style\nlet audio = try await openAI.audio.speech.create(parameters: speechParameters)\n```\n\n#### 2) Prefer typed, resource-based APIs\n\n```swift\n// ✅ 3.x responses API\nlet response = try await openAI.responses.create(\n    parameters: ResponseCreateParameters(\n        model: \"gpt-5.2\",\n        input: \"Summarize this document\"\n    )\n)\n\n// ✅ 3.x uploads API\nlet upload = try await openAI.uploads.create(\n    parameters: UploadCreateParameters(\n        bytes: fileSize,\n        filename: \"training.jsonl\",\n        purpose: \"fine-tune\"\n    )\n)\n\n// ✅ 3.x webhook verification\nlet event = try openAI.webhooks.unwrap(\n    payload: rawBody,\n    headers: requestHeaders,\n    as: MyWebhookEvent.self\n)\n```\n\n#### 3) Prefer typed `Encodable` payloads over dictionary bodies\n\n3.x request models use `Encodable` throughout, which improves compile-time safety and keeps payload mapping consistent.\n\n#### 4) Use richer client configuration when needed\n\n```swift\nlet openAI = OpenAI(\n    .init(\n        apiKey: apiKey,\n        organizationId: organizationID,\n        projectId: projectID,\n        webhookSecret: webhookSecret,\n        requestOptions: .init(timeoutInterval: 600, maxRetries: 2)\n    )\n)\n```\n\n#### 5) Swift 6.2 concurrency\n\nOpenAIKit 3.x is built and tested in Swift 6.2 language mode. If your package graph still targets an older Swift language version, update your `Package.swift` toolchain/language settings before migrating.\n\n### Migration From 1.x to 2.x\n\nAs of 2.x, Chat Completion Models use enums to label each available model for the main usage of default models. Here is an example on how to migrate from using the older initializer for `ChatParameter` to the initializer for 2.x:\n\n```swift\n// ❌ 1.x implementation\nlet chatParameters = ChatParameters(model: \"gpt4\", messages: chat)\n\n// ✅ 2.x implementation\nlet chatParameters = ChatParameters(model: .gpt4, messages: chat)\n```\n\nIf you need a custom string for fine-tuned models, use the `customModel` parameter:\n\n```swift\n// ✅ 2.x implementation for custom model IDs\nlet chatParameters = ChatParameters(customModel: \"INSERT-MODEL-ID\", message: chat)\n```\n\n## Example Projects\n\n(TBD)\n\n## Development And Testing\n\nWe welcome anyone to contribute to the project through posting issues, if they encounter any bugs / glitches while using OpenAIKit; and as well with creating pull issues that add any additional features to OpenAIKit.\n\n## License\n\nOpenAIKit is released under the MIT license, and any use of OpenAI's REST endpoint will be under the [Usage policies](https://beta.openai.com/docs/usage-policies) set by them.\n\n```\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 2.0.1 | :white_check_mark: |\n| 2.0 | :x: |\n| 1.2   | :x: |\n| 1.1.3   | :x: |\n| 1.1.2   | :x: |\n| 1.1.1   | :x: |\n| 1.1.0   | :x: |\n| 1.0.0   | :x: |\n\n## Reporting a Vulnerability\n\nPlease create a GitHub issue or a GitHub Pull Request with a write up for the security vulnerability.\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/AudioSpeechResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension AudioSpeechResource {\n    func create(parameters: SpeechParameters) async throws -> Data {\n        let url = try client.getServerUrl(path: \"/audio/speech\")\n        return try await OpenAIKitSession.shared.decodeRawUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters,\n            acceptHeader: \"application/octet-stream\"\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/BatchesResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension BatchesResource {\n    func create(parameters: BatchCreateParameters) async throws -> BatchObject {\n        let url = try client.getServerUrl(path: \"/batches\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> BatchListResponse {\n        let url = try client.getServerUrl(path: \"/batches\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> BatchObject {\n        let url = try client.getServerUrl(path: \"/batches/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(id: String) async throws -> BatchObject {\n        let url = try client.getServerUrl(path: \"/batches/\\(id)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/BetaResources+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension BetaAssistantsResource {\n    func create(parameters: AssistantCreateParameters) async throws -> AssistantObject {\n        let url = try client.getServerUrl(path: \"/assistants\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> AssistantListResponse {\n        let url = try client.getServerUrl(path: \"/assistants\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> AssistantObject {\n        let url = try client.getServerUrl(path: \"/assistants/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func update(id: String, parameters: AssistantUpdateParameters) async throws -> AssistantObject {\n        let url = try client.getServerUrl(path: \"/assistants/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/assistants/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension BetaThreadsResource {\n    func create(parameters: ThreadCreateParameters = .init()) async throws -> ThreadObject {\n        let url = try client.getServerUrl(path: \"/threads\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func retrieve(id: String) async throws -> ThreadObject {\n        let url = try client.getServerUrl(path: \"/threads/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func update(id: String, parameters: ThreadUpdateParameters) async throws -> ThreadObject {\n        let url = try client.getServerUrl(path: \"/threads/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/threads/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension BetaThreadRunsResource {\n    func create(threadID: String, parameters: ThreadRunCreateParameters) async throws -> ThreadRunObject {\n        let url = try client.getServerUrl(path: \"/threads/\\(threadID)/runs\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list(threadID: String) async throws -> ThreadRunListResponse {\n        let url = try client.getServerUrl(path: \"/threads/\\(threadID)/runs\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(threadID: String, runID: String) async throws -> ThreadRunObject {\n        let url = try client.getServerUrl(path: \"/threads/\\(threadID)/runs/\\(runID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(threadID: String, runID: String) async throws -> ThreadRunObject {\n        let url = try client.getServerUrl(path: \"/threads/\\(threadID)/runs/\\(runID)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension BetaThreadRunStepsResource {\n    func list(threadID: String, runID: String) async throws -> ThreadRunStepListResponse {\n        let url = try client.getServerUrl(path: \"/threads/\\(threadID)/runs/\\(runID)/steps\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(threadID: String, runID: String, stepID: String) async throws -> ThreadRunStepObject {\n        let url = try client.getServerUrl(path: \"/threads/\\(threadID)/runs/\\(runID)/steps/\\(stepID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/ContainersResource+API.swift",
    "content": "import Foundation\n\nprivate struct EmptyContainerContentBody: Encodable {\n    init() {}\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ContainersResource {\n    func create(parameters: ContainerCreateParameters) async throws -> ContainerObject {\n        let url = try client.getServerUrl(path: \"/containers\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> ContainerListResponse {\n        let url = try client.getServerUrl(path: \"/containers\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> ContainerObject {\n        let url = try client.getServerUrl(path: \"/containers/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/containers/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ContainerFilesResource {\n    func create(containerID: String, parameters: ContainerFileCreateParameters) async throws -> ContainerFileObject {\n        let url = try client.getServerUrl(path: \"/containers/\\(containerID)/files\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list(containerID: String) async throws -> ContainerFileListResponse {\n        let url = try client.getServerUrl(path: \"/containers/\\(containerID)/files\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(containerID: String, fileID: String) async throws -> ContainerFileObject {\n        let url = try client.getServerUrl(path: \"/containers/\\(containerID)/files/\\(fileID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func delete(containerID: String, fileID: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/containers/\\(containerID)/files/\\(fileID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ContainerFileContentResource {\n    func retrieve(containerID: String, fileID: String) async throws -> Data {\n        let url = try client.getServerUrl(path: \"/containers/\\(containerID)/files/\\(fileID)/content\")\n        return try await OpenAIKitSession.shared.decodeRawUrl(\n            with: url,\n            configuration: client.configuration,\n            body: EmptyContainerContentBody(),\n            method: .get\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/ConversationsResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ConversationsResource {\n    func create(parameters: ConversationCreateParameters = .init()) async throws -> ConversationObject {\n        let url = try client.getServerUrl(path: \"/conversations\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> ConversationListResponse {\n        let url = try client.getServerUrl(path: \"/conversations\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> ConversationObject {\n        let url = try client.getServerUrl(path: \"/conversations/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/conversations/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ConversationItemsResource {\n    func list(conversationID: String) async throws -> ConversationItemListResponse {\n        let url = try client.getServerUrl(path: \"/conversations/\\(conversationID)/items\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func create(\n        conversationID: String,\n        parameters: ConversationItemCreateParameters\n    ) async throws -> ConversationItemObject {\n        let url = try client.getServerUrl(path: \"/conversations/\\(conversationID)/items\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func retrieve(conversationID: String, itemID: String) async throws -> ConversationItemObject {\n        let url = try client.getServerUrl(path: \"/conversations/\\(conversationID)/items/\\(itemID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func delete(conversationID: String, itemID: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/conversations/\\(conversationID)/items/\\(itemID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/EvalsResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension EvalsResource {\n    func create(parameters: EvalCreateParameters) async throws -> EvalObject {\n        let url = try client.getServerUrl(path: \"/evals\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> EvalListResponse {\n        let url = try client.getServerUrl(path: \"/evals\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> EvalObject {\n        let url = try client.getServerUrl(path: \"/evals/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/evals/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension EvalRunsResource {\n    func create(evalID: String, parameters: EvalRunCreateParameters) async throws -> EvalRunObject {\n        let url = try client.getServerUrl(path: \"/evals/\\(evalID)/runs\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list(evalID: String) async throws -> EvalRunListResponse {\n        let url = try client.getServerUrl(path: \"/evals/\\(evalID)/runs\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(evalID: String, runID: String) async throws -> EvalRunObject {\n        let url = try client.getServerUrl(path: \"/evals/\\(evalID)/runs/\\(runID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(evalID: String, runID: String) async throws -> EvalRunObject {\n        let url = try client.getServerUrl(path: \"/evals/\\(evalID)/runs/\\(runID)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension EvalRunOutputItemsResource {\n    func list(evalID: String, runID: String) async throws -> EvalRunOutputItemListResponse {\n        let url = try client.getServerUrl(path: \"/evals/\\(evalID)/runs/\\(runID)/output_items\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/FineTuningResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension FineTuningJobsResource {\n    func create(parameters: FineTuningJobCreateParameters) async throws -> FineTuningJobObject {\n        let url = try client.getServerUrl(path: \"/fine_tuning/jobs\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> FineTuningJobListResponse {\n        let url = try client.getServerUrl(path: \"/fine_tuning/jobs\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> FineTuningJobObject {\n        let url = try client.getServerUrl(path: \"/fine_tuning/jobs/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(id: String) async throws -> FineTuningJobObject {\n        let url = try client.getServerUrl(path: \"/fine_tuning/jobs/\\(id)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n\n    func listEvents(jobID: String) async throws -> FineTuningJobEventListResponse {\n        let url = try client.getServerUrl(path: \"/fine_tuning/jobs/\\(jobID)/events\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func listCheckpoints(jobID: String) async throws -> FineTuningCheckpointListResponse {\n        let url = try client.getServerUrl(path: \"/fine_tuning/jobs/\\(jobID)/checkpoints\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/RealtimeResource+API.swift",
    "content": "import Foundation\n\npublic struct RealtimeConnectionOptions: Sendable {\n    public var model: String?\n    public var callID: String?\n\n    public init(model: String? = nil, callID: String? = nil) {\n        self.model = model\n        self.callID = callID\n    }\n}\n\npublic struct RealtimeConnectionEvent: Sendable {\n    public let type: String\n    public let payload: String?\n\n    public init(type: String, payload: String? = nil) {\n        self.type = type\n        self.payload = payload\n    }\n}\n\npublic actor RealtimeConnection {\n    private var isClosed = false\n    private let options: RealtimeConnectionOptions\n\n    init(options: RealtimeConnectionOptions) {\n        self.options = options\n    }\n\n    public func receive() -> RealtimeConnectionEvent? {\n        guard !isClosed else { return nil }\n        return RealtimeConnectionEvent(type: \"connected\", payload: options.model)\n    }\n\n    public func send(_ event: RealtimeConnectionEvent) {\n        _ = event\n    }\n\n    public func close() {\n        isClosed = true\n    }\n}\n\npublic struct RealtimeConnectionManager {\n    private let options: RealtimeConnectionOptions\n\n    init(options: RealtimeConnectionOptions) {\n        self.options = options\n    }\n\n    public func enter() async -> RealtimeConnection {\n        RealtimeConnection(options: options)\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension RealtimeResource {\n    func connect(options: RealtimeConnectionOptions = .init()) -> RealtimeConnectionManager {\n        RealtimeConnectionManager(options: options)\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension RealtimeCallsResource {\n    func create(parameters: RealtimeCallCreateParameters = .init()) async throws -> RealtimeCallObject {\n        let url = try client.getServerUrl(path: \"/realtime/calls\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func accept(callID: String) async throws -> RealtimeCallObject {\n        let url = try client.getServerUrl(path: \"/realtime/calls/\\(callID)/accept\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n\n    func hangup(callID: String) async throws -> RealtimeCallObject {\n        let url = try client.getServerUrl(path: \"/realtime/calls/\\(callID)/hangup\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n\n    func refer(callID: String, parameters: RealtimeCallReferParameters) async throws -> RealtimeCallObject {\n        let url = try client.getServerUrl(path: \"/realtime/calls/\\(callID)/refer\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func reject(callID: String) async throws -> RealtimeCallObject {\n        let url = try client.getServerUrl(path: \"/realtime/calls/\\(callID)/reject\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension RealtimeClientSecretsResource {\n    func create(parameters: RealtimeClientSecretCreateParameters = .init()) async throws -> RealtimeClientSecretResponse {\n        let url = try client.getServerUrl(path: \"/realtime/client_secrets\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/ResourceNamespaces.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic class OpenAIResource {\n    internal unowned let client: OpenAI\n\n    internal init(_ client: OpenAI) {\n        self.client = client\n    }\n}\n\n// MARK: Top-level resources\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class CompletionsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ChatResource: OpenAIResource {\n    public lazy var completions = ChatCompletionsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class EmbeddingsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class FilesResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ImagesResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class AudioResource: OpenAIResource {\n    public lazy var speech = AudioSpeechResource(client)\n    public lazy var transcriptions = AudioTranscriptionsResource(client)\n    public lazy var translations = AudioTranslationsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ModerationsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ModelsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class FineTuningResource: OpenAIResource {\n    public lazy var jobs = FineTuningJobsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class VectorStoresResource: OpenAIResource {\n    public lazy var files = VectorStoreFilesResource(client)\n    public lazy var fileBatches = VectorStoreFileBatchesResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class WebhooksResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BatchesResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class UploadsResource: OpenAIResource {\n    public lazy var parts = UploadPartsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ResponsesResource: OpenAIResource {\n    public lazy var inputItems = ResponseInputItemsResource(client)\n    public lazy var inputTokens = ResponseInputTokensResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class RealtimeResource: OpenAIResource {\n    public lazy var calls = RealtimeCallsResource(client)\n    public lazy var clientSecrets = RealtimeClientSecretsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ConversationsResource: OpenAIResource {\n    public lazy var items = ConversationItemsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class EvalsResource: OpenAIResource {\n    public lazy var runs = EvalRunsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ContainersResource: OpenAIResource {\n    public lazy var files = ContainerFilesResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class SkillsResource: OpenAIResource {\n    public lazy var versions = SkillVersionsResource(client)\n    public lazy var content = SkillContentResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class VideosResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaResource: OpenAIResource {\n    public lazy var assistants = BetaAssistantsResource(client)\n    public lazy var threads = BetaThreadsResource(client)\n    public lazy var chatkit = BetaChatKitResource(client)\n    public lazy var realtime = BetaRealtimeResource(client)\n}\n\n// MARK: Nested resources\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ChatCompletionsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class AudioSpeechResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class AudioTranscriptionsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class AudioTranslationsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class VectorStoreFilesResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class VectorStoreFileBatchesResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class UploadPartsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ResponseInputItemsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ResponseInputTokensResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class RealtimeCallsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class RealtimeClientSecretsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ConversationItemsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class EvalRunsResource: OpenAIResource {\n    public lazy var outputItems = EvalRunOutputItemsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class EvalRunOutputItemsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ContainerFilesResource: OpenAIResource {\n    public lazy var content = ContainerFileContentResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class ContainerFileContentResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class SkillVersionsResource: OpenAIResource {\n    public lazy var content = SkillVersionContentResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class SkillVersionContentResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class SkillContentResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaAssistantsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaThreadsResource: OpenAIResource {\n    public lazy var messages = BetaThreadMessagesResource(client)\n    public lazy var runs = BetaThreadRunsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaThreadMessagesResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaThreadRunsResource: OpenAIResource {\n    public lazy var steps = BetaThreadRunStepsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaThreadRunStepsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaChatKitResource: OpenAIResource {\n    public lazy var sessions = BetaChatKitSessionsResource(client)\n    public lazy var threads = BetaChatKitThreadsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaChatKitSessionsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaChatKitThreadsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaRealtimeResource: OpenAIResource {\n    public lazy var sessions = BetaRealtimeSessionsResource(client)\n    public lazy var transcriptionSessions = BetaRealtimeTranscriptionSessionsResource(client)\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaRealtimeSessionsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class BetaRealtimeTranscriptionSessionsResource: OpenAIResource {}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class FineTuningJobsResource: OpenAIResource {}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/ResponsesResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ResponsesResource {\n    func create(parameters: ResponseCreateParameters) async throws -> ResponseObject {\n        let url = try client.getServerUrl(path: \"/responses\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func stream(parameters: ResponseCreateParameters) throws -> AsyncThrowingStream<ResponseObject, Error> {\n        let url = try client.getServerUrl(path: \"/responses\")\n        var streamingParameters = parameters\n        streamingParameters.stream = true\n        return try OpenAIKitSession.shared.streamData(\n            with: url,\n            configuration: client.configuration,\n            body: streamingParameters\n        )\n    }\n\n    func parse(parameters: ResponseCreateParameters) async throws -> ResponseObject {\n        try await create(parameters: parameters)\n    }\n\n    func retrieve(id: String) async throws -> ResponseObject {\n        let url = try client.getServerUrl(path: \"/responses/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/responses/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(id: String) async throws -> ResponseObject {\n        let url = try client.getServerUrl(path: \"/responses/\\(id)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ResponseInputItemsResource {\n    func list(responseID: String) async throws -> ResponseInputItemListResponse {\n        let url = try client.getServerUrl(path: \"/responses/\\(responseID)/input_items\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension ResponseInputTokensResource {\n    func create(parameters: ResponseInputTokensParameters) async throws -> ResponseInputTokenCount {\n        let url = try client.getServerUrl(path: \"/responses/input_tokens\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/SkillsAndVideosResource+API.swift",
    "content": "import Foundation\n\nprivate struct EmptySkillBody: Encodable {\n    init() {}\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension SkillsResource {\n    func create(parameters: SkillCreateParameters) async throws -> SkillObject {\n        let url = try client.getServerUrl(path: \"/skills\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> SkillListResponse {\n        let url = try client.getServerUrl(path: \"/skills\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> SkillObject {\n        let url = try client.getServerUrl(path: \"/skills/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func update(id: String, parameters: SkillUpdateParameters) async throws -> SkillObject {\n        let url = try client.getServerUrl(path: \"/skills/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/skills/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension SkillContentResource {\n    func retrieve(skillID: String) async throws -> Data {\n        let url = try client.getServerUrl(path: \"/skills/\\(skillID)/content\")\n        return try await OpenAIKitSession.shared.decodeRawUrl(\n            with: url,\n            configuration: client.configuration,\n            body: EmptySkillBody(),\n            method: .get\n        )\n    }\n\n    func update(skillID: String, parameters: SkillContentUpdateParameters) async throws -> SkillObject {\n        let url = try client.getServerUrl(path: \"/skills/\\(skillID)/content\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension SkillVersionsResource {\n    func list(skillID: String) async throws -> SkillVersionListResponse {\n        let url = try client.getServerUrl(path: \"/skills/\\(skillID)/versions\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(skillID: String, versionID: String) async throws -> SkillVersionObject {\n        let url = try client.getServerUrl(path: \"/skills/\\(skillID)/versions/\\(versionID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension SkillVersionContentResource {\n    func retrieve(skillID: String, versionID: String) async throws -> Data {\n        let url = try client.getServerUrl(path: \"/skills/\\(skillID)/versions/\\(versionID)/content\")\n        return try await OpenAIKitSession.shared.decodeRawUrl(\n            with: url,\n            configuration: client.configuration,\n            body: EmptySkillBody(),\n            method: .get\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension VideosResource {\n    func create(parameters: VideoCreateParameters) async throws -> VideoObject {\n        let url = try client.getServerUrl(path: \"/videos\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> VideoListResponse {\n        let url = try client.getServerUrl(path: \"/videos\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> VideoObject {\n        let url = try client.getServerUrl(path: \"/videos/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(id: String) async throws -> VideoObject {\n        let url = try client.getServerUrl(path: \"/videos/\\(id)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/UploadsResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension UploadsResource {\n    func create(parameters: UploadCreateParameters) async throws -> UploadObject {\n        let url = try client.getServerUrl(path: \"/uploads\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func retrieve(id: String) async throws -> UploadObject {\n        let url = try client.getServerUrl(path: \"/uploads/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(id: String) async throws -> UploadObject {\n        let url = try client.getServerUrl(path: \"/uploads/\\(id)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n\n    func complete(id: String, parameters: UploadCompleteParameters) async throws -> UploadObject {\n        let url = try client.getServerUrl(path: \"/uploads/\\(id)/complete\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension UploadPartsResource {\n    func create(uploadID: String, parameters: UploadPartCreateParameters) async throws -> UploadPartObject {\n        let url = try client.getServerUrl(path: \"/uploads/\\(uploadID)/parts\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/VectorStoresResource+API.swift",
    "content": "import Foundation\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension VectorStoresResource {\n    func create(parameters: VectorStoreCreateParameters) async throws -> VectorStoreObject {\n        let url = try client.getServerUrl(path: \"/vector_stores\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list() async throws -> VectorStoreListResponse {\n        let url = try client.getServerUrl(path: \"/vector_stores\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(id: String) async throws -> VectorStoreObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func update(id: String, parameters: VectorStoreUpdateParameters) async throws -> VectorStoreObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func delete(id: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension VectorStoreFilesResource {\n    func create(vectorStoreID: String, parameters: VectorStoreFileCreateParameters) async throws -> VectorStoreFileObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/files\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list(vectorStoreID: String) async throws -> VectorStoreFileListResponse {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/files\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(vectorStoreID: String, fileID: String) async throws -> VectorStoreFileObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/files/\\(fileID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func delete(vectorStoreID: String, fileID: String) async throws -> DeleteObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/files/\\(fileID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n}\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic extension VectorStoreFileBatchesResource {\n    func create(vectorStoreID: String, parameters: VectorStoreFileBatchCreateParameters) async throws -> VectorStoreFileBatchObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/file_batches\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            body: parameters\n        )\n    }\n\n    func list(vectorStoreID: String) async throws -> VectorStoreFileBatchListResponse {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/file_batches\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func retrieve(vectorStoreID: String, fileBatchID: String) async throws -> VectorStoreFileBatchObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/file_batches/\\(fileBatchID)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    func cancel(vectorStoreID: String, fileBatchID: String) async throws -> VectorStoreFileBatchObject {\n        let url = try client.getServerUrl(path: \"/vector_stores/\\(vectorStoreID)/file_batches/\\(fileBatchID)/cancel\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: url,\n            configuration: client.configuration,\n            method: .post,\n            bodyRequired: false\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Client/WebhooksResource+Helpers.swift",
    "content": "import CryptoKit\nimport Foundation\n\npublic enum OpenAIWebhookError: Error {\n    case missingWebhookSecret\n    case missingTimestamp\n    case missingSignature\n    case invalidSignature\n    case invalidPayload\n}\n\nprivate extension String {\n    var openAIWebhookHexData: Data? {\n        let clean = self.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()\n        guard clean.count % 2 == 0 else { return nil }\n        var data = Data()\n        data.reserveCapacity(clean.count / 2)\n\n        var index = clean.startIndex\n        while index < clean.endIndex {\n            let next = clean.index(index, offsetBy: 2)\n            let byteString = clean[index..<next]\n            guard let byte = UInt8(byteString, radix: 16) else { return nil }\n            data.append(byte)\n            index = next\n        }\n\n        return data\n    }\n}\n\nprivate extension Dictionary where Key == String, Value == String {\n    func openAIWebhookValue(for candidates: [String]) -> String? {\n        var lowercaseMap: [String: String] = [:]\n        for (key, value) in self {\n            lowercaseMap[key.lowercased()] = value\n        }\n\n        for candidate in candidates {\n            if let value = lowercaseMap[candidate.lowercased()] {\n                return value\n            }\n        }\n\n        return nil\n    }\n}\n\npublic extension WebhooksResource {\n    func verifySignature(\n        payload: String,\n        headers: [String: String],\n        secret: String? = nil\n    ) throws {\n        let resolvedSecret = secret ?? client.configuration.webhookSecret\n        guard let webhookSecret = resolvedSecret, !webhookSecret.isEmpty else {\n            throw OpenAIWebhookError.missingWebhookSecret\n        }\n\n        guard let timestamp = headers.openAIWebhookValue(for: [\"openai-timestamp\", \"webhook-timestamp\"]) else {\n            throw OpenAIWebhookError.missingTimestamp\n        }\n        guard let signatureHeader = headers.openAIWebhookValue(for: [\"openai-signature\", \"webhook-signature\"]) else {\n            throw OpenAIWebhookError.missingSignature\n        }\n\n        let signatureValue: String\n        if let valueRange = signatureHeader.range(of: \"v1=\") {\n            signatureValue = String(signatureHeader[valueRange.upperBound...]).split(separator: \",\").first.map(String.init) ?? \"\"\n        } else {\n            signatureValue = signatureHeader\n        }\n\n        guard let providedSignature = signatureValue.openAIWebhookHexData else {\n            throw OpenAIWebhookError.invalidSignature\n        }\n\n        let message = \"\\(timestamp).\\(payload)\"\n        let key = SymmetricKey(data: Data(webhookSecret.utf8))\n        let digest = HMAC<SHA256>.authenticationCode(for: Data(message.utf8), using: key)\n        let expected = Data(digest)\n\n        guard expected == providedSignature else {\n            throw OpenAIWebhookError.invalidSignature\n        }\n    }\n\n    func unwrap<Event: Decodable>(\n        payload: String,\n        headers: [String: String],\n        as type: Event.Type = Event.self,\n        secret: String? = nil\n    ) throws -> Event {\n        try verifySignature(payload: payload, headers: headers, secret: secret)\n\n        guard let data = payload.data(using: .utf8) else {\n            throw OpenAIWebhookError.invalidPayload\n        }\n\n        return try JSONDecoder().decode(type, from: data)\n    }\n\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/NSImageExtension.swift",
    "content": "//\n//  NSImageExtension.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n#if os(macOS)\nimport Cocoa\n\nextension NSImage {\n    public func pngData(\n            size: ImageResolutions,\n            imageInterpolation: NSImageInterpolation = .high\n        ) -> Data? {\n            var cgSize = CGSize()\n\n            switch size {\n            case .small:\n                cgSize.width = 256\n                cgSize.height = 256\n                break\n            case .medium:\n                cgSize.width = 512\n                cgSize.height = 512\n                break\n            case .large:\n                cgSize.width = 1024\n                cgSize.height = 1024\n                break\n            case .extraLargeLandscape:\n                cgSize.width = 1792\n                cgSize.height = 1024\n                break\n            case .extraLargePortrait:\n                cgSize.width = 1024\n                cgSize.height = 1792\n                break\n            }\n\n            guard let bitmap = NSBitmapImageRep(\n                bitmapDataPlanes: nil,\n                pixelsWide: Int(cgSize.width),\n                pixelsHigh: Int(cgSize.height),\n                bitsPerSample: 8,\n                samplesPerPixel: 4,\n                hasAlpha: true,\n                isPlanar: false,\n                colorSpaceName: .deviceRGB,\n                bitmapFormat: [],\n                bytesPerRow: 0,\n                bitsPerPixel: 0\n            ) else {\n                return nil\n            }\n\n            bitmap.size = cgSize\n            NSGraphicsContext.saveGraphicsState()\n            NSGraphicsContext.current = NSGraphicsContext(bitmapImageRep: bitmap)\n            NSGraphicsContext.current?.imageInterpolation = imageInterpolation\n            draw(\n                in: NSRect(origin: .zero, size: cgSize),\n                from: .zero,\n                operation: .copy,\n                fraction: 1.0\n            )\n            NSGraphicsContext.restoreGraphicsState()\n\n            return bitmap.representation(using: .png, properties: [:])\n        }\n}\n#endif\n"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/NSMutableDataExtension.swift",
    "content": "//\n//  NSMutableDataExtension.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport Foundation\n\n// Used for the form data to append strings to the data variable of NSMutableData type.\nextension NSMutableData {\n  func append(_ string: String) {\n    if let data = string.data(using: .utf8) {\n      self.append(data)\n    }\n  }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/String.swift",
    "content": "//\n//  File.swift\n//  \n//\n//  Created by Marcus Arnett on 8/12/23.\n//\n\nimport Foundation\n\nextension String {\n    internal var surroundingWords: [String] {\n        let words = self.split(separator: \" \")\n        guard let index = words.firstIndex(where: { String($0) == self }) else { return [] }\n        var surrounding: [String] = []\n        if index > 0 { surrounding.append(String(words[index - 1])) }\n        if index < words.count - 1 { surrounding.append(String(words[index + 1])) }\n        return surrounding\n    }\n\n    public var subtitleDate: Date? {\n        let formatter = DateFormatter()\n        formatter.dateFormat = \"HH:mm:ss,SSS\"\n        formatter.timeZone = TimeZone(secondsFromGMT: 0)\n        formatter.locale = Locale(identifier: \"en_US_POSIX\")\n        return formatter.date(from: self)\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Extensions/StringPropertyMap.swift",
    "content": "//\n//  SwiftUIView.swift\n//  \n//\n//  Created by Marcus Arnett on 10/10/23.\n//\n\nimport SwiftUI\n\ninternal extension [String: Property] {\n    var body: [String: Any] {\n        var result: [String: Any] = [:]\n        for key in self.keys {\n            let value = self[key]\n            if let value {\n                result[key] = value.body\n            }\n        }\n        return result\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/OpenAI.swift",
    "content": "//\n//  OpenAI.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)\nimport UIKit\nimport SwiftUI\n#endif\n\n#if os(macOS)\nimport Foundation\nimport AppKit\n#endif\n\n#if os(Linux) || SERVER\nimport Foundation\n#endif\n\n/// OpenAI provides the needed core functions of OpenAIKit.\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\npublic final class OpenAI {\n    /// The configuration object used to store the API Key and Organization ID.\n    private var config: Configuration\n\n    // MARK: Resource namespaces\n\n    public lazy var completions = CompletionsResource(self)\n    public lazy var chat = ChatResource(self)\n    public lazy var embeddings = EmbeddingsResource(self)\n    public lazy var files = FilesResource(self)\n    public lazy var images = ImagesResource(self)\n    public lazy var audio = AudioResource(self)\n    public lazy var moderations = ModerationsResource(self)\n    public lazy var models = ModelsResource(self)\n    public lazy var fineTuning = FineTuningResource(self)\n    public lazy var vectorStores = VectorStoresResource(self)\n    public lazy var webhooks = WebhooksResource(self)\n    public lazy var beta = BetaResource(self)\n    public lazy var batches = BatchesResource(self)\n    public lazy var uploads = UploadsResource(self)\n    public lazy var responses = ResponsesResource(self)\n    public lazy var realtime = RealtimeResource(self)\n    public lazy var conversations = ConversationsResource(self)\n    public lazy var evals = EvalsResource(self)\n    public lazy var containers = ContainersResource(self)\n    public lazy var skills = SkillsResource(self)\n    public lazy var videos = VideosResource(self)\n\n    public init(_ config: Configuration) {\n        self.config = config\n    }\n\n    internal var configuration: Configuration {\n        self.config\n    }\n\n    #if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)\n    /// Input a `Base64` image binary `String` to receive an `UIImage` object.\n    /// - Parameter b64Data: The `Base64` data itself in `String` form.\n    /// - Returns: A `UIImage` object.\n    public func decodeBase64Image(_ b64Data: String) throws -> UIImage {\n        do {\n            guard let data = Data(base64Encoded: b64Data) else {\n                throw OpenAIError.invalidData\n            }\n\n            guard let image = UIImage(data: data) else {\n                throw OpenAIError.invalidData\n            }\n\n            return image\n        } catch {\n            throw OpenAIError.invalidData\n        }\n    }\n    #endif\n\n    #if os(macOS)\n    /// Input a `Base64` image binary `String` to receive an `NSImage` object.\n    /// - Parameter b64Data: The `Base64` data itself in `String` form.\n    /// - Returns: An `NSImage` object.\n    public func decodeBase64Image(_ b64Data: String) throws -> NSImage {\n        do {\n            guard let data = Data(base64Encoded: b64Data) else {\n                throw OpenAIError.invalidData\n            }\n\n            guard let image = NSImage(data: data) else {\n                throw OpenAIError.invalidData\n            }\n\n            return image\n        } catch {\n            throw OpenAIError.invalidData\n        }\n    }\n    #endif\n\n    /// Return a `URL` with the OpenAI API endpoint as the `URL`\n    /// - Parameter path: The `String` path.\n    /// - Returns: An `URL` object.\n    internal func getServerUrl(path: String) throws -> URL {\n        let fullPath = path.hasPrefix(\"/\") ? path : \"/\\(path)\"\n        guard let result = URL(string: fullPath, relativeTo: config.baseURL)?.absoluteURL else {\n            throw OpenAIError.invalidUrl\n        }\n\n        return result\n    }\n}\n\nextension OpenAI: OpenAIProtocol {\n    public func listModels() async throws -> ListModelResponse {\n        let serverUrl = try getServerUrl(path: \"/models\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    public func retrieveModel(modelId id: String) async throws -> Model {\n        let serverUrl = try getServerUrl(path: \"/models/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    public func generateCompletion(parameters param: CompletionParameters) async throws -> CompletionResponse {\n        let serverUrl = try getServerUrl(path: \"/completions\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param\n        )\n    }\n\n    public func generateCompletionStreaming(\n        parameters param: CompletionParameters\n    ) throws -> AsyncThrowingStream<CompletionResponse, Error> {\n        let serverUrl = try getServerUrl(path: \"/completions\")\n        var parameter = param\n        parameter.stream = true\n\n        return try OpenAIKitSession.shared.streamData(\n            with: serverUrl,\n            configuration: config,\n            body: parameter\n        )\n    }\n\n    public func generateChatCompletion(parameters param: ChatParameters) async throws -> ChatResponse {\n        let serverUrl = try getServerUrl(path: \"/chat/completions\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param\n        )\n    }\n\n    public func generateChatCompletionStreaming(\n        parameters param: ChatParameters\n    ) throws -> AsyncThrowingStream<ChatResponse, Error> {\n        let serverUrl = try getServerUrl(path: \"/chat/completions\")\n        var parameter = param\n        parameter.stream = true\n\n        return try OpenAIKitSession.shared.streamData(\n            with: serverUrl,\n            configuration: config,\n            body: parameter\n        )\n    }\n\n    public func createImage(parameters param: ImageParameters) async throws -> ImageResponse {\n        try param.checkForCompatibility()\n        let serverUrl = try getServerUrl(path: \"/images/generations\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param\n        )\n    }\n\n    public func generateImageEdits(parameters param: ImageEditParameters) async throws -> ImageResponse {\n        let serverUrl = try getServerUrl(path: \"/images/edits\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param.body,\n            formSubmission: true\n        )\n    }\n\n    public func generateImageVariations(parameters param: ImageVariationParameters) async throws -> ImageResponse {\n        let serverUrl = try getServerUrl(path: \"/images/variations\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param.body,\n            formSubmission: true\n        )\n    }\n\n    public func createEmbeddings(parameters param: EmbeddingsParameters) async throws -> EmbeddingsResponse {\n        let serverUrl = try getServerUrl(path: \"/embeddings\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param\n        )\n    }\n\n    public func createTranscription(parameters param: TranscriptionParameters) async throws -> TranscriptionResponse {\n        let serverUrl = try getServerUrl(path: \"/audio/transcriptions\")\n        return try await param.retrieveResponse(using: serverUrl, self.config)\n    }\n\n    public func createTranslation(parameters param: TranscriptionParameters) async throws -> TranscriptionResponse {\n        let serverUrl = try getServerUrl(path: \"/audio/translations\")\n        var newParam = param\n        newParam.language = nil\n        return try await newParam.retrieveResponse(using: serverUrl, self.config)\n    }\n\n    public func createSpeech(parameters param: SpeechParameters) async throws -> Data {\n        let serverUrl = try getServerUrl(path: \"/audio/speech\")\n        return try await OpenAIKitSession.shared.decodeRawUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param,\n            acceptHeader: \"application/octet-stream\"\n        )\n    }\n\n    public func listFiles() async throws -> ListFilesResponse {\n        let serverUrl = try getServerUrl(path: \"/files\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    public func uploadFile(parameters param: UploadFileParameters) async throws -> File {\n        let serverUrl = try getServerUrl(path: \"/files\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param.body,\n            formSubmission: true\n        )\n    }\n\n    public func deleteFile(fileId id: String) async throws -> DeleteObject {\n        let serverUrl = try getServerUrl(path: \"/files/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n\n    public func retrieveFile(fileId id: String) async throws -> File {\n        let serverUrl = try getServerUrl(path: \"/files/\\(id)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            method: .get,\n            bodyRequired: false\n        )\n    }\n\n    public func retrieveFileContent(fileId id: String) async throws -> [FileContent] {\n        let serverUrl = try getServerUrl(path: \"/files/\\(id)/content\")\n        return try await OpenAIKitSession.shared.retrieveJsonLine(\n            with: serverUrl,\n            configuration: config\n        )\n    }\n\n    public func deleteModel(model: String) async throws -> DeleteObject {\n        let serverUrl = try getServerUrl(path: \"/models/\\(model)\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            method: .delete,\n            bodyRequired: false\n        )\n    }\n\n    public func checkContentPolicy(\n        parameters param: OpenAIKit.ContentPolicyParameters\n    ) async throws -> ContentPolicyResponse {\n        let serverUrl = try getServerUrl(path: \"/moderations\")\n        return try await OpenAIKitSession.shared.decodeUrl(\n            with: serverUrl,\n            configuration: config,\n            body: param.body\n        )\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Protocols/Chat/Property.swift",
    "content": "//\n//  Property.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// The properties used for a function call\npublic protocol Property: Codable {\n    /// The type used for the property\n    var type: String { get }\n    var body: [String: Any] { get }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Protocols/OpenAIProtocol.swift",
    "content": "//\n//  OpenAIProtocol.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\npublic protocol OpenAIProtocol {\n    // MARK: Models Functions\n    /// List and describe the various models available in the API. You can refer to the [Models](https://beta.openai.com/docs/models)\n    /// documentation to understand what models are available and the differences between them.\n\n    /// Lists the currently available models, and provides basic information about each one such as the owner and availability.\n    /// - Returns: A `ListModelResponse` object.\n    func listModels() async throws -> ListModelResponse\n\n    /// Retrieves a model instance, providing basic information about the model such as the owner and permissioning.\n    /// - Parameter id: The `String` of ID of the model.\n    /// - Returns: A `Model` object.\n    func retrieveModel(modelId id: String) async throws -> Model\n\n\n    // MARK: Completion Function\n    /// Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.\n\n    /// Using GPT3, Generate completions based on the input.\n    /// - Parameter param: A `CompletionParameters` object containing the parameters for the call.\n    /// - Returns: A `CompletionResponse` object.\n    func generateCompletion(parameters param: CompletionParameters) async throws -> CompletionResponse\n\n    /// Using GPT3, Generate completions based on the input. This function streams the output.\n    /// - Parameter param: A `CompletionParameters` object containing the parameters for the call.\n    /// - Returns: An `AsyncThrowingStream` with either a `CompletionResponse` object or an `Error` object.\n    func generateCompletionStreaming(\n        parameters param: CompletionParameters\n    ) throws -> AsyncThrowingStream<CompletionResponse, Error>\n\n\n    // MARK: Chat Function\n    /// Creates a completion for the chat message\n\n    /// Using ChatGPT, generate completions based on message history.\n    /// - Parameter param: A `ChatParameters` object containing the parameters for the call.\n    /// - Returns: A `ChatResponse` object.\n    func generateChatCompletion(parameters param: ChatParameters) async throws -> ChatResponse\n\n    /// Using ChatGPT, generate completions based on message history. This function is for users to stream data as its generated.\n    /// - Parameter param: A `ChatParameters` object containing the parameters for the call.\n    /// - Returns: An `AsyncThrowingStream` with either a `ChatResponse` object or an `Error` object.\n    func generateChatCompletionStreaming(\n        parameters param: ChatParameters\n    ) throws -> AsyncThrowingStream<ChatResponse, Error>\n\n\n    // MARK: Image Functions\n    /// Given a prompt and/or an input image, the model will generate a new image.\n    /// Related guide: [Image generation](https://beta.openai.com/docs/guides/images)\n\n    /// Creates an image given a prompt.\n    /// - Parameter param: An `ImageParameters` object containing the parameters for the call.\n    /// - Returns: An `ImageResponse` object.\n    func createImage(parameters param: ImageParameters) async throws -> ImageResponse\n\n    /// Creates an edited or extended image given an original image and a prompt.\n    /// - Parameter param: An `ImageEditParameters` object containing the parameters for the call.\n    /// - Returns: An `ImageResponse` object.\n    func generateImageEdits(parameters param: ImageEditParameters) async throws -> ImageResponse\n\n    /// Creates a variation of a given image.\n    /// - Parameter param: An `ImageVariationParameters` object containing the parameters for the call.\n    /// - Returns: An `ImageResponse` object.\n    func generateImageVariations(parameters param: ImageVariationParameters) async throws -> ImageResponse\n\n\n    // MARK: Embeddings Function\n    /// Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.\n    /// Relarted guide: [Embeddings](https://beta.openai.com/docs/guides/embeddings)\n\n    /// Creates an embedding vector representing the input text.\n    /// - Parameter param: An `EmbeddingsParameters` object containing the parameters for the call.\n    /// - Returns: An `EmbeddingsResponse` object.\n    func createEmbeddings(parameters param: EmbeddingsParameters) async throws -> EmbeddingsResponse\n\n\n    // MARK: Audio Functions\n    /// Get text from an audio source\n    /// Related guide: [Speech to text](https://platform.openai.com/docs/guides/speech-to-text)\n\n    /// Transcribes audio into the input language.\n    /// - Parameter param: A `TranscriptionParameters` object containing the parameters for the call.\n    /// - Returns: A `TranscriptionResponse` object.\n    func createTranscription(parameters param: TranscriptionParameters) async throws -> TranscriptionResponse\n\n    /// Translates audio into English.\n    /// - Parameter param: A `TranscriptionParameters` object containing the parameters for the call.\n    /// - Returns: A `TranscriptionResponse` object.\n    func createTranslation(parameters param: TranscriptionParameters) async throws -> TranscriptionResponse\n\n    /// Generates speech audio from text input.\n    /// - Parameter param: A `SpeechParameters` object containing the parameters for the call.\n    /// - Returns: Raw audio data from the API.\n    func createSpeech(parameters param: SpeechParameters) async throws -> Data\n\n\n    // MARK: Files Functions\n    /// Files are used to upload documents for training and fine-tuning models.\n\n    /// Returns a list of files that belong to the user's organization.\n    /// - Returns: A `ListFilesResponse` object.\n    func listFiles() async throws -> ListFilesResponse\n\n    /// Upload a file that contains document(s) to be used across various endpoints/features.\n    /// Currently, the size of all the files uploaded by one organization\n    /// can be up to 1 GB. Please contact us if you need to increase the storage limit.\n    /// - Parameter param: A `UploadFileParameters` object containing the parameters for the call.\n    /// - Returns: A `File` object.\n    func uploadFile(parameters param: UploadFileParameters) async throws -> File\n\n    /// Delete a file.\n    /// - Parameter id: A `String` value representing the ID of the file.\n    /// - Returns: A `DeleteObject` object.\n    func deleteFile(fileId id: String) async throws -> DeleteObject\n\n    /// Returns information about a specific file.\n    /// - Parameter id: A `String` value representing the ID of the file.\n    /// - Returns: A `File` object.\n    func retrieveFile(fileId id: String) async throws -> File\n\n    /// Returns the contents of the specified file.\n    /// - Parameter id: A `String` value representing the ID of the file.\n    /// - Returns: An array of `FineTuneTraining` objects.\n    func retrieveFileContent(fileId id: String) async throws -> [FileContent]\n\n\n    // MARK: Fine-tune Functions.\n    /// Manage fine-tuning jobs to tailor a model to your specific training data.\n    /// Related guide: [Fine-tune models](https://beta.openai.com/docs/guides/fine-tuning)\n\n    /// Deletes the Fine-tune model from storage.\n    /// - Parameter model: The string of the model's name being deleted.\n    /// - Returns: A `DeleteObject` object.\n    func deleteModel(model: String) async throws -> DeleteObject\n\n\n    // MARK: Moderation Function\n    /// Given a input text, outputs if the model classifies it as violating OpenAI's content policy.\n    /// Related guide: [Moderations](https://beta.openai.com/docs/guides/moderation)\n\n    /// Classifies if text violates OpenAI's Content Policy\n    /// - Parameter param: A `ContentPolicyParameters` object containing parameters for the call.\n    /// - Returns: A `ContentPolicyResponse` object.\n    func checkContentPolicy(parameters param: ContentPolicyParameters) async throws -> ContentPolicyResponse\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Audio/AudioResponseFormat.swift",
    "content": "//\n//  AudioResponseFormat.swift\n//  \n//\n//  Created by Marcus Arnett on 8/6/23.\n//\n\nimport Foundation\n\npublic enum AudioResponseFormat: String, Codable {\n    enum CodingKeys: String, CodingKey {\n        case json\n        case text\n        case srt\n        case verboseJson = \"verbose_json\"\n        case vtt\n    }\n    \n    case json\n    case text\n    case srt\n    case verboseJson\n    case vtt\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Chat/ChatModels.swift",
    "content": "//\n//  ChatModels.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Models used for the Chat Endpoint.\npublic enum ChatModels: String, Codable, CustomStringConvertible {\n    // MARK: ChatGPT Models\n\n    /// Most capable GPT-3.5 model and optimized for chat at 1/10th the cost of text-davinci-003. Will be updated with our latest model iteration 2 weeks after it is released.\n    case chatGPTTurbo = \"gpt-3.5-turbo\"\n\n    /// Same capabilities as the standard gpt-3.5-turbo model but with 4 times the context.\n    case chatGPTTurbo16k = \"gpt-3.5-turbo-16k\"\n\n    /// Snapshot of gpt-3.5-turbo from June 13th 2023 with function calling data. Unlike gpt-3.5-turbo, this model will not receive updates, and will be deprecated 3 months after a new version is released.\n    case chatGPTTurbo0613 = \"gpt-3.5-turbo-0613\"\n\n    /// Snapshot of gpt-3.5-turbo-16k from June 13th 2023. Unlike gpt-3.5-turbo-16k, this model will not receive updates, and will be deprecated 3 months after a new version is released.\n    case chatGPTTurbo16k0613 = \"gpt-3.5-turbo-16k-0613\"\n\n    /// Can do any language task with better quality, longer output, and consistent instruction-following than the curie, babbage, or ada models. Also supports some additional features such as [inserting text](https://platform.openai.com/docs/guides/gpt/inserting-text).\n    case textDavinci003 = \"text-davinci-003\"\n\n    /// Similar capabilities to text-davinci-003 but trained with supervised fine-tuning instead of reinforcement learning\n    case textDavinci002 = \"text-davinci-002\"\n\n\n    // MARK: GPT-4 Models\n\n    /// More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat. Will be updated with our latest model iteration 2 weeks after it is released.\n    case gpt4 = \"gpt-4\"\n\n    /// Snapshot of gpt-4 from June 13th 2023 with function calling data. Unlike gpt-4, this model will not receive updates, and will be deprecated 3 months after a new version is released.\n    case gpt4_0613 = \"gpt-4-0613\"\n\n    /// Same capabilities as the base gpt-4 mode but with 4x the context length. Will be updated with our latest model iteration.\n    case gpt4_32k = \"gpt-4-32k\"\n\n    /// Snapshot of gpt-4-32 from June 13th 2023. Unlike gpt-4-32k, this model will not receive updates, and will be deprecated 3 months after a new version is released.\n    case gpt4_32k0613 = \"gpt-4-32k-0613\"\n\n    /// The maximum tokens the models can read\n    public var maxTokens: [String : Int] {\n        [\n            \"gpt-3.5-turbo\": 4096,\n            \"gpt-3.5-turbo-16k\": 16384,\n            \"gpt-3.5-turbo-0613\": 4096,\n            \"gpt-3.5-turbo-16k-0613\": 16384,\n            \"text-davinci-003\": 4097,\n            \"text-davinci-002\": 4097,\n            \"gpt-4\": 8192,\n            \"gpt-4-0613\": 8192,\n            \"gpt-4-32k\": 32768,\n            \"gpt-4-32k-0613\": 32768\n        ]\n    }\n\n    public var description: String {\n        self.rawValue\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Chat/ChatRole.swift",
    "content": "//\n//  ChatRole.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// Used for selecting who sent the message\npublic enum ChatRole: String, Codable, Sendable {\n    /// The context of the chat\n    case system\n\n    /// The main user chatting\n    case user\n\n    /// The main AI chatting\n    case assistant\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Completions/CompletionModels.swift",
    "content": "//\n//  CompletionModels.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Models used for the Completion endpoint\npublic enum CompletionModels: String, Codable, CustomStringConvertible {\n    /// Very capable, faster and lower cost than Davinci.\n    case textCurie001 = \"text-curie-001\"\n\n    /// Capable of straightforward tasks, very fast, and lower cost.\n    case textBabbage001 = \"text-babbage-001\"\n\n    /// Capable of very simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.\n    case textAda001 = \"text-ada-001\"\n\n    /// Most capable GPT-3 model. Can do any task the other models can do, often with higher quality.\n    case davinci\n\n    /// Very capable, but faster and lower cost than Davinci.\n    case curie\n\n    /// Capable of straightforward tasks, very fast, and lower cost.\n    case babbage\n\n    /// Capable of very simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.\n    case ada\n\n    /// The maximum tokens the models can read\n    public var maxTokens: [String : Int] {\n        [\n            \"text-curie-001\": 2049,\n            \"text-babbage-001\": 2049,\n            \"text-ada-001\": 2049,\n            \"davinci\": 2049,\n            \"curie\": 2049,\n            \"babbage\": 2049,\n            \"ada\": 2049\n        ]\n    }\n\n    public var description: String {\n        self.rawValue\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Files/FileStatus.swift",
    "content": "//\n//  FileStatus.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\n/// The uploaded status of the file.\npublic enum FileStatus: String, Codable {\n    /// The file is uplodaded.\n    case uploaded\n    \n    /// The file is being processed.\n    case processed\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageData.swift",
    "content": "//\n//  ImageData.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\n/// The image type of the image response data.\npublic enum ImageData: Codable {\n    enum CodingKeys: String, CodingKey {\n        case url\n        case b64Json = \"b64_json\"\n    }\n\n    /// The image is stored as a URL string.\n    case url(String)\n    \n    /// The image is stored as a Base64 binary.\n    case b64Json(String)\n\n    /// The image itself.\n    public var image: String {\n        switch self {\n        case let .b64Json(b64Json): return b64Json\n        case let .url(url): return url\n        }\n    }\n\n    public init(from decoder: Decoder) throws {\n        let container = try decoder.container(keyedBy: CodingKeys.self)\n\n        do {\n            let urlAssociate = try container.decode(String.self, forKey: .url)\n            self = .url(urlAssociate)\n        } catch {\n            let b64Associate = try container.decode(String.self, forKey: .b64Json)\n            self = .b64Json(b64Associate)\n        }\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageModel.swift",
    "content": "//\n//  ImageModel.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The model to use for image generation.\npublic enum ImageModel: String, Codable, Sendable {\n    /// The DALL-E 2 model.\n    case dalle2 = \"dall-e-2\"\n\n    /// The DALL-E 3 model.\n    case dalle3 = \"dall-e-3\"\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageQuality.swift",
    "content": "//\n//  ImageQuality.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The quality of the image that will be generated.\npublic enum ImageQuality: String, Codable, Sendable {\n    /// Creates images with finer details and greater consistency across the image.\n    case hd\n\n    /// Creates images with less detail and less consistency across the image.\n    case standard\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageResolutions.swift",
    "content": "//\n//  ImageResolutions.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The image resolution being requested.\npublic enum ImageResolutions: String, Codable, Sendable {\n    /// A 256x256 pixel image request.\n    case small = \"256x256\"\n    \n    /// A 512x512 pixel image request.\n    case medium = \"512x512\"\n    \n    /// A 1024x1024 pixel image request.\n    case large = \"1024x1024\"\n    \n    /// A 1792x1024 pixel image request.\n    case extraLargeLandscape = \"1792x1024\"\n    \n    /// A 1024x1792 pixel image request.\n    case extraLargePortrait = \"1024x1792\"\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ImageStyle.swift",
    "content": "//\n//  ImageStyle.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The style of the generated images.\npublic enum ImageStyle: String, Codable, Sendable {\n    /// Generates hyper-real and dramatic images.\n    case vivid\n\n    /// Generates more natural, less hyper-real looking images.\n    case natural\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Images/ResponseFormat.swift",
    "content": "//\n//  ResponseFormat.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The type of image of the response data that will be returned\npublic enum ResponseFormat: String, Codable {\n    /// The image is stored as a URL string.\n    case url = \"url\"\n    \n    /// The image is stored as a Base64 binary.\n    case base64Json = \"b64_json\"\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/Moderations/ContentPolicyModels.swift",
    "content": "//\n//  ContentPolicyModels.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\n/// Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n/// The default is `text-moderation-latest` which will be automatically upgraded over time.\n/// This ensures you are always using our most accurate model.\n/// If you use `text-moderation-stable`, we will provide advanced notice before updating the model.\n/// Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.\npublic enum ContentPolicyModels: String, Codable {\n    /// The latest model that gets automatically upgraded over time.\n    case latest = \"text-moderation-latest\"\n    \n    /// The stable model that gets prior notification before being upgraded.\n    case stable = \"text-moderation-stable\"\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/OpenAI/OpenAIErrors.swift",
    "content": "//\n//  OpenAIError.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// OpenAIKit errors that are thrown depending on the context.\npublic enum OpenAIError: Error {\n    /// No API Key was provided to the OpenAIKit object.\n    case noApiKey\n    \n    /// No body was provided to a decode URL request.\n    case noBody\n    \n    /// The amount of prompts being requested have exceeded the amount OpenAI allocates per time frame.\n    case promptThreshold\n    \n    /// An invalid URL was unwrapped / used.\n    case invalidUrl\n    \n    /// Invalid data was decoded / encoded.\n    case invalidData\n    \n    /// The function has not been implemented yet.\n    case notImplemented\n\n    /// An incorrect input was found in the ImageParameter. Please edit the input and try submitting again.\n    case incompatibleImageParameter(incorrctInput: (any Sendable)?)\n\n    /// An unknown error has occured. Please create an issue on [Github](https://github.com/OpenDive/OpenAIKit) if this error is thrown.\n    case unknownError\n}\n\n/// HTTP status-aware API errors mapped from OpenAI responses.\npublic enum OpenAIAPIError: Error {\n    case badRequest(OpenAIErrorResponse?)\n    case authentication(OpenAIErrorResponse?)\n    case permissionDenied(OpenAIErrorResponse?)\n    case notFound(OpenAIErrorResponse?)\n    case conflict(OpenAIErrorResponse?)\n    case unprocessableEntity(OpenAIErrorResponse?)\n    case rateLimit(OpenAIErrorResponse?)\n    case internalServer(statusCode: Int, payload: OpenAIErrorResponse?)\n    case unexpectedStatusCode(statusCode: Int, payload: OpenAIErrorResponse?)\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Enums/OpenAI/OpenAIObject.swift",
    "content": "//\n//  OpenAIObject.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// A specific type of object that OpenAI has responded with.\npublic enum OpenAIObject: String, Codable, Sendable {\n    /// A list object.\n    case list\n\n    /// A model object.\n    case model\n\n    /// A model permission object.\n    case modelPermission = \"model_permission\"\n\n    /// A text completion object.\n    case textCompletion = \"text_completion\"\n\n    /// A Chat Completion.\n    case chatCompletion = \"chat.completion\"\n\n    /// An edit object.\n    case edit\n\n    /// An embedding object.\n    case embedding\n\n    /// A file object.\n    case file\n\n    /// A Chat Completion chunk.\n    case chatCompletionChunk = \"chat.completion.chunk\"\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Audio/SpeechParameters.swift",
    "content": "import Foundation\n\n/// Parameters for text-to-speech generation.\npublic struct SpeechParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case input\n        case model\n        case voice\n        case instructions\n        case responseFormat = \"response_format\"\n        case speed\n        case streamFormat = \"stream_format\"\n    }\n\n    /// Input text to synthesize.\n    public var input: String\n\n    /// TTS model identifier.\n    public var model: String\n\n    /// Voice identifier.\n    public var voice: String\n\n    /// Optional voice instructions.\n    public var instructions: String?\n\n    /// Output audio format.\n    public var responseFormat: String?\n\n    /// Playback speed multiplier.\n    public var speed: Double?\n\n    /// Optional stream format (`audio` or `sse`).\n    public var streamFormat: String?\n\n    public init(\n        input: String,\n        model: String = \"gpt-4o-mini-tts\",\n        voice: String = \"alloy\",\n        instructions: String? = nil,\n        responseFormat: String? = nil,\n        speed: Double? = nil,\n        streamFormat: String? = nil\n    ) {\n        self.input = input\n        self.model = model\n        self.voice = voice\n        self.instructions = instructions\n        self.responseFormat = responseFormat\n        self.speed = speed\n        self.streamFormat = streamFormat\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Audio/TranscriptionParameters.swift",
    "content": "//\n//  TranscriptionParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\npublic struct TranscriptionParameters {\n    /// The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.\n    public var file: FormData\n\n    /// ID of the model to use. Only `whisper-1` is currently available.\n    public var model: String\n\n    /// An optional text to guide the model's style or continue a previous audio segment. \n    /// The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English.\n    public var prompt: String?\n\n    /// The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.\n    public var responseFormat: AudioResponseFormat\n\n    /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. \n    /// If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n    public var temperature: Double\n\n    /// The language of the input audio. Supplying the input language in \n    /// [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n    public var language: String?\n\n    public init(\n        file: Data,\n        model: String = \"whisper-1\",\n        prompt: String? = nil,\n        responseFormat: AudioResponseFormat = .json,\n        @Clamped(range: 0...1) temperature: Double = 0.0,\n        language: String? = nil\n    ) {\n        self.file = FormData(data: file, mimeType: \"audio/mpeg\", fileName: \"audio.mp3\")\n        self.model = model\n        self.prompt = prompt\n        self.responseFormat = responseFormat\n        self.temperature = temperature\n        self.language = language\n    }\n\n    /// The body of the URL used for OpenAI API requests.\n    internal var body: [String: Any] {\n        var result: [String: Any] = [\n            \"file\": self.file,\n            \"model\": self.model,\n            \"response_format\": self.responseFormat.rawValue,\n            \"temperature\": self.temperature\n        ]\n\n        if let prompt = prompt {\n            result[\"prompt\"] = prompt\n        }\n\n        if let language = language {\n            result[\"language\"] = language\n        }\n\n        return result\n    }\n\n    /// Retrieve the Response object for the request\n    /// - Parameters:\n    ///   - url: The `URL` of the request endpoint\n    ///   - config: The configuration options for OpenAI's API\n    /// - Returns: A `TransactionResponse` object.\n    internal func retrieveResponse(using url: URL, _ config: Configuration) async throws -> TranscriptionResponse {\n        switch self.responseFormat {\n        case .json, .verboseJson:\n            return try await OpenAIKitSession.shared.decodeUrl(\n                with: url,\n                configuration: config,\n                body: self.body,\n                formSubmission: true\n            )\n        case .text:\n            let data = try await OpenAIKitSession.shared.decodeUrlTranscriptions(\n                with: url,\n                configuration: config,\n                body: self.body\n            )\n            return TranscriptionResponse(text: String(decoding: data, as: UTF8.self))\n        case .srt:\n            let data = try await OpenAIKitSession.shared.decodeUrlTranscriptions(\n                with: url,\n                configuration: config,\n                body: self.body\n            )\n            return TranscriptionResponse(srt: SRT.parseSRT(from: String(decoding: data, as: UTF8.self)))\n        case .vtt:\n            let data = try await OpenAIKitSession.shared.decodeUrlTranscriptions(\n                with: url,\n                configuration: config,\n                body: self.body\n            )\n            return TranscriptionResponse(vtt: WebVTTCue.parseWebVTT(from: String(decoding: data, as: UTF8.self)))\n        }\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Batches/BatchParameters.swift",
    "content": "import Foundation\n\npublic struct BatchCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case inputFileID = \"input_file_id\"\n        case endpoint\n        case completionWindow = \"completion_window\"\n        case metadata\n    }\n\n    public var inputFileID: String\n    public var endpoint: String\n    public var completionWindow: String\n    public var metadata: [String: String]?\n\n    public init(\n        inputFileID: String,\n        endpoint: String,\n        completionWindow: String = \"24h\",\n        metadata: [String: String]? = nil\n    ) {\n        self.inputFileID = inputFileID\n        self.endpoint = endpoint\n        self.completionWindow = completionWindow\n        self.metadata = metadata\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Beta/AssistantParameters.swift",
    "content": "import Foundation\n\npublic struct AssistantCreateParameters: Encodable {\n    public var model: String\n    public var name: String?\n    public var description: String?\n    public var instructions: String?\n    public var tools: [AssistantTool]?\n    public var metadata: [String: String]?\n\n    public init(\n        model: String,\n        name: String? = nil,\n        description: String? = nil,\n        instructions: String? = nil,\n        tools: [AssistantTool]? = nil,\n        metadata: [String: String]? = nil\n    ) {\n        self.model = model\n        self.name = name\n        self.description = description\n        self.instructions = instructions\n        self.tools = tools\n        self.metadata = metadata\n    }\n}\n\npublic struct AssistantUpdateParameters: Encodable {\n    public var model: String?\n    public var name: String?\n    public var description: String?\n    public var instructions: String?\n    public var tools: [AssistantTool]?\n    public var metadata: [String: String]?\n\n    public init(\n        model: String? = nil,\n        name: String? = nil,\n        description: String? = nil,\n        instructions: String? = nil,\n        tools: [AssistantTool]? = nil,\n        metadata: [String: String]? = nil\n    ) {\n        self.model = model\n        self.name = name\n        self.description = description\n        self.instructions = instructions\n        self.tools = tools\n        self.metadata = metadata\n    }\n}\n\npublic struct ThreadCreateParameters: Encodable {\n    public var metadata: [String: String]?\n\n    public init(metadata: [String: String]? = nil) {\n        self.metadata = metadata\n    }\n}\n\npublic struct ThreadUpdateParameters: Encodable {\n    public var metadata: [String: String]?\n\n    public init(metadata: [String: String]? = nil) {\n        self.metadata = metadata\n    }\n}\n\npublic struct ThreadRunCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case assistantId = \"assistant_id\"\n        case model\n        case instructions\n        case metadata\n    }\n\n    public var assistantId: String\n    public var model: String?\n    public var instructions: String?\n    public var metadata: [String: String]?\n\n    public init(\n        assistantId: String,\n        model: String? = nil,\n        instructions: String? = nil,\n        metadata: [String: String]? = nil\n    ) {\n        self.assistantId = assistantId\n        self.model = model\n        self.instructions = instructions\n        self.metadata = metadata\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ChatParameters.swift",
    "content": "//\n//  ChatParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\npublic struct ChatParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case model\n        case messages\n        case temperature\n        case topP = \"top_p\"\n        case numberOfCompletions = \"n\"\n        case stream\n        case stop\n        case presencePenalty = \"presence_penalty\"\n        case frequencyPenalty = \"frequency_penalty\"\n        case logitBias = \"logit_bias\"\n        case user\n        case functionCall = \"function_call\"\n        case functions\n        case tools\n        case toolChoice = \"tool_choice\"\n        case responseFormat = \"response_format\"\n        case seed\n        case maxCompletionTokens = \"max_completion_tokens\"\n        case maxTokens = \"max_tokens\"\n        case parallelToolCalls = \"parallel_tool_calls\"\n        case logprobs\n        case topLogprobs = \"top_logprobs\"\n    }\n    /// ID of the model to use.\n    public var model: ChatModels\n\n    /// ID of the custom model created from fine-tuning.\n    public var customModel: String?\n\n    /// The messages to generate chat completions for, in the\n    /// [chat format](https://platform.openai.com/docs/guides/chat/introduction).\n    public var messages: [ChatMessage]\n\n    /// What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277)\n    /// to use.\n    ///\n    /// Higher values means the model will take more risks.\n    /// Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.\n    ///\n    /// We generally recommend altering this or `top_p` but not both.\n    public var temperature: Double\n\n    /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass.\n    ///\n    /// So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n    /// We generally recommend altering this or `temperature` but not both.\n    public var topP: Double\n\n    /// How many completions to generate for each prompt.\n    ///\n    /// **Note:** Because this parameter generates many completions, it can quickly consume your token quota.\n    /// Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n    public var numberOfCompletions: Int\n\n    /// Whether to stream back partial progress. If set, tokens will be sent as data-only\n    /// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\n    /// as they become available, with the stream terminated by a data: [DONE] message.\n    public var stream: Bool\n\n    /// Up to 4 sequences where the API will stop generating further tokens.\n    /// The returned text will not contain the stop sequence.\n    public var stop: [String]?\n\n    /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far,\n    /// increasing the model's likelihood to talk about new topics.\n    ///\n    /// [See more information about frequency and presence penalties.](https://beta.openai.com/docs/api-reference/parameter-details)\n    public var presencePenalty: Double\n\n    /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far,\n    /// decreasing the model's likelihood to repeat the same line verbatim.\n    ///\n    /// [See more information about frequency and presence penalties.](https://beta.openai.com/docs/api-reference/parameter-details)\n    public var frequencyPenalty: Double\n\n    /// Modify the likelihood of specified tokens appearing in the completion.\n    ///\n    /// Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100.\n    /// You can use this [tokenizer tool](https://beta.openai.com/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs.\n    /// Mathematically, the bias is added to the logits generated by the model prior to sampling.\n    /// The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;\n    /// values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n    ///\n    /// As an example, you can pass `{\"50256\": -100}` to prevent the `<|endoftext|>` token from being generated.\n    public var logitBias: [String: Int]?\n\n    /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n    /// [Learn more.](https://beta.openai.com/docs/guides/safety-best-practices/end-user-ids)\n    public var user: String?\n\n    /// Controls how the model calls functions. \"none\" means the model will not call a function and instead generates a message.\n    /// \"auto\" means the model can pick between generating a message or calling a function. Specifying a particular function via\n    /// {\"name\": \"my_function\"} forces the model to call that function. \"none\" is the default when no functions are present. \"auto\" is\n    /// the default if functions are present.\n    public var functionCall: String?\n\n    /// A list of functions the model may generate JSON inputs for.\n    public var functions: [Function]?\n\n    /// A list of modern tools the model may call.\n    public var tools: [ChatTool]?\n\n    /// Controls which tool should be used by the model (`none`, `auto`, `required`).\n    public var toolChoice: String?\n\n    /// Structured output response format configuration.\n    public var responseFormat: ChatResponseFormat?\n\n    /// Optional deterministic seed.\n    public var seed: Int?\n\n    /// Upper bound for completion tokens.\n    public var maxCompletionTokens: Int?\n\n    /// Legacy max tokens field.\n    public var maxTokens: Int?\n\n    /// Controls whether the model can call tools in parallel.\n    public var parallelToolCalls: Bool?\n\n    /// Whether to include token log probabilities.\n    public var logprobs: Bool?\n\n    /// Number of top log probabilities to return.\n    public var topLogprobs: Int?\n\n    public init(\n        model: ChatModels,\n        customModel: String? = nil,\n        messages: [ChatMessage],\n        temperature: Double = 1.0,\n        topP: Double = 1.0,\n        numberOfCompletions: Int = 1,\n        stream: Bool = false,\n        stop: [String]? = nil,\n        presencePenalty: Double = 0.0,\n        frequencyPenalty: Double = 0.0,\n        logitBias: [String : Int]? = nil,\n        user: String? = nil,\n        functionCall: String? = nil,\n        functions: [Function]? = nil,\n        tools: [ChatTool]? = nil,\n        toolChoice: String? = nil,\n        responseFormat: ChatResponseFormat? = nil,\n        seed: Int? = nil,\n        maxCompletionTokens: Int? = nil,\n        maxTokens: Int? = nil,\n        parallelToolCalls: Bool? = nil,\n        logprobs: Bool? = nil,\n        topLogprobs: Int? = nil\n    ) {\n        self.model = model\n        self.customModel = customModel\n        self.messages = messages\n        self.temperature = temperature\n        self.topP = topP\n        self.numberOfCompletions = numberOfCompletions\n        self.stream = stream\n        self.stop = stop\n        self.presencePenalty = presencePenalty\n        self.frequencyPenalty = frequencyPenalty\n        self.logitBias = logitBias\n        self.user = user\n        self.functionCall = functionCall\n        self.functions = functions\n        self.tools = tools\n        self.toolChoice = toolChoice\n        self.responseFormat = responseFormat\n        self.seed = seed\n        self.maxCompletionTokens = maxCompletionTokens\n        self.maxTokens = maxTokens\n        self.parallelToolCalls = parallelToolCalls\n        self.logprobs = logprobs\n        self.topLogprobs = topLogprobs\n    }\n\n    public func encode(to encoder: Encoder) throws {\n        var container = encoder.container(keyedBy: CodingKeys.self)\n        let selectedModel = self.customModel ?? self.model.rawValue\n\n        try container.encode(selectedModel, forKey: .model)\n        try container.encode(self.messages, forKey: .messages)\n        try container.encode(self.temperature, forKey: .temperature)\n        try container.encode(self.topP, forKey: .topP)\n        try container.encode(self.numberOfCompletions, forKey: .numberOfCompletions)\n        try container.encode(self.stream, forKey: .stream)\n        try container.encode(self.presencePenalty, forKey: .presencePenalty)\n        try container.encode(self.frequencyPenalty, forKey: .frequencyPenalty)\n\n        try container.encodeIfPresent(self.stop, forKey: .stop)\n        try container.encodeIfPresent(self.logitBias, forKey: .logitBias)\n        try container.encodeIfPresent(self.user, forKey: .user)\n        try container.encodeIfPresent(self.functionCall, forKey: .functionCall)\n        try container.encodeIfPresent(self.functions, forKey: .functions)\n        try container.encodeIfPresent(self.tools, forKey: .tools)\n        try container.encodeIfPresent(self.toolChoice, forKey: .toolChoice)\n        try container.encodeIfPresent(self.responseFormat, forKey: .responseFormat)\n        try container.encodeIfPresent(self.seed, forKey: .seed)\n        try container.encodeIfPresent(self.maxCompletionTokens, forKey: .maxCompletionTokens)\n        try container.encodeIfPresent(self.maxTokens, forKey: .maxTokens)\n        try container.encodeIfPresent(self.parallelToolCalls, forKey: .parallelToolCalls)\n        try container.encodeIfPresent(self.logprobs, forKey: .logprobs)\n        try container.encodeIfPresent(self.topLogprobs, forKey: .topLogprobs)\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ChatResponseFormat.swift",
    "content": "import Foundation\n\n/// Response format options for chat completions.\npublic struct ChatResponseFormat: Codable {\n    public enum Kind: String, Codable {\n        case text\n        case jsonObject = \"json_object\"\n        case jsonSchema = \"json_schema\"\n    }\n\n    public var type: Kind\n\n    public init(type: Kind) {\n        self.type = type\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ChatTool.swift",
    "content": "import Foundation\n\n/// Tool definition for modern chat completions.\npublic struct ChatTool: Codable {\n    /// Tool type. Defaults to `function`.\n    public var type: String\n\n    /// Function tool payload.\n    public var function: Function\n\n    public init(type: String = \"function\", function: Function) {\n        self.type = type\n        self.function = function\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/Function.swift",
    "content": "//\n//  Function.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// A function object used within a Chat Completion endpoint.\npublic struct Function: Codable {\n    /// The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.\n    public var name: String\n\n    /// A description of what the function does, used by the model to choose when and how to call the function.\n    public var description: String?\n\n    /// The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for examples, \n    /// and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n    /// To describe a function that accepts no parameters, provide the value {\"type\": \"object\", \"properties\": {}}.\n    public var parameters: Parameters\n\n    public init(name: String, description: String? = nil, parameters: Parameters) {\n        self.name = name\n        self.description = description\n        self.parameters = parameters\n    }\n\n    internal var body: [String: Any] {\n        var result: [String: Any] = [\n            \"name\": self.name,\n            \"parameters\": self.parameters.body\n        ]\n\n        if let description = self.description {\n            result[\"description\"] = description\n        }\n\n        return result\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/Parameter.swift",
    "content": "//\n//  Parameter.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Function parameter used for Chat Completion endpoint.\npublic struct Parameters: Codable {\n    enum CodingKeys: String, CodingKey {\n        case type, properties, required\n    }\n\n    /// The variable type of the parameter\n    public var type: String\n\n    /// Parameters used within the function object call\n    public var properties: [String: Property]\n\n    /// The required parameters\n    public var required: [String]?\n\n    public init(from decoder: Decoder) throws {\n        let container = try decoder.container(keyedBy: CodingKeys.self)\n        type = try container.decode(String.self, forKey: .type)\n        properties = [:]\n        let propertiesContainer = try container.nestedContainer(keyedBy: GenericCodingKeys.self, forKey: .properties)\n\n        for key in propertiesContainer.allKeys {\n            let decodedProperty = try propertiesContainer.decode(ParameterDetail.self, forKey: key)\n            properties[key.stringValue] = decodedProperty\n        }\n\n        required = try container.decodeIfPresent([String].self, forKey: .required)\n    }\n\n    public func encode(to encoder: Encoder) throws {\n        var container = encoder.container(keyedBy: CodingKeys.self)\n        try container.encode(type, forKey: .type)\n        var propertiesContainer = container.nestedContainer(keyedBy: GenericCodingKeys.self, forKey: .properties)\n\n        for (key, value) in properties {\n            try propertiesContainer.encode(value, forKey: GenericCodingKeys(key: key))\n        }\n\n        try container.encode(required, forKey: .required)\n    }\n\n    public init(type: String, properties: [String: Property], required: [String]? = nil) {\n        self.type = type\n        self.properties = properties\n        self.required = required\n    }\n\n    internal var body: [String: Any] {\n        var result: [String: Any] = [\n            \"type\": self.type,\n            \"properties\": self.properties.body\n        ]\n\n        if let required = self.required {\n            result[\"required\"] = required\n        }\n\n        return result\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Chat/ParameterDetail.swift",
    "content": "//\n//  ParameterDetail.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// The variable used for the parameter within a Chat Completion endpoint\npublic struct ParameterDetail: Property {\n    /// The variable type of the parameter variable\n    public var type: String\n\n    /// A description of the parameter\n    public var description: String?\n\n    /// If the parameter is an enum, this is used to determine what type of cases could be used\n    public var enumValues: [String]?\n\n    enum CodingKeys: String, CodingKey {\n        case type, description\n        case enumValues = \"enum\"\n    }\n\n    public init(type: String, description: String? = nil, enumValues: [String]? = nil) {\n        self.type = type\n        self.description = description\n        self.enumValues = enumValues\n    }\n\n    public var body: [String: Any] {\n        var result: [String: Any] = [\n            \"type\": self.type,\n        ]\n\n        if let description = self.description {\n            result[\"description\"] = description\n        }\n\n        if let enumValues = self.enumValues {\n            result[\"enum\"] = enumValues\n        }\n\n        return result\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Completions/CompletionParameters.swift",
    "content": "//\n//  CompletionParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// Parameter struct used for creating GPT3 completions.\npublic struct CompletionParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case model\n        case prompt\n        case suffix\n        case maxTokens = \"max_tokens\"\n        case temperature\n        case topP = \"top_p\"\n        case numberOfCompletions = \"n\"\n        case logprobs\n        case echo\n        case stop\n        case presencePenalty = \"presence_penalty\"\n        case frequencyPenalty = \"frequency_penalty\"\n        case bestOf = \"best_of\"\n        case logitBias = \"logit_bias\"\n        case user\n        case stream\n    }\n\n    /// ID of the model to use.\n    ///\n    /// You can use the [List models](https://beta.openai.com/docs/api-reference/models/list)\n    /// API to see all of your available models, or see our [Model overview](https://beta.openai.com/docs/models/overview)\n    /// for descriptions of them.\n    public var model: CompletionModels\n\n    /// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n    ///\n    /// Note that `<|endoftext|>` is the document separator that the model sees during training, so if a prompt is not specified the\n    /// model will generate as if from the beginning of a new document.\n    public var prompt: [String]\n\n    /// The suffix that comes after a completion of inserted text.\n    public var suffix: String?\n\n    /// The maximum number of [tokens](https://beta.openai.com/tokenizer) to generate in the completion.\n    ///\n    /// The token count of your prompt plus `max_tokens` cannot exceed the model's context length. Most models have\n    /// a context length of 2048 tokens (except for the newest models, which support 4096).\n    public var maxTokens: Int\n\n    /// What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277)\n    /// to use.\n    ///\n    /// Higher values means the model will take more risks.\n    /// Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.\n    ///\n    /// We generally recommend altering this or `top_p` but not both.\n    public var temperature: Double\n\n    /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass.\n    ///\n    /// So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n    /// We generally recommend altering this or `temperature` but not both.\n    public var topP: Double\n\n    /// How many completions to generate for each prompt.\n    ///\n    /// **Note:** Because this parameter generates many completions, it can quickly consume your token quota.\n    /// Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n    public var numberOfCompletions: Int\n\n    /// Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens.\n    ///\n    /// For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens.\n    /// The API will always return the `logprob` of the sampled token,\n    /// so there may be up to `logprobs+1` elements in the response.\n    ///\n    /// The maximum value for `logprobs is 5`. If you need more than this,\n    /// please contact us through our [Help center](https://help.openai.com/) and describe your use case.\n    public var logprobs: Int?\n\n    /// Echo back the prompt in addition to the completion.\n    public var echo: Bool\n\n    /// Up to 4 sequences where the API will stop generating further tokens.\n    /// The returned text will not contain the stop sequence.\n    public var stop: [String]?\n\n    /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far,\n    /// increasing the model's likelihood to talk about new topics.\n    ///\n    /// [See more information about frequency and presence penalties.](https://beta.openai.com/docs/api-reference/parameter-details)\n    public var presencePenalty: Double\n\n    /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far,\n    /// decreasing the model's likelihood to repeat the same line verbatim.\n    ///\n    /// [See more information about frequency and presence penalties.](https://beta.openai.com/docs/api-reference/parameter-details)\n    public var frequencyPenalty: Double\n\n    /// Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n    /// When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n    ///\n    /// **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for\n    /// `max_tokens` and `stop`.\n    public var bestOf: Int\n\n    /// Modify the likelihood of specified tokens appearing in the completion.\n    ///\n    /// Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100.\n    /// You can use this [tokenizer tool](https://beta.openai.com/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs.\n    /// Mathematically, the bias is added to the logits generated by the model prior to sampling.\n    /// The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;\n    /// values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n    ///\n    /// As an example, you can pass `{\"50256\": -100}` to prevent the `<|endoftext|>` token from being generated.\n    public var logitBias: [String: Int]?\n\n    /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n    /// [Learn more.](https://beta.openai.com/docs/guides/safety-best-practices/end-user-ids)\n    public var user: String?\n\n    /// Whether to stream partial completion deltas.\n    public var stream: Bool?\n\n    public init(\n        model: CompletionModels,\n        prompt: [String] = [\"<|endoftext|>\"],\n        suffix: String? = nil,\n        maxTokens: Int = 16,\n        temperature: Double = 1.0,\n        topP: Double = 1.0,\n        @Clamped(range: 1...10) numberOfCompletions: Int = 1,\n        logprobs: Int? = nil,\n        maxLogprobs: Int = 5,\n        echo: Bool = false,\n        stop: [String]? = nil,\n        @Clamped(range: -2.0...2.0) presencePenalty: Double = 0.0,\n        @Clamped(range: -2.0...2.0) frequencyPenalty: Double = 0.0,\n        bestOf: Int = 1,\n        logitBias: [String: Int]? = nil,\n        user: String? = nil,\n        stream: Bool? = nil\n    ) {\n        self.model = model\n        self.prompt = prompt\n        self.suffix = suffix\n        self.maxTokens = maxTokens\n        self.temperature = temperature\n        self.topP = topP\n        self.numberOfCompletions = numberOfCompletions\n        self.echo = echo\n        self.stop = stop\n        self.presencePenalty = presencePenalty\n        self.frequencyPenalty = frequencyPenalty\n        self.bestOf = bestOf\n        self.logitBias = logitBias\n        self.user = user\n        self.stream = stream\n\n        if let logprobs = logprobs {\n            if logprobs > maxLogprobs {\n                self.logprobs = maxLogprobs\n            } else if logprobs < 1 {\n                self.logprobs = 1\n            } else {\n                self.logprobs = logprobs\n            }\n        } else {\n            self.logprobs = nil\n        }\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Containers/ContainerParameters.swift",
    "content": "import Foundation\n\npublic struct ContainerCreateParameters: Encodable {\n    public var name: String\n    public var metadata: [String: String]?\n\n    public init(name: String, metadata: [String: String]? = nil) {\n        self.name = name\n        self.metadata = metadata\n    }\n}\n\npublic struct ContainerFileCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case fileID = \"file_id\"\n    }\n\n    public var fileID: String\n\n    public init(fileID: String) {\n        self.fileID = fileID\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Conversations/ConversationParameters.swift",
    "content": "import Foundation\n\npublic struct ConversationCreateParameters: Encodable {\n    public var metadata: [String: String]?\n\n    public init(metadata: [String: String]? = nil) {\n        self.metadata = metadata\n    }\n}\n\npublic struct ConversationItemCreateParameters: Encodable {\n    public var type: String\n    public var role: String?\n    public var content: String\n\n    public init(type: String = \"message\", role: String? = nil, content: String) {\n        self.type = type\n        self.role = role\n        self.content = content\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Embeddings/EmbeddingsParameters.swift",
    "content": "//\n//  EmbeddingsParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// Parameter used for the Embeddings endpoint.\npublic struct EmbeddingsParameters: Encodable {\n    /// ID of the model to use.\n    ///\n    /// You can use the [List models](https://beta.openai.com/docs/api-reference/models/list)\n    /// API to see all of your available models, or see our [Model overview](https://beta.openai.com/docs/models/overview)\n    /// for descriptions of them.\n    public var model: String\n\n    /// Input text to get embeddings for, encoded as a string or array of tokens.\n    ///\n    /// To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays.\n    /// Each input must not exceed 2048 tokens in length.\n    ///\n    /// Unless you are embedding code, we suggest replacing newlines (`\\n`) in your input with a single space,\n    /// as we have observed inferior results when newlines are present.\n    public var input: String\n\n    /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n    /// [Learn more.](https://beta.openai.com/docs/guides/safety-best-practices/end-user-ids)\n    public var user: String?\n\n    public init(\n        model: String = \"text-embedding-ada-002\",\n        input: String,\n        user: String? = nil\n    ) {\n        self.model = model\n        self.input = input\n        self.user = user\n    }\n\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Evals/EvalParameters.swift",
    "content": "import Foundation\n\npublic struct EvalCreateParameters: Encodable {\n    public var name: String\n    public var metadata: [String: String]?\n\n    public init(name: String, metadata: [String: String]? = nil) {\n        self.name = name\n        self.metadata = metadata\n    }\n}\n\npublic struct EvalRunCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case input\n        case model\n        case metadata\n    }\n\n    public var input: String\n    public var model: String?\n    public var metadata: [String: String]?\n\n    public init(input: String, model: String? = nil, metadata: [String: String]? = nil) {\n        self.input = input\n        self.model = model\n        self.metadata = metadata\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Files/UploadFileParameters.swift",
    "content": "//\n//  UploadFileParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Parameter used for uploading files.\npublic struct UploadFileParameters {\n    /// Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.\n    ///\n    /// If the `purpose` is set to \"fine-tune\", each line is a JSON record with \"prompt\" and \"completion\" fields\n    /// representing your [training examples](https://beta.openai.com/docs/guides/fine-tuning/prepare-training-data).\n    public var file: FormData\n\n    /// The intended purpose of the uploaded documents.\n    ///\n    /// Use \"fine-tune\" for [Fine-tuning](https://beta.openai.com/docs/api-reference/fine-tunes).\n    /// This allows us to validate the format of the uploaded file.\n    public var purpose: String\n\n    public init(\n        file: Data,\n        fileName: String,\n        purpose: String\n    ) {\n        self.file = FormData(data: file, mimeType: \"application/octet-stream\", fileName: fileName)\n        self.purpose = purpose\n    }\n\n    internal var body: [String: Any] {\n        return [\"file\": self.file, \"purpose\": self.purpose]\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/FineTuning/FineTuningParameters.swift",
    "content": "import Foundation\n\npublic struct FineTuningJobCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case model\n        case trainingFileID = \"training_file\"\n        case validationFileID = \"validation_file\"\n        case suffix\n    }\n\n    public var model: String\n    public var trainingFileID: String\n    public var validationFileID: String?\n    public var suffix: String?\n\n    public init(\n        model: String,\n        trainingFileID: String,\n        validationFileID: String? = nil,\n        suffix: String? = nil\n    ) {\n        self.model = model\n        self.trainingFileID = trainingFileID\n        self.validationFileID = validationFileID\n        self.suffix = suffix\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Images/ImageEditParameters.swift",
    "content": "//\n//  ImageEditParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)\nimport SwiftUI\n#endif\n\n#if os(macOS)\nimport Foundation\nimport AppKit\n#endif\n\n#if os(Linux) || SERVER\nimport Foundation\n#endif\n\n/// Parameter used for creating image edits\npublic struct ImageEditParameters {\n    /// The image to edit.\n    ///\n    /// Must be a valid PNG file, less than 4MB, and square. If mask is not provided,\n    /// image must have transparency, which will be used as the mask.\n    public var image: FormData\n\n    /// An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited.\n    ///\n    /// Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.\n    public var mask: FormData\n\n    /// A text description of the desired image(s).\n    ///\n    /// The maximum length is 1000 characters.\n    public var prompt: String\n\n    /// The number of images to generate.\n    ///\n    /// Must be between 1 and 10.\n    public var numberOfImages: Int\n\n    /// The size of the generated images.\n    ///\n    /// Must be one of `.small`, `.medium`, or `.large`.\n    public var resolution: ImageResolutions\n\n    /// The format in which the generated images are returned.\n    ///\n    /// Must be one of `url` or `b64_json`.\n    public var responseFormat: ResponseFormat\n\n    /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n    /// [Learn more.](https://beta.openai.com/docs/guides/safety-best-practices/end-user-ids)\n    public var user: String?\n\n    public init(\n        image: Data,\n        mask: Data,\n        prompt: String,\n        @Clamped(range: 1...10) numberOfImages: Int = 1,\n        resolution: ImageResolutions = .large,\n        responseFormat: ResponseFormat = .url,\n        user: String? = nil\n    ) throws {\n        self.image = FormData(data: image, mimeType: \"image/png\", fileName: \"image.png\")\n        self.mask = FormData(data: mask, mimeType: \"image/png\", fileName: \"mask.png\")\n        self.prompt = prompt\n        self.numberOfImages = numberOfImages\n        self.resolution = resolution\n        self.responseFormat = responseFormat\n        self.user = user\n    }\n\n    #if os(iOS) || os(tvOS) || os(watchOS)\n    public init(\n        image: UIImage,\n        mask: UIImage,\n        prompt: String,\n        @Clamped(range: 1...10) numberOfImages: Int = 1,\n        resolution: ImageResolutions = .large,\n        responseFormat: ResponseFormat = .url,\n        user: String? = nil\n    ) throws {\n        do {\n            guard let imageData = image.pngData() else { throw OpenAIError.invalidData }\n            guard let maskData = mask.pngData() else { throw OpenAIError.invalidData }\n\n            self.image = FormData(data: imageData, mimeType: \"image/png\", fileName: \"image.png\")\n            self.mask = FormData(data: maskData, mimeType: \"image/png\", fileName: \"mask.png\")\n            self.prompt = prompt\n            self.numberOfImages = numberOfImages\n            self.resolution = resolution\n            self.responseFormat = responseFormat\n            self.user = user\n        } catch {\n            throw OpenAIError.invalidData\n        }\n    }\n    #endif\n\n    #if os(macOS)\n    public init(\n        image: NSImage,\n        mask: NSImage,\n        prompt: String,\n        @Clamped(range: 1...10) numberOfImages: Int = 1,\n        resolution: ImageResolutions = .large,\n        responseFormat: ResponseFormat = .url,\n        user: String? = nil\n    ) throws {\n        do {\n            guard let imageData = image.pngData(size: resolution) else { throw OpenAIError.invalidData }\n            guard let maskData = mask.pngData(size: resolution) else { throw OpenAIError.invalidData }\n\n            self.image = FormData(data: imageData, mimeType: \"image/png\", fileName: \"image.png\")\n            self.mask = FormData(data: maskData, mimeType: \"image/png\", fileName: \"mask.png\")\n            self.prompt = prompt\n            self.numberOfImages = numberOfImages\n            self.resolution = resolution\n            self.responseFormat = responseFormat\n            self.user = user\n        } catch {\n            throw OpenAIError.invalidData\n        }\n    }\n    #endif\n\n    /// The body of the URL used for OpenAI API requests.\n    internal var body: [String: Any] {\n        var result: [String: Any] = [\n            \"image\": self.image,\n            \"mask\": self.mask,\n            \"prompt\": self.prompt,\n            \"n\": self.numberOfImages,\n            \"size\": self.resolution.rawValue,\n            \"response_format\": self.responseFormat.rawValue\n        ]\n        if let user = self.user {\n            result[\"user\"] = user\n        }\n\n        return result\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Images/ImageParameters.swift",
    "content": "//\n//  ImageParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// Parameter used for generating images given a prompt.\npublic struct ImageParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case prompt\n        case numberOfImages = \"n\"\n        case resolution = \"size\"\n        case quality\n        case model\n        case style\n        case responseFormat = \"response_format\"\n        case user\n    }\n    /// A text description of the desired image(s).\n    ///\n    /// The maximum length is 1000 characters.\n    public var prompt: String\n\n    /// The number of images to generate.\n    ///\n    /// Must be between 1 and 10.\n    public var numberOfImages: Int\n\n    /// The size of the generated images.\n    ///\n    /// Must be one of `.small`, `.medium`, `.large` for `.dalle2`. Must be one of `.large`, `.extraLargeLandscape`, or `.extraLargePortrait` for `.dalle3`.\n    public var resolution: ImageResolutions\n\n    /// The quality of the image that will be generated.\n    ///\n    /// `hd` creates images with finer details and greater consistency across the image.\n    ///\n    /// **Note:** This param is only supported for dall-e-3.\n    public var quality: ImageQuality?\n\n    /// The model to use for image generation.\n    public var model: ImageModel\n\n    /// The style of the generated images.\n    ///\n    /// Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.\n    ///\n    /// **Note:** This param is only supported for dall-e-3.\n    public var style: ImageStyle?\n\n    /// The format in which the generated images are returned.\n    ///\n    /// Must be one of `url` or `b64_json`.\n    public var responseFormat: ResponseFormat\n\n    /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n    /// [Learn more.](https://beta.openai.com/docs/guides/safety-best-practices/end-user-ids)\n    public var user: String?\n\n    public init(\n        prompt: String,\n        @Clamped(range: 1...10) numberofImages: Int = 1,\n        resolution: ImageResolutions = .large,\n        quality: ImageQuality? = nil,\n        style: ImageStyle? = nil,\n        model: ImageModel = .dalle2,\n        responseFormat: ResponseFormat = .url,\n        user: String? = nil\n    ) {\n        self.prompt = prompt\n        self.numberOfImages = numberofImages\n        self.resolution = resolution\n        self.quality = quality\n        self.style = style\n        self.model = model\n        self.responseFormat = responseFormat\n        self.user = user\n    }\n\n    /// Checks to verify that the user hasn't inputted any incorrect parameters for the endpoint.\n    /// - Throws: An `OpenAIError` if any of the parameters are incompatible with the inputted model.\n    internal func checkForCompatibility() throws {\n        switch self.model {\n        case .dalle2:\n            guard self.prompt.count <= 1_000 else { throw OpenAIError.incompatibleImageParameter(incorrctInput: self.prompt) }\n            guard self.quality == nil else { throw OpenAIError.incompatibleImageParameter(incorrctInput: self.quality) }\n            guard self.style == nil else { throw OpenAIError.incompatibleImageParameter(incorrctInput: self.style) }\n            guard \n                self.resolution == .small ||\n                self.resolution == .medium ||\n                self.resolution == .large\n            else { throw OpenAIError.incompatibleImageParameter(incorrctInput: self.resolution) }\n        case .dalle3:\n            guard self.prompt.count <= 4_000 else { throw OpenAIError.incompatibleImageParameter(incorrctInput: self.prompt) }\n            guard self.numberOfImages == 1 else { throw OpenAIError.incompatibleImageParameter(incorrctInput: self.numberOfImages) }\n            guard\n                self.resolution == .large ||\n                self.resolution == .extraLargePortrait ||\n                self.resolution == .extraLargeLandscape\n            else { throw OpenAIError.incompatibleImageParameter(incorrctInput: self.resolution) }\n        }\n    }\n\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Images/ImageVariationParameters.swift",
    "content": "//\n//  ImageVariationParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)\nimport SwiftUI\n#endif\n\n#if os(macOS)\nimport Foundation\nimport AppKit\n#endif\n\n#if os(Linux) || SERVER\nimport Foundation\n#endif\n\n/// Parameter struct used for generating image variation(s).\npublic struct ImageVariationParameters {\n    /// The image to use as the basis for the variation(s).\n    ///\n    /// Must be a valid PNG file, less than 4MB, and square.\n    public var image: FormData\n\n    /// The number of images to generate.\n    ///\n    /// Must be between 1 and 10.\n    public var numberOfImages: Int\n\n    /// The size of the generated images.\n    ///\n    /// Must be one of `.small`, `.medium`, or `.large`.\n    public var resolution: ImageResolutions\n\n    /// The format in which the generated images are returned.\n    ///\n    /// Must be one of `url` or `b64_json`.\n    public var responseFormat: ResponseFormat\n\n    /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.\n    /// [Learn more.](https://beta.openai.com/docs/guides/safety-best-practices/end-user-ids)\n    public var user: String?\n\n    public init(\n        imageData: Data,\n        @Clamped(range: 1...10) numberOfImages: Int = 1,\n        resolution: ImageResolutions = .large,\n        responseFormat: ResponseFormat = .url,\n        user: String? = nil\n    ) throws {\n        self.image = FormData(data: imageData, mimeType: \"image/png\", fileName: \"image.png\")\n        self.numberOfImages = numberOfImages\n        self.resolution = resolution\n        self.responseFormat = responseFormat\n        self.user = user\n    }\n\n    #if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)\n    public init(\n        image: UIImage,\n        @Clamped(range: 1...10) numberOfImages: Int = 1,\n        resolution: ImageResolutions = .large,\n        responseFormat: ResponseFormat = .url,\n        user: String? = nil\n    ) throws {\n        do {\n            guard let imageData = image.pngData() else { throw OpenAIError.invalidData }\n\n            self.image = FormData(data: imageData, mimeType: \"image/png\", fileName: \"image.png\")\n            self.numberOfImages = numberOfImages\n            self.resolution = resolution\n            self.responseFormat = responseFormat\n            self.user = user\n        } catch {\n            throw OpenAIError.invalidData\n        }\n    }\n    #endif\n\n    #if os(macOS)\n    public init(\n        image: NSImage,\n        @Clamped(range: 1...10) numberOfImages: Int = 1,\n        resolution: ImageResolutions = .large,\n        responseFormat: ResponseFormat = .url,\n        user: String? = nil\n    ) throws {\n        do {\n            guard let imageData = image.pngData(size: resolution) else { throw OpenAIError.invalidData }\n\n            self.image = FormData(data: imageData, mimeType: \"image/png\", fileName: \"image.png\")\n            self.numberOfImages = numberOfImages\n            self.resolution = resolution\n            self.responseFormat = responseFormat\n            self.user = user\n        } catch {\n            throw OpenAIError.invalidData\n        }\n    }\n    #endif\n\n    /// The body of the URL used for OpenAI API requests.\n    internal var body: [String: Any] {\n        var result: [String: Any] = [\n            \"image\": self.image,\n            \"n\": self.numberOfImages,\n            \"size\": self.resolution.rawValue,\n            \"response_format\": self.responseFormat.rawValue\n        ]\n        if let user = self.user {\n            result[\"user\"] = user\n        }\n\n        return result\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Moderations/ConentPolicyParameters.swift",
    "content": "//\n//  ContentPolicyParameters.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The parameter struct used for the Moderations endpoint\npublic struct ContentPolicyParameters {\n    /// The input text to classify.\n    public var input: String\n\n    /// Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n    ///\n    /// The default is `text-moderation-latest` which will be automatically upgraded over time.\n    /// This ensures you are always using our most accurate model. If you use `text-moderation-stable`,\n    /// we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable`\n    /// may be slightly lower than for `text-moderation-latest`.\n    public var model: ContentPolicyModels\n\n    public init(\n        input: String,\n        model: ContentPolicyModels = .latest\n    ) {\n        self.input = input\n        self.model = model\n    }\n\n    /// The body of the URL used for OpenAI API requests.\n    internal var body: [String: Any] {\n        return [\"input\": self.input, \"model\": self.model.rawValue]\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Realtime/RealtimeParameters.swift",
    "content": "import Foundation\n\npublic struct RealtimeCallCreateParameters: Encodable {\n    public var model: String?\n    public var metadata: [String: String]?\n\n    public init(model: String? = nil, metadata: [String: String]? = nil) {\n        self.model = model\n        self.metadata = metadata\n    }\n}\n\npublic struct RealtimeCallReferParameters: Encodable {\n    public var target: String\n    public var reason: String?\n\n    public init(target: String, reason: String? = nil) {\n        self.target = target\n        self.reason = reason\n    }\n}\n\npublic struct RealtimeClientSecretCreateParameters: Encodable {\n    public var model: String?\n    public var voice: String?\n\n    public init(model: String? = nil, voice: String? = nil) {\n        self.model = model\n        self.voice = voice\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Responses/ResponseParameters.swift",
    "content": "import Foundation\n\npublic struct ResponseCreateParameters: Encodable {\n    public var model: String\n    public var input: String\n    public var instructions: String?\n    public var stream: Bool?\n    public var metadata: [String: String]?\n\n    public init(\n        model: String,\n        input: String,\n        instructions: String? = nil,\n        stream: Bool? = nil,\n        metadata: [String: String]? = nil\n    ) {\n        self.model = model\n        self.input = input\n        self.instructions = instructions\n        self.stream = stream\n        self.metadata = metadata\n    }\n}\n\npublic struct ResponseInputTokensParameters: Encodable {\n    public var model: String\n    public var input: String\n\n    public init(model: String, input: String) {\n        self.model = model\n        self.input = input\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Skills/SkillParameters.swift",
    "content": "import Foundation\n\npublic struct SkillCreateParameters: Encodable {\n    public var name: String\n    public var description: String?\n    public var metadata: [String: String]?\n\n    public init(name: String, description: String? = nil, metadata: [String: String]? = nil) {\n        self.name = name\n        self.description = description\n        self.metadata = metadata\n    }\n}\n\npublic struct SkillUpdateParameters: Encodable {\n    public var name: String?\n    public var description: String?\n    public var metadata: [String: String]?\n\n    public init(name: String? = nil, description: String? = nil, metadata: [String: String]? = nil) {\n        self.name = name\n        self.description = description\n        self.metadata = metadata\n    }\n}\n\npublic struct SkillContentUpdateParameters: Encodable {\n    public var content: String\n\n    public init(content: String) {\n        self.content = content\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Uploads/UploadParameters.swift",
    "content": "import Foundation\n\npublic struct UploadCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case bytes\n        case filename\n        case purpose\n        case mimeType = \"mime_type\"\n    }\n\n    public var bytes: Int\n    public var filename: String\n    public var purpose: String\n    public var mimeType: String?\n\n    public init(bytes: Int, filename: String, purpose: String, mimeType: String? = nil) {\n        self.bytes = bytes\n        self.filename = filename\n        self.purpose = purpose\n        self.mimeType = mimeType\n    }\n}\n\npublic struct UploadCompleteParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case partIDs = \"part_ids\"\n    }\n\n    public var partIDs: [String]\n\n    public init(partIDs: [String]) {\n        self.partIDs = partIDs\n    }\n}\n\npublic struct UploadPartCreateParameters: Encodable {\n    public var data: String\n\n    public init(data: String) {\n        self.data = data\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/VectorStores/VectorStoreParameters.swift",
    "content": "import Foundation\n\npublic struct VectorStoreCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case name\n        case fileIDs = \"file_ids\"\n        case metadata\n    }\n\n    public var name: String?\n    public var fileIDs: [String]?\n    public var metadata: [String: String]?\n\n    public init(name: String? = nil, fileIDs: [String]? = nil, metadata: [String: String]? = nil) {\n        self.name = name\n        self.fileIDs = fileIDs\n        self.metadata = metadata\n    }\n}\n\npublic struct VectorStoreUpdateParameters: Encodable {\n    public var name: String?\n    public var metadata: [String: String]?\n\n    public init(name: String? = nil, metadata: [String: String]? = nil) {\n        self.name = name\n        self.metadata = metadata\n    }\n}\n\npublic struct VectorStoreFileCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case fileID = \"file_id\"\n    }\n\n    public var fileID: String\n\n    public init(fileID: String) {\n        self.fileID = fileID\n    }\n}\n\npublic struct VectorStoreFileBatchCreateParameters: Encodable {\n    enum CodingKeys: String, CodingKey {\n        case fileIDs = \"file_ids\"\n    }\n\n    public var fileIDs: [String]\n\n    public init(fileIDs: [String]) {\n        self.fileIDs = fileIDs\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Parameters/Videos/VideoParameters.swift",
    "content": "import Foundation\n\npublic struct VideoCreateParameters: Encodable {\n    public var model: String\n    public var prompt: String\n\n    public init(model: String, prompt: String) {\n        self.model = model\n        self.prompt = prompt\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Audio/TranscriptionResponse.swift",
    "content": "//\n//  TranscriptionResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\npublic struct TranscriptionResponse: Codable {\n    /// The text content of the transcription\n    public let text: String?\n\n    /// What type of task was performed (transcribe or translate)\n    public let task: String?\n\n    /// What language was the audio in\n    public let language: String?\n\n    /// The duration of the audio source\n    public let duration: Double?\n\n    /// Transcription details on each sentence\n    public let segments: [TranscriptionSegment]?\n\n    /// The WebVTT formatted text\n    public let vtt: [WebVTTCue]?\n\n    /// The SRT formatted text\n    public let srt: [SRT]?\n\n    public init(\n        text: String? = nil,\n        task: String? = nil,\n        language: String? = nil,\n        duration: Double? = nil,\n        segments: [TranscriptionSegment]? = nil,\n        vtt: [WebVTTCue]? = nil,\n        srt: [SRT]? = nil\n    ) {\n        self.text = text\n        self.task = task\n        self.language = language\n        self.duration = duration\n        self.segments = segments\n        self.vtt = vtt\n        self.srt = srt\n    }\n}\n\npublic struct TranscriptionSegment: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case seek\n        case start\n        case end\n        case text\n        case tokens\n        case temperature\n        case averageLogprob = \"avg_logprob\"\n        case compressionRatio = \"compression_ratio\"\n        case noSpeechProb = \"no_speech_prob\"\n    }\n\n    public let id: Int\n    public let seek: Int\n    public let start: Double\n    public let end: Double\n    public let text: String\n    public let tokens: [Int]\n    public let temperature: Double\n    public let averageLogprob: Double\n    public let compressionRatio: Double\n    public let noSpeechProb: Double\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Batches/BatchModels.swift",
    "content": "import Foundation\n\npublic struct BatchObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case endpoint\n        case inputFileID = \"input_file_id\"\n        case completionWindow = \"completion_window\"\n        case status\n        case createdAt = \"created_at\"\n        case outputFileID = \"output_file_id\"\n        case errorFileID = \"error_file_id\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let endpoint: String?\n    public let inputFileID: String?\n    public let completionWindow: String?\n    public let status: String?\n    public let createdAt: Int?\n    public let outputFileID: String?\n    public let errorFileID: String?\n}\n\npublic struct BatchListResponse: Codable {\n    public let object: String\n    public let data: [BatchObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Beta/AssistantModels.swift",
    "content": "import Foundation\n\npublic struct AssistantTool: Codable {\n    public var type: String\n\n    public init(type: String) {\n        self.type = type\n    }\n}\n\npublic struct AssistantObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case name\n        case description\n        case model\n        case instructions\n        case tools\n        case metadata\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let name: String?\n    public let description: String?\n    public let model: String\n    public let instructions: String?\n    public let tools: [AssistantTool]?\n    public let metadata: [String: String]?\n}\n\npublic struct AssistantListResponse: Codable {\n    public let object: String\n    public let data: [AssistantObject]\n}\n\npublic struct ThreadObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case metadata\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let metadata: [String: String]?\n}\n\npublic struct ThreadListResponse: Codable {\n    public let object: String\n    public let data: [ThreadObject]\n}\n\npublic struct ThreadRunObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case status\n        case model\n        case assistantId = \"assistant_id\"\n        case threadId = \"thread_id\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let status: String?\n    public let model: String?\n    public let assistantId: String?\n    public let threadId: String?\n}\n\npublic struct ThreadRunListResponse: Codable {\n    public let object: String\n    public let data: [ThreadRunObject]\n}\n\npublic struct ThreadRunStepObject: Codable {\n    public let id: String\n    public let object: String?\n    public let type: String?\n    public let status: String?\n}\n\npublic struct ThreadRunStepListResponse: Codable {\n    public let object: String\n    public let data: [ThreadRunStepObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Chat/ChatResponse.swift",
    "content": "//\n//  ChatResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\npublic struct ChatResponse: Codable, Identifiable, Sendable {\n    /// The ID of the Completion\n    public let id: String\n\n    /// The `OpenAIObject` type of the Completion\n    public let object: OpenAIObject\n\n    /// The creation date of the Completion\n    public let created: Int\n\n    /// The output of choices the `model` made.\n    public let choices: [ChatChoice]\n\n    /// The token usage of the Completion.\n    public let usage: Usage?\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Completions/CompletionResponse.swift",
    "content": "//\n//  CompletionResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// Completion Response from OpenAI\npublic struct CompletionResponse: Codable, Identifiable, Sendable {\n    /// The ID of the Completion\n    public let id: String\n\n    /// The `OpenAIObject` type of the Completion\n    public let object: OpenAIObject\n\n    /// The creation date of the Completion\n    public let created: Int\n\n    /// The model used for the Completion.\n    public let model: String\n\n    /// The output of choices the `model` made.\n    public let choices: [Choice]\n\n    /// The token usage of the Completion.\n    public let usage: Usage\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Containers/ContainerModels.swift",
    "content": "import Foundation\n\npublic struct ContainerObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case name\n        case status\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let name: String?\n    public let status: String?\n    public let createdAt: Int?\n}\n\npublic struct ContainerListResponse: Codable {\n    public let object: String\n    public let data: [ContainerObject]\n}\n\npublic struct ContainerFileObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case filename\n        case bytes\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let filename: String?\n    public let bytes: Int?\n    public let createdAt: Int?\n}\n\npublic struct ContainerFileListResponse: Codable {\n    public let object: String\n    public let data: [ContainerFileObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Conversations/ConversationModels.swift",
    "content": "import Foundation\n\npublic struct ConversationObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case metadata\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let metadata: [String: String]?\n}\n\npublic struct ConversationListResponse: Codable {\n    public let object: String\n    public let data: [ConversationObject]\n}\n\npublic struct ConversationItemObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case type\n        case role\n        case content\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let type: String?\n    public let role: String?\n    public let content: String?\n    public let createdAt: Int?\n}\n\npublic struct ConversationItemListResponse: Codable {\n    public let object: String\n    public let data: [ConversationItemObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Embeddings/EmbeddingsData.swift",
    "content": "//\n//  EmbeddingsData.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// Contains the raw embeddings for the Embeddings endpoint\npublic struct EmbeddingsData: Codable {\n    /// The `OpenAIObject` object type of the Embeddings\n    public let object: OpenAIObject\n\n    /// The embeddings themselves\n    public let embedding: [Double]\n\n    /// The index of the embedding object within the data array.\n    public let index: Int\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Embeddings/EmbeddingsResponse.swift",
    "content": "//\n//  EmbeddingsResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The response sent by the Embeddings endpoint.\npublic struct EmbeddingsResponse: Codable {\n    /// The `OpenAIObject` object type of this response.\n    public let object: OpenAIObject\n\n    /// The parameter containing the embedding data.\n    public let data: [EmbeddingsData]\n\n    /// The model used to generate the embeddings.\n    public let model: String\n\n    /// The amount of tokens used by the embeddings.\n    public let usage: EmbeddingsUsage\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Embeddings/EmbeddingsUsage.swift",
    "content": "//\n//  EmbeddingsUsage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The token usage of the Embeddings endpoint.\npublic struct EmbeddingsUsage: Codable {\n    enum CodingKeys: String, CodingKey {\n        case promptTokens = \"prompt_tokens\"\n        case totalTokens = \"total_tokens\"\n    }\n\n    /// The amount of tokens used by the prompt.\n    public let promptTokens: Int\n\n    /// The total amount of tokens used.\n    public let totalTokens: Int\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Evals/EvalModels.swift",
    "content": "import Foundation\n\npublic struct EvalObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case name\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let name: String?\n    public let createdAt: Int?\n}\n\npublic struct EvalListResponse: Codable {\n    public let object: String\n    public let data: [EvalObject]\n}\n\npublic struct EvalRunObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case status\n        case evalID = \"eval_id\"\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let status: String?\n    public let evalID: String?\n    public let createdAt: Int?\n}\n\npublic struct EvalRunListResponse: Codable {\n    public let object: String\n    public let data: [EvalRunObject]\n}\n\npublic struct EvalRunOutputItem: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case type\n    }\n\n    public let id: String\n    public let object: String?\n    public let type: String?\n}\n\npublic struct EvalRunOutputItemListResponse: Codable {\n    public let object: String\n    public let data: [EvalRunOutputItem]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Files/File.swift",
    "content": "//\n//  File.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\n/// The file object used to read file information from the Files endpoint.\npublic struct File: Codable, Identifiable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case bytes\n        case createdAt = \"created_at\"\n        case filename\n        case purpose\n        case status\n        case statusDetails = \"status_details\"\n    }\n\n    /// The ID of the file.\n    public let id: String\n\n    /// The `OpenAIObject` object type of the file.\n    public let object: OpenAIObject\n\n    /// The amount of storage the file takes up in bytes.\n    public let bytes: Int\n\n    /// The creation date of the file.\n    public let createdAt: Int\n\n    /// The file's name.\n    public let filename: String\n\n    /// The purpose the file has.\n    public let purpose: String\n\n    /// The upload status of the file.\n    public let status: FileStatus?\n\n    /// The status detail when uploading the file.\n    public let statusDetails: String?\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Files/FileContent.swift",
    "content": "//\n//  FileContent.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The struct representing each data point within a training file.\npublic struct FileContent: Codable {\n    /// The input the user would give to the model\n    public let prompt: String\n\n    /// The training parameter the model will learn to match from the prompt.\n    public let completion: String\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Files/ListFilesResponse.swift",
    "content": "//\n//  ListFilesResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The response object sent by the File endpoint\npublic struct ListFilesResponse: Codable {\n    /// The `OpenAIObject` type of the response.\n    public let object: OpenAIObject\n\n    /// The array of files sent from the server.\n    public let data: [File]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/FineTuning/FineTuningModels.swift",
    "content": "import Foundation\n\npublic struct FineTuningJobObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case model\n        case status\n        case createdAt = \"created_at\"\n        case fineTunedModel = \"fine_tuned_model\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let model: String?\n    public let status: String?\n    public let createdAt: Int?\n    public let fineTunedModel: String?\n}\n\npublic struct FineTuningJobListResponse: Codable {\n    public let object: String\n    public let data: [FineTuningJobObject]\n}\n\npublic struct FineTuningJobEvent: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case level\n        case message\n    }\n\n    public let id: String?\n    public let object: String?\n    public let createdAt: Int?\n    public let level: String?\n    public let message: String?\n}\n\npublic struct FineTuningJobEventListResponse: Codable {\n    public let object: String\n    public let data: [FineTuningJobEvent]\n}\n\npublic struct FineTuningCheckpointObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case fineTunedModelCheckpoint = \"fine_tuned_model_checkpoint\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let fineTunedModelCheckpoint: String?\n}\n\npublic struct FineTuningCheckpointListResponse: Codable {\n    public let object: String\n    public let data: [FineTuningCheckpointObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Images/ImageResponse.swift",
    "content": "//\n//  ImageResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The struct sent by the Images Endpoint\npublic struct ImageResponse: Codable {\n    /// The creation date of the response.\n    public let created: Int\n\n    /// The data sent within the response containing either `URL` or `Base64` data.\n    public let data: [ImageData]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Models/ListModelResponse.swift",
    "content": "//\n//  ListModelResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The struct sent by the List Models Endpoint\npublic struct ListModelResponse: Codable {\n    /// The `OpenAIObject` object type of the response.\n    public let object: OpenAIObject\n\n    /// The array of models that OpenAI has for use.\n    public let data: [Model]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Models/Model.swift",
    "content": "//\n//  Model.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The GPT3 models used for text and code completions.\npublic struct Model: Codable, Identifiable {\n    enum CodingKeys: String, CodingKey {\n        case id, object, created\n        case ownedBy = \"owned_by\"\n    }\n\n    /// The ID of the model.\n    public let id: String\n\n    /// The `OpenAIObject` object type of the model.\n    public let object: OpenAIObject\n\n    /// The creation date of the model.\n    public let created: Int\n\n    /// The owner of the model.\n    public let ownedBy: String\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyCategories.swift",
    "content": "//\n//  ContentPolicyCategories.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The categories flagged by the Moderations endpoint.\npublic struct ContentPolicyCategories: Codable {\n    enum CodingKeys: String, CodingKey {\n        case hate\n        case hateWithThreatening = \"hate/threatening\"\n        case selfHarm = \"self-harm\"\n        case sexual\n        case sexualWithMinors = \"sexual/minors\"\n        case violence\n        case violenceWithGraphic = \"violence/graphic\"\n    }\n\n    /// Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion,\n    /// nationality, sexual orientation, disability status, or caste.\n    public let hate: Bool\n\n    /// Hateful content that also includes violence or serious harm towards the targeted group.\n    public let hateWithThreatening: Bool\n\n    /// Content that promotes, encourages, or depicts acts of self-harm, such as suicide,\n    /// cutting, and eating disorders.\n    public let selfHarm: Bool\n\n    /// Content meant to arouse sexual excitement, such as the description of sexual activity,\n    /// or that promotes sexual services (excluding sex education and wellness).\n    public let sexual: Bool\n\n    /// Sexual content that includes an individual who is under 18 years old.\n    public let sexualWithMinors: Bool\n\n    /// Content that promotes or glorifies violence or celebrates the suffering or\n    /// humiliation of others.\n    public let violence: Bool\n\n    /// Violent content that depicts death, violence, or serious physical injury in\n    /// extreme graphic detail.\n    public let violenceWithGraphic: Bool\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyCategoryScore.swift",
    "content": "//\n//  ContentPolicyCategoryScore.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The moderation score amount associated with a prompt.\npublic struct ContentPolicyCategoryScore: Codable {\n    enum CodingKeys: String, CodingKey {\n        case hate\n        case hateWithThreatening = \"hate/threatening\"\n        case selfHarm = \"self-harm\"\n        case sexual\n        case sexualWithMinors = \"sexual/minors\"\n        case violence\n        case violenceWithGraphic = \"violence/graphic\"\n    }\n\n    /// Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion,\n    /// nationality, sexual orientation, disability status, or caste.\n    public let hate: Double\n\n    /// Hateful content that also includes violence or serious harm towards the targeted group.\n    public let hateWithThreatening: Double\n\n    /// Content that promotes, encourages, or depicts acts of self-harm, such as suicide,\n    /// cutting, and eating disorders.\n    public let selfHarm: Double\n\n    /// Content meant to arouse sexual excitement, such as the description of sexual activity,\n    /// or that promotes sexual services (excluding sex education and wellness).\n    public let sexual: Double\n\n    /// Sexual content that includes an individual who is under 18 years old.\n    public let sexualWithMinors: Double\n\n    /// Content that promotes or glorifies violence or celebrates the suffering or\n    /// humiliation of others.\n    public let violence: Double\n\n    /// Violent content that depicts death, violence, or serious physical injury in\n    /// extreme graphic detail.\n    public let violenceWithGraphic: Double\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyResponse.swift",
    "content": "//\n//  ContentPolicyResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The struct sent from the Moderations endpoint.\npublic struct ContentPolicyResponse: Codable, Identifiable {\n    /// The ID of the Moderation response.\n    public let id: String\n\n    /// The model used for the moderation check.\n    public let model: String\n\n    /// The array of results associated with the prompt(s).\n    public let results: [ContentPolicyResult]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Moderations/ContentPolicyResult.swift",
    "content": "//\n//  ContentPolicyResult.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The result of the moderation check from the Moderations endpoint.\npublic struct ContentPolicyResult: Codable {\n    enum CodingKeys: String, CodingKey {\n        case categories\n        case categoryScores = \"category_scores\"\n        case flagged\n    }\n\n    /// The flagged categories.\n    public let categories: ContentPolicyCategories\n\n    /// The score associated with each category.\n    public let categoryScores: ContentPolicyCategoryScore\n\n    /// Is the prompt flagged by the Moderations endpoint?\n    public let flagged: Bool\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/ChatChoice.swift",
    "content": "//\n//  ChatChoice.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The output choice for the Chat Ednpoint.\npublic struct ChatChoice: Codable, Sendable {\n    enum CodingKeys: String, CodingKey {\n        case message\n        case delta\n        case index\n        case logprobs\n        case finishReason = \"finish_reason\"\n    }\n\n    /// The choice output itself.\n    public let message: ChatMessage?\n\n    /// The streamed output if chosen to stream.\n    public let delta: ChatDelta?\n\n    /// The index of the choice within the data array.\n    public let index: Int\n\n    /// The logprobs used for the choice.\n    public let logprobs: Int?\n\n    /// The choice end reason.\n    public let finishReason: String?\n}\n\npublic struct ChatDelta: Codable, Sendable {\n    enum CodingKeys: String, CodingKey {\n        case role\n        case content\n    }\n\n    public let role: ChatRole?\n    public let content: String?\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/ChatMessage.swift",
    "content": "//\n//  ChatMessage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// The chat message object used for each chat conversation message.\npublic struct ChatMessage: Codable, Identifiable, Sendable {\n    private enum CodingKeys: String, CodingKey {\n        case role, content\n        case functionCall = \"function_call\"\n    }\n\n    /// ID used for iterating through list of chat messages\n    public var id = UUID().uuidString\n\n    /// The person sending the message\n    public let role: ChatRole\n\n    /// The message itself\n    public let content: String?\n\n    /// The name and arguments of a function that should be called, as generated by the model.\n    public let functionCall: FunctionCall?\n\n    public init(role: ChatRole, content: String? = nil, functionCall: FunctionCall? = nil) {\n        self.role = role\n        self.content = content\n        self.functionCall = functionCall\n    }\n\n    public var body: [String: String] {\n        if let content {\n            return [\n                \"role\": self.role.rawValue,\n                \"content\": content\n            ]\n        }\n        return [\"role\": self.role.rawValue, \"content\": \"\"]\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/Choice.swift",
    "content": "//\n//  Choice.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The output completion / edit of the Completions and Edits endpoints.\npublic struct Choice: Codable, Sendable {\n    enum CodingKeys: String, CodingKey {\n        case text\n        case index\n        case logprobs\n        case finishReason = \"finish_reason\"\n    }\n\n    /// The choice output itself.\n    public let text: String\n\n    /// The index of the choice within the data array.\n    public let index: Int\n\n    /// The logprobs used for the choice.\n    public let logprobs: Int?\n\n    /// The choice end reason.\n    public let finishReason: String?\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/Configuration.swift",
    "content": "//\n//  Configuration.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\n/// The configuration object used for the OpenAIKit object to represent the organization of the user.\nimport Foundation\n\npublic struct Configuration: Sendable {\n    /// The API key associated with the user.\n    public let apiKey: String\n\n    /// Optional organization header value.\n    public let organizationId: String?\n\n    /// Optional project header value.\n    public let projectId: String?\n\n    /// Optional webhook secret used by webhook verification helpers.\n    public let webhookSecret: String?\n\n    /// Base URL for all API requests.\n    public let baseURL: URL\n\n    /// Request behavior defaults used by the transport layer.\n    public let requestOptions: OpenAIRequestOptions\n\n    /// Backward-compatible initializer used by existing call sites.\n    public init(organizationId: String, apiKey: String) {\n        self.init(\n            apiKey: apiKey,\n            organizationId: organizationId,\n            projectId: nil,\n            webhookSecret: nil,\n            baseURL: URL(string: \"https://api.openai.com/v1\")!,\n            requestOptions: OpenAIRequestOptions()\n        )\n    }\n\n    public init(\n        apiKey: String,\n        organizationId: String? = nil,\n        projectId: String? = nil,\n        webhookSecret: String? = nil,\n        baseURL: URL = URL(string: \"https://api.openai.com/v1\")!,\n        requestOptions: OpenAIRequestOptions = OpenAIRequestOptions()\n    ) {\n        self.apiKey = apiKey\n        self.organizationId = organizationId\n        self.projectId = projectId\n        self.webhookSecret = webhookSecret\n        self.baseURL = baseURL\n        self.requestOptions = requestOptions\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/DeleteObject.swift",
    "content": "//\n//  DeleteObject.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The struct returned from deleting a file or Fine-tune from their associated endpoints.\npublic struct DeleteObject: Codable {\n    /// The ID of the deletion object.\n    public let id: String\n\n    /// The `OpenAIObject` object type of the deletion.\n    public let object: OpenAIObject\n\n    /// Is the item deleted?\n    public let deleted: Bool\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/FormData.swift",
    "content": "//\n//  FormData.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// The form query parameter used for submitting images and files with their associated endpoints.\npublic struct FormData {\n    /// The binary data itself.\n    public var data: Data\n\n    /// The MIME type used for the HTTP request.\n    public var mimeType: String\n\n    /// The name of the file.\n    public var fileName: String\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/FunctionCall.swift",
    "content": "//\n//  FunctionCall.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport SwiftUI\n\npublic struct FunctionCall: Codable, Sendable {\n    /// The arguments to call the function with, as generated by the model in JSON format.\n    ///\n    /// - Note: The model does not always generate valid JSON, and may hallucinate parameters not\n    /// defined by your function schema. Validate the arguments in your code before calling your function.\n    public let arguments: String\n\n    /// The name of the function to call.\n    public let name: String\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/OpenAIErrorMessage.swift",
    "content": "//\n//  OpenAIErrorMessage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The struct sent if the request is malformed, or if OpenAI's server isn't functioning correctly.\npublic struct OpenAIErrorMessage: Error, Codable {\n    /// The message associated with the error.\n    public let message: String\n\n    /// The type of error the object is.\n    public let type: String\n\n    /// The parameters of the error.\n    public let param: String?\n\n    /// The code associated with the error.\n    public let code: String?\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/OpenAIErrorResponse.swift",
    "content": "//\n//  OpenAIErrorResponse.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The response struct itself when an error is thrown.\npublic struct OpenAIErrorResponse: Error, Codable {\n    /// The error object itself.\n    public let error: OpenAIErrorMessage\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/OpenAIRequestOptions.swift",
    "content": "import Foundation\n\n/// Request behavior options used by OpenAIKit transport calls.\npublic struct OpenAIRequestOptions: Sendable {\n    /// Per-request timeout interval in seconds.\n    public let timeoutInterval: TimeInterval\n\n    /// Number of retries to apply for transient transport failures.\n    public let maxRetries: Int\n\n    /// Additional HTTP headers merged into each request.\n    public let additionalHeaders: [String: String]\n\n    public init(\n        timeoutInterval: TimeInterval = 600,\n        maxRetries: Int = 2,\n        additionalHeaders: [String: String] = [:]\n    ) {\n        self.timeoutInterval = timeoutInterval\n        self.maxRetries = max(maxRetries, 0)\n        self.additionalHeaders = additionalHeaders\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/OpenAI/Usage.swift",
    "content": "//\n//  Usage.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n/// The amount of tokens used with any GPT3 function.\npublic struct Usage: Codable, Sendable {\n    enum CodingKeys: String, CodingKey {\n        case promptTokens = \"prompt_tokens\"\n        case completionTokens = \"completion_tokens\"\n        case totalTokens = \"total_tokens\"\n    }\n\n    /// The amount of tokens used by a prompt.\n    public let promptTokens: Int\n\n    /// The amount of tokens used by the completion.\n    public let completionTokens: Int\n\n    /// The total amount of tokens used by the request.\n    public let totalTokens: Int\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Realtime/RealtimeModels.swift",
    "content": "import Foundation\n\npublic struct RealtimeCallObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case status\n        case model\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let status: String?\n    public let model: String?\n    public let createdAt: Int?\n}\n\npublic struct RealtimeClientSecretObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case value\n        case expiresAt = \"expires_at\"\n    }\n\n    public let value: String\n    public let expiresAt: Int?\n}\n\npublic struct RealtimeClientSecretResponse: Codable {\n    enum CodingKeys: String, CodingKey {\n        case clientSecret = \"client_secret\"\n    }\n\n    public let clientSecret: RealtimeClientSecretObject\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Responses/ResponseModels.swift",
    "content": "import Foundation\n\npublic struct ResponseObject: Codable, Sendable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case model\n        case status\n        case outputText = \"output_text\"\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let model: String?\n    public let status: String?\n    public let outputText: String?\n    public let createdAt: Int?\n}\n\npublic struct ResponseInputItem: Codable, Sendable {\n    public let id: String?\n    public let type: String?\n    public let role: String?\n    public let content: String?\n}\n\npublic struct ResponseInputItemListResponse: Codable, Sendable {\n    public let object: String\n    public let data: [ResponseInputItem]\n}\n\npublic struct ResponseInputTokenCount: Codable, Sendable {\n    enum CodingKeys: String, CodingKey {\n        case totalTokens = \"total_tokens\"\n    }\n\n    public let totalTokens: Int\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Skills/SkillModels.swift",
    "content": "import Foundation\n\npublic struct SkillObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case name\n        case description\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let name: String?\n    public let description: String?\n    public let createdAt: Int?\n}\n\npublic struct SkillListResponse: Codable {\n    public let object: String\n    public let data: [SkillObject]\n}\n\npublic struct SkillVersionObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case version\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let version: String?\n    public let createdAt: Int?\n}\n\npublic struct SkillVersionListResponse: Codable {\n    public let object: String\n    public let data: [SkillVersionObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Uploads/UploadModels.swift",
    "content": "import Foundation\n\npublic struct UploadObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case bytes\n        case filename\n        case status\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let bytes: Int?\n    public let filename: String?\n    public let status: String?\n    public let createdAt: Int?\n}\n\npublic struct UploadPartObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case uploadID = \"upload_id\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let uploadID: String?\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/VectorStores/VectorStoreModels.swift",
    "content": "import Foundation\n\npublic struct VectorStoreObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case name\n        case createdAt = \"created_at\"\n        case status\n        case metadata\n    }\n\n    public let id: String\n    public let object: String?\n    public let name: String?\n    public let createdAt: Int?\n    public let status: String?\n    public let metadata: [String: String]?\n}\n\npublic struct VectorStoreListResponse: Codable {\n    public let object: String\n    public let data: [VectorStoreObject]\n}\n\npublic struct VectorStoreFileObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case status\n        case vectorStoreId = \"vector_store_id\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let status: String?\n    public let vectorStoreId: String?\n}\n\npublic struct VectorStoreFileListResponse: Codable {\n    public let object: String\n    public let data: [VectorStoreFileObject]\n}\n\npublic struct VectorStoreFileBatchObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case createdAt = \"created_at\"\n        case status\n        case vectorStoreId = \"vector_store_id\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let createdAt: Int?\n    public let status: String?\n    public let vectorStoreId: String?\n}\n\npublic struct VectorStoreFileBatchListResponse: Codable {\n    public let object: String\n    public let data: [VectorStoreFileBatchObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Types/Structs/Schemas/Videos/VideoModels.swift",
    "content": "import Foundation\n\npublic struct VideoObject: Codable {\n    enum CodingKeys: String, CodingKey {\n        case id\n        case object\n        case status\n        case model\n        case createdAt = \"created_at\"\n    }\n\n    public let id: String\n    public let object: String?\n    public let status: String?\n    public let model: String?\n    public let createdAt: Int?\n}\n\npublic struct VideoListResponse: Codable {\n    public let object: String\n    public let data: [VideoObject]\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/ClampedPropertyWrapper.swift",
    "content": "//\n//  ClampedPropertyWrapper.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// A property wrapper that enforces values to be in a specified range of `T`.\n@propertyWrapper struct Clamped<T: Comparable> {\n    let wrappedValue: T\n\n    init(wrappedValue: T, range: ClosedRange<T>) {\n        self.wrappedValue = min(max(wrappedValue, range.lowerBound), range.upperBound)\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/FormDataHelper.swift",
    "content": "//\n//  FormDataHelper.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n#if os(Linux) || SERVER\nimport FoundationNetworking\n#endif\n\n/// The struct used to help with submitting data as a form query.\nstruct FormDataHelper {\n    /// The UUID of the parameter.\n    private let boundary: String = UUID().uuidString\n\n    /// The HTTP body containing data of `NSMutableData` type.\n    private let formBody = NSMutableData()\n\n    /// The URL of the request.\n    let formUrl: URL\n\n    init(formUrl: URL) {\n        self.formUrl = formUrl\n    }\n    \n    /// Add text to the form query\n    /// - Parameters:\n    ///   - name: The name of the request.\n    ///   - value: The data contained in the request.\n    func addTextField(named name: String, value: String) {\n        self.formBody.append(textFormField(named: name, value: value))\n    }\n    \n    /// Add data to the form query of `Data` type\n    /// - Parameters:\n    ///   - name: The name of the request.\n    ///   - formData: The data itself.\n    func addDataField(named name: String, formData: FormData) {\n        self.formBody.append(dataFormField(named: name, formData: formData))\n    }\n    \n    /// Convert the form query request to a `URLRequest`.\n    /// - Parameter apiKey: The API key associated with the request.\n    /// - Returns: An `URLRequest` object.\n    func asURLRequest(apiKey: String) -> URLRequest {\n        self.asURLRequest(headers: [\"Authorization\": \"Bearer \\(apiKey)\"])\n    }\n\n    /// Convert the form query request to a `URLRequest`.\n    /// - Parameter headers: Headers associated with the request.\n    /// - Returns: An `URLRequest` object.\n    func asURLRequest(headers: [String: String]) -> URLRequest {\n        var request = URLRequest(url: formUrl)\n\n        request.httpMethod = \"POST\"\n        request.setValue(\"multipart/form-data; boundary=\\(boundary)\", forHTTPHeaderField: \"Content-Type\")\n\n        self.formBody.append(\"--\\(boundary)--\")\n        request.httpBody = self.formBody as Data\n        request.allHTTPHeaderFields = headers\n\n        return request\n    }\n\n    private func textFormField(named name: String, value: String) -> String {\n        var fieldString = \"--\\(boundary)\\r\\n\"\n        fieldString += \"Content-Disposition: form-data; name=\\\"\\(name)\\\"\\r\\n\"\n        fieldString += \"\\r\\n\"\n        fieldString += \"\\(value)\\r\\n\"\n\n        return fieldString\n    }\n\n    private func dataFormField(named name: String, formData: FormData) -> Data {\n        let fieldData = NSMutableData()\n\n        fieldData.append(\"--\\(boundary)\\r\\n\")\n        fieldData.append(\"Content-Disposition: form-data; name=\\\"\\(name)\\\"; filename=\\\"\\(formData.fileName)\\\"\\r\\n\")\n        fieldData.append(\"Content-Type: \\(formData.mimeType)\\r\\n\")\n        fieldData.append(\"\\r\\n\")\n        fieldData.append(formData.data)\n        fieldData.append(\"\\r\\n\")\n\n        return fieldData as Data\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/GenericCodingKeys.swift",
    "content": "//\n//  GenericCodingKeys.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\npublic struct GenericCodingKeys: CodingKey {\n    public var stringValue: String\n    public var intValue: Int?\n\n    // Int type\n    public init?(intValue: Int) {\n        self.intValue = intValue\n        self.stringValue = \"\\(intValue)\"\n    }\n\n    // String type (including typical parameter types)\n    public init?(stringValue: String) {\n        switch stringValue {\n        case \"int\", \"date\", \"array\", \"boolean\", \"string\", \"data\":\n            self.stringValue = stringValue\n        default:\n            return nil\n        }\n    }\n\n    // Flexible key\n    public init(key: String) {\n        self.stringValue = key\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/OpenAIKitSession.swift",
    "content": "//\n//  URLSessionExtension.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n#if os(Linux) || SERVER\nimport FoundationNetworking\n#endif\n\n// Extensions used to help better streamline the main OpenAIKit class.\n// Most are private to help with having better Access Control.\nfinal class OpenAIKitSession: @unchecked Sendable {\n    /// Shared Singleton object for use within the OpenAIKit API Module\n    internal static let shared = OpenAIKitSession()\n\n    /// Conforming to the Singleton Design Pattern\n    private init() {  }\n\n    /// Uses URLRequest to set up a HTTPMethod, and implement default values for the method cases.\n    public enum HTTPMethod: String {\n        case get = \"GET\"\n        case post = \"POST\"\n        case delete = \"DELETE\"\n    }\n\n    internal func headers(for configuration: Configuration) -> [String: String] {\n        var result: [String: String] = [\n            \"Authorization\": \"Bearer \\(configuration.apiKey)\"\n        ]\n\n        if let organizationId = configuration.organizationId, !organizationId.isEmpty {\n            result[\"OpenAI-Organization\"] = organizationId\n        }\n\n        if let projectId = configuration.projectId, !projectId.isEmpty {\n            result[\"OpenAI-Project\"] = projectId\n        }\n\n        configuration.requestOptions.additionalHeaders.forEach { key, value in\n            result[key] = value\n        }\n\n        return result\n    }\n\n    internal static func statusError(for statusCode: Int, data: Data) -> OpenAIAPIError {\n        let payload = try? OpenAIKitSession.decodeData(OpenAIErrorResponse.self, with: data)\n\n        switch statusCode {\n        case 400:\n            return .badRequest(payload)\n        case 401:\n            return .authentication(payload)\n        case 403:\n            return .permissionDenied(payload)\n        case 404:\n            return .notFound(payload)\n        case 409:\n            return .conflict(payload)\n        case 422:\n            return .unprocessableEntity(payload)\n        case 429:\n            return .rateLimit(payload)\n        case 500...599:\n            return .internalServer(statusCode: statusCode, payload: payload)\n        default:\n            return .unexpectedStatusCode(statusCode: statusCode, payload: payload)\n        }\n    }\n\n    internal static func validateStatus(_ response: URLResponse?, data: Data) throws {\n        guard let httpResponse = response as? HTTPURLResponse else {\n            return\n        }\n\n        guard (200...299).contains(httpResponse.statusCode) else {\n            throw OpenAIKitSession.statusError(for: httpResponse.statusCode, data: data)\n        }\n    }\n\n    private func resolveRequestConfiguration(\n        apiKey: String?,\n        configuration: Configuration?\n    ) throws -> (headers: [String: String], options: OpenAIRequestOptions) {\n        if let configuration = configuration {\n            return (self.headers(for: configuration), configuration.requestOptions)\n        }\n\n        guard let apiKey = apiKey else {\n            throw OpenAIError.noApiKey\n        }\n\n        return (\n            [\"Authorization\": \"Bearer \\(apiKey)\"],\n            OpenAIRequestOptions()\n        )\n    }\n\n    /// Decode a data object using `JSONDecoder.decode()`.\n    /// - Parameters:\n    ///   - type: The type of `T` that the data will decode to.\n    ///   - data: `Data` input object.\n    ///   - keyDecodingStrategy: Default is `.useDefaultKeys`.\n    ///   - dataDecodingStrategy: Default is `.deferredToData`.\n    ///   - dateDecodingStrategy: Default is `.deferredToDate`.\n    /// - Returns: Decoded data of `T` type, or throws an `OpenAIErrorRaesponse` object.\n    internal static func decodeData<T: Decodable>(\n        _ type: T.Type = T.self,\n        with data: Data,\n        keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy = .useDefaultKeys,\n        dataDecodingStrategy: JSONDecoder.DataDecodingStrategy = .deferredToData,\n        dateDecodingStrategy: JSONDecoder.DateDecodingStrategy = .deferredToDate\n    ) throws -> T {\n        let decoder = JSONDecoder()\n\n        decoder.keyDecodingStrategy = keyDecodingStrategy\n        decoder.dataDecodingStrategy = dataDecodingStrategy\n        decoder.dateDecodingStrategy = dateDecodingStrategy\n\n        guard let decoded = try? decoder.decode(type, from: data) else {\n            throw try decoder.decode(OpenAIErrorResponse.self, from: data)\n        }\n        return decoded\n    }\n\n    /// Takes a `URL` input, along with header information, and converts it into a `URLRequest`;\n    /// and fetches the data using an `Async` `Await` wrapper for the older `dataTask` handler.\n    /// - Parameters:\n    ///   - url: `URL` to convert to a `URLRequest`.\n    ///   - method: Input can be either a `.get` or a `.post` method, with the default being `.post`.\n    ///   - headers: Header data for the request that uses a `[string:string]` dictionary,\n    ///   and the default is set to an empty dictionary.\n    ///   - body: Body data that defaults to `nil`.\n    /// - Returns: The data that was fetched typed as a `Data` object.\n    internal func asyncData(\n        with url: URL,\n        method: HTTPMethod = .post,\n        headers: [String: String] = [:],\n        body: Data? = nil,\n        timeoutInterval: TimeInterval? = nil,\n        maxRetries: Int = 0\n    ) async throws -> (Data, URLResponse?) {\n        var request = URLRequest(url: url)\n\n        request.httpMethod = method.rawValue\n        request.allHTTPHeaderFields = [\n            \"Content-Type\": \"application/json\"\n        ]\n        request.httpBody = body\n        if let timeoutInterval = timeoutInterval {\n            request.timeoutInterval = timeoutInterval\n        }\n\n        headers.forEach { key, value in\n            request.allHTTPHeaderFields?[key] = value\n        }\n\n        return try await self.asyncData(with: request, maxRetries: maxRetries)\n    }\n\n    /// An Async Await wrapper for the older `dataTask` handler.\n    /// - Parameter request: `URLRequest` to be fetched from.\n    /// - Returns: A Data object fetched from the` URLRequest`.\n    private func asyncData(\n        with request: URLRequest,\n        maxRetries: Int = 0\n    ) async throws -> (Data, URLResponse?) {\n        var attempt = 0\n        while true {\n            do {\n                return try await self.performDataTask(with: request)\n            } catch {\n                if attempt >= maxRetries {\n                    throw error\n                }\n                attempt += 1\n            }\n        }\n    }\n\n    private func performDataTask(with request: URLRequest) async throws -> (Data, URLResponse?) {\n        try await withCheckedThrowingContinuation { (con: CheckedContinuation<(Data, URLResponse?), Error>) in\n            let task = URLSession.shared.dataTask(with: request) { data, response, error in\n                if let error = error {\n                    con.resume(throwing: error)\n                } else if let data = data {\n                    con.resume(returning: (data, response))\n                } else {\n                    con.resume(returning: (Data(), response))\n                }\n            }\n\n            task.resume()\n        }\n    }\n    \n    /// Used for parsing `.jsonl` files when retrieving fine-tuning files from OpenAI's server.\n    /// - Parameters:\n    ///   - type: The type of `T` that the data will decode to.\n    ///   - with: The input url of type `URL` that will be fetched.\n    ///   - apiKey: The API Key for use with the server.\n    /// - Returns: The decoded object of array type `T`.\n    public func retrieveJsonLine<T: Decodable>(\n        _ type: T.Type = T.self,\n        with url: URL,\n        apiKey: String? = nil,\n        configuration: Configuration? = nil\n    ) async throws -> [T] {\n        let requestConfiguration = try self.resolveRequestConfiguration(\n            apiKey: apiKey,\n            configuration: configuration\n        )\n\n        let jsonDecoder = JSONDecoder()\n\n        let (genData, response) = try await self.asyncData(\n            with: url,\n            method: .get,\n            headers: requestConfiguration.headers,\n            timeoutInterval: requestConfiguration.options.timeoutInterval,\n            maxRetries: requestConfiguration.options.maxRetries\n        )\n        try OpenAIKitSession.validateStatus(response, data: genData)\n\n        let genString = String(decoding: genData, as: UTF8.self)\n\n        return try genString.components(separatedBy: .newlines)\n            .filter { $0 != \"\" }\n            .compactMap { gen -> T? in\n                guard let data = gen.data(using: .utf8) else {\n                    throw OpenAIError.invalidData\n                }\n                return try? jsonDecoder.decode(T.self, from: data)\n            }\n    }\n\n    /// Stream Data from a server using Server Side Events.\n    /// - Parameters:\n    ///   - type: The type of `T` that the data will decode to.\n    ///   - with: The input url of type `URL` that will be fetched.\n    ///   - apiKey: The API Key for use with the server.\n    ///   - body: The POST body used to add parameters, defaults to `nil`.\n    ///   - method: The method used for the function, defaults to `.post`.\n    /// - Returns: An `AsyncThrowingStream` object with either type `T` object or type `Error` object.\n    public func streamData<T: Decodable & Sendable, Body: Encodable>(\n        _ type: T.Type = T.self,\n        with url: URL,\n        apiKey: String? = nil,\n        configuration: Configuration? = nil,\n        body: Body,\n        method: HTTPMethod = .post\n    ) throws -> AsyncThrowingStream<T, Error> {\n        let requestConfiguration = try self.resolveRequestConfiguration(\n            apiKey: apiKey,\n            configuration: configuration\n        )\n        let jsonData = try JSONEncoder().encode(body)\n        var request = URLRequest(url: url)\n\n        request.httpMethod = method.rawValue\n        request.allHTTPHeaderFields = [\n            \"Content-Type\": \"application/json\"\n        ]\n        request.httpBody = jsonData\n        request.timeoutInterval = requestConfiguration.options.timeoutInterval\n        requestConfiguration.headers.forEach { key, value in\n            request.allHTTPHeaderFields?[key] = value\n        }\n\n        return OpenAISource(url: request).streamData()\n    }\n\n    /// Stream data using an untyped dictionary payload.\n    public func streamData<T: Decodable & Sendable>(\n        _ type: T.Type = T.self,\n        with url: URL,\n        apiKey: String? = nil,\n        configuration: Configuration? = nil,\n        body: [String: Any],\n        method: HTTPMethod = .post\n    ) throws -> AsyncThrowingStream<T, Error> {\n        let requestConfiguration = try self.resolveRequestConfiguration(\n            apiKey: apiKey,\n            configuration: configuration\n        )\n        let jsonData = try? JSONSerialization.data(withJSONObject: body)\n        var request = URLRequest(url: url)\n\n        request.httpMethod = method.rawValue\n        request.allHTTPHeaderFields = [\n            \"Content-Type\": \"application/json\"\n        ]\n        request.httpBody = jsonData\n        request.timeoutInterval = requestConfiguration.options.timeoutInterval\n        requestConfiguration.headers.forEach { key, value in\n            request.allHTTPHeaderFields?[key] = value\n        }\n\n        return OpenAISource(url: request).streamData()\n    }\n\n    /// Decode a `URL` to the type `Data` using `asyncData()`\n    /// - Parameters:\n    ///   - with: The input url of type `URL` that will be fetched.\n    ///   - apiKey: The API Key for use with the server.\n    ///   - body: The POST body used to add parameters, defaults to `nil`.\n    ///   - method: The method used for the function, defaults to `.post`.\n    /// - Returns: The decoded object of type `Data`.\n    public func decodeUrlTranscriptions(\n        with url: URL,\n        apiKey: String? = nil,\n        configuration: Configuration? = nil,\n        body: [String: Any]\n    ) async throws -> Data {\n        let requestConfiguration = try self.resolveRequestConfiguration(\n            apiKey: apiKey,\n            configuration: configuration\n        )\n        let formRequest = FormDataHelper(formUrl: url)\n\n        body.forEach { (key, value) in\n            if let dataValue = value as? FormData {\n                formRequest.addDataField(named: key, formData: dataValue)\n            } else {\n                formRequest.addTextField(named: key, value: \"\\(value)\")\n            }\n        }\n\n        var request = formRequest.asURLRequest(headers: requestConfiguration.headers)\n        request.timeoutInterval = requestConfiguration.options.timeoutInterval\n\n        let (data, response) = try await self.asyncData(\n            with: request,\n            maxRetries: requestConfiguration.options.maxRetries\n        )\n        try OpenAIKitSession.validateStatus(response, data: data)\n        return data\n    }\n\n    /// Decode a URL to raw data using an encodable JSON body.\n    public func decodeRawUrl<Body: Encodable>(\n        with url: URL,\n        apiKey: String? = nil,\n        configuration: Configuration? = nil,\n        body: Body,\n        method: HTTPMethod = .post,\n        acceptHeader: String? = nil\n    ) async throws -> Data {\n        let requestConfiguration = try self.resolveRequestConfiguration(\n            apiKey: apiKey,\n            configuration: configuration\n        )\n        let jsonData = try JSONEncoder().encode(body)\n\n        var headers = requestConfiguration.headers\n        if let acceptHeader = acceptHeader {\n            headers[\"Accept\"] = acceptHeader\n        }\n\n        let (data, response) = try await self.asyncData(\n            with: url,\n            method: method,\n            headers: headers,\n            body: jsonData,\n            timeoutInterval: requestConfiguration.options.timeoutInterval,\n            maxRetries: requestConfiguration.options.maxRetries\n        )\n        try OpenAIKitSession.validateStatus(response, data: data)\n        return data\n    }\n\n    /// Decode a `URL` to the type `T` using either `asyncData()` for the Production Server;\n    /// or using `decode()` for the Mock Server.\n    /// - Parameters:\n    ///   - type: The type of `T` that the data will decode to.\n    ///   - with: The input url of type `URL` that will be fetched.\n    ///   - apiKey: The API Key for use with the server.\n    ///   - body: The POST body used to add parameters, defaults to `nil`.\n    ///   - method: The method used for the function, defaults to `.post`.\n    ///   - bodyRequired: Is the body required or not, used for `.get` and `.delete`, defaults to `false`.\n    ///   - formSubmission: Is the body actually a form submission? Used for image submissionss, defaults to `false`.\n    /// - Returns: The decoded object of type `T`.\n    public func decodeUrl<T: Decodable, Body: Encodable>(\n        _ type: T.Type = T.self,\n        with url: URL,\n        apiKey: String? = nil,\n        configuration: Configuration? = nil,\n        body: Body,\n        method: HTTPMethod = .post\n    ) async throws -> T {\n        let requestConfiguration = try self.resolveRequestConfiguration(\n            apiKey: apiKey,\n            configuration: configuration\n        )\n        let jsonData = try JSONEncoder().encode(body)\n        let (data, response) = try await self.asyncData(\n            with: url,\n            method: method,\n            headers: requestConfiguration.headers,\n            body: jsonData,\n            timeoutInterval: requestConfiguration.options.timeoutInterval,\n            maxRetries: requestConfiguration.options.maxRetries\n        )\n        try OpenAIKitSession.validateStatus(response, data: data)\n\n        return try OpenAIKitSession.decodeData(with: data)\n    }\n\n    /// Decode a `URL` using an untyped dictionary payload.\n    public func decodeUrl<T: Decodable>(\n        _ type: T.Type = T.self,\n        with url: URL,\n        apiKey: String? = nil,\n        configuration: Configuration? = nil,\n        body: [String: Any]? = nil,\n        method: HTTPMethod = .post,\n        bodyRequired: Bool = true,\n        formSubmission: Bool = false\n    ) async throws -> T {\n        let requestConfiguration = try self.resolveRequestConfiguration(\n            apiKey: apiKey,\n            configuration: configuration\n        )\n\n        if bodyRequired {\n            guard let body = body else { throw OpenAIError.noBody }\n\n            if formSubmission {\n                let formRequest = FormDataHelper(formUrl: url)\n\n                body.forEach { (key, value) in\n                    if let dataValue = value as? FormData {\n                        formRequest.addDataField(named: key, formData: dataValue)\n                    } else {\n                        formRequest.addTextField(named: key, value: \"\\(value)\")\n                    }\n                }\n\n                var request = formRequest.asURLRequest(headers: requestConfiguration.headers)\n                request.timeoutInterval = requestConfiguration.options.timeoutInterval\n                let (data, response) = try await self.asyncData(\n                    with: request,\n                    maxRetries: requestConfiguration.options.maxRetries\n                )\n                try OpenAIKitSession.validateStatus(response, data: data)\n\n                return try OpenAIKitSession.decodeData(with: data)\n            } else {\n                let jsonData = try? JSONSerialization.data(withJSONObject: body)\n                let (data, response) = try await self.asyncData(\n                    with: url, method: method,\n                    headers: requestConfiguration.headers,\n                    body: jsonData,\n                    timeoutInterval: requestConfiguration.options.timeoutInterval,\n                    maxRetries: requestConfiguration.options.maxRetries\n                )\n                try OpenAIKitSession.validateStatus(response, data: data)\n\n                return try OpenAIKitSession.decodeData(with: data)\n            }\n        }\n\n        if !bodyRequired && !formSubmission {\n            let (data, response) = try await self.asyncData(\n                with: url,\n                method: method,\n                headers: requestConfiguration.headers,\n                timeoutInterval: requestConfiguration.options.timeoutInterval,\n                maxRetries: requestConfiguration.options.maxRetries\n            )\n            try OpenAIKitSession.validateStatus(response, data: data)\n\n            return try OpenAIKitSession.decodeData(with: data)\n        }\n\n        throw OpenAIError.noBody\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/OpenAIStreamer/OpenAIEvent.swift",
    "content": "//\n//  OpenAIEvent.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n#if os(Linux) || SERVER\nimport FoundationNetworking\n#endif\n\nenum OpenAIEvent {\n    case event(id: String?, event: String?, data: String?, time: String?)\n\n    init?(eventString: String?, newLineCharacters: [String]) {\n        guard let eventString = eventString else { return nil }\n\n        if eventString.hasPrefix(\":\") {\n            return nil\n        }\n\n        self = OpenAIEvent.parseEvent(eventString, newLineCharacters: newLineCharacters)\n    }\n\n    var id: String? {\n        guard case let .event(eventId, _, _, _) = self else { return nil }\n        return eventId\n    }\n\n    var event: String? {\n        guard case let .event(_, eventName, _, _) = self else { return nil }\n        return eventName\n    }\n\n    var data: String? {\n        guard case let .event(_, _, eventData, _) = self else { return nil }\n        return eventData\n    }\n\n    var retryTime: Int? {\n        guard case let .event(_, _, _, aTime) = self, let time = aTime else { return nil }\n        return Int(time.trimmingCharacters(in: CharacterSet.whitespaces))\n    }\n\n    var onlyRetryEvent: Bool? {\n        guard case let .event(id, name, data, time) = self else { return nil }\n        let otherThanTime = id ?? name ?? data\n\n        if otherThanTime == nil && time != nil {\n            return true\n        }\n\n        return false\n    }\n}\n\nprivate extension OpenAIEvent {\n\n    static func parseEvent(_ eventString: String, newLineCharacters: [String]) -> OpenAIEvent {\n        var event: [String: String?] = [:]\n\n        for line in eventString.components(separatedBy: CharacterSet.newlines) as [String] {\n            let (akey, value) = OpenAIEvent.parseLine(line, newLineCharacters: newLineCharacters)\n            guard let key = akey else { continue }\n\n            if let value = value, let previousValue = event[key] ?? nil {\n                event[key] = \"\\(previousValue)\\n\\(value)\"\n            } else if let value = value {\n                event[key] = value\n            } else {\n                event[key] = nil\n            }\n        }\n\n        // the only possible field names for events are: id, event and data. Everything else is ignored.\n        return .event(\n            id: event[\"id\"] ?? nil,\n            event: event[\"event\"] ?? nil,\n            data: event[\"data\"] ?? nil,\n            time: event[\"retry\"] ?? nil\n        )\n    }\n\n    static func parseLine(_ line: String, newLineCharacters: [String]) -> (key: String?, value: String?) {\n        var key: String?, value: String?\n        let scanner = Scanner(string: line)\n\n        key = scanner.scanUpToString(\":\")\n        let _ = scanner.scanString(\":\")\n\n        for newline in newLineCharacters {\n            if let scannedValue = scanner.scanUpToString(newline) {\n                value = scannedValue\n                break\n            }\n        }\n\n        // for id and data if they come empty they should return an empty string value.\n        if key != \"event\" && value == nil {\n            value = \"\"\n        }\n\n        return (key, value)\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/OpenAIStreamer/OpenAISource.swift",
    "content": "//\n//  OpenAISource.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n#if os(Linux) || SERVER\nimport FoundationNetworking\n#endif\n\npublic enum OpenAISourceState: Sendable {\n    case connecting\n    case open\n    case closed\n}\n\npublic struct Message: Sendable {\n    public let id: String?\n    public let event: String?\n    public let data: String?\n}\n\nopen class OpenAISource: NSObject, URLSessionDataDelegate, @unchecked Sendable {\n    let headers: [String: String]\n    static let DefaultRetryTime = 3000\n\n    public let url: URLRequest\n    private(set) public var lastEventId: String?\n    private(set) public var retryTime = OpenAISource.DefaultRetryTime\n    private(set) public var readyState: OpenAISourceState\n\n    private var onOpenCallback: (@Sendable () -> Void)?\n    private var onComplete: (@Sendable (Int?, Bool?, NSError?) -> Void)?\n    private var onMessageCallback: (@Sendable (Message) -> Void)?\n    private var eventListeners: [String: @Sendable (Message) -> Void] = [:]\n\n    private var openAiStreamParser: OpenAIStreamParser?\n    private var operationQueue: OperationQueue\n    private var mainQueue = DispatchQueue.main\n    private var urlSession: URLSession?\n\n    public init(url: URLRequest) {\n        self.url = url\n        self.headers = url.allHTTPHeaderFields ?? [:]\n        \n        self.readyState = .closed\n        self.operationQueue = OperationQueue()\n        self.operationQueue.maxConcurrentOperationCount = 1\n        \n        super.init()\n    }\n\n    public func connect(lastEventId: String? = nil) {\n        self.openAiStreamParser = OpenAIStreamParser()\n        self.readyState = .connecting\n\n        let configuration = self.sessionConfiguration(lastEventId: lastEventId)\n        self.urlSession = URLSession(\n            configuration: configuration,\n            delegate: self,\n            delegateQueue: self.operationQueue\n        )\n        self.urlSession?\n            .dataTask(with: self.url)\n            .resume()\n    }\n\n    public func disconnect() {\n        self.readyState = .closed\n        self.urlSession?.invalidateAndCancel()\n    }\n\n    public func onOpen(_ onOpenCallback: @escaping @Sendable () -> Void) {\n        self.onOpenCallback = onOpenCallback\n    }\n\n    public func onComplete(_ onComplete: @escaping @Sendable (Int?, Bool?, NSError?) -> Void) {\n        self.onComplete = onComplete\n    }\n\n    public func onMessage(_ onMessageCallback: @escaping @Sendable (Message) -> Void) {\n        self.onMessageCallback = onMessageCallback\n    }\n\n    public func addEventListener(_ event: String,\n                                 handler: @escaping @Sendable (Message) -> Void) {\n        self.eventListeners[event] = handler\n    }\n\n    public func removeEventListener(_ event: String) {\n        self.eventListeners.removeValue(forKey: event)\n    }\n\n    public func events() -> [String] {\n        return Array(self.eventListeners.keys)\n    }\n\n    open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {\n        if self.readyState != .open {\n            return\n        }\n\n        if let events = self.openAiStreamParser?.append(data: data) {\n            self.notifyReceivedEvents(events)\n        }\n    }\n\n    open func urlSession(\n        _ session: URLSession,\n        dataTask: URLSessionDataTask,\n        didReceive response: URLResponse,\n        completionHandler: @escaping (URLSession.ResponseDisposition) -> Void\n    ) {\n        completionHandler(URLSession.ResponseDisposition.allow)\n        self.readyState = .open\n        self.mainQueue.async { [weak self] in self?.onOpenCallback?() }\n    }\n\n    open func urlSession(\n        _ session: URLSession,\n        task: URLSessionTask,\n        didCompleteWithError error: Error?\n    ) {\n        guard let responseStatusCode = (task.response as? HTTPURLResponse)?.statusCode else {\n            mainQueue.async { [weak self] in self?.onComplete?(nil, nil, error as NSError?) }\n            return\n        }\n\n        let reconnect = shouldReconnect(statusCode: responseStatusCode)\n        mainQueue.async { [weak self] in self?.onComplete?(responseStatusCode, reconnect, nil) }\n    }\n\n    open func urlSession(\n        _ session: URLSession,\n        task: URLSessionTask,\n        willPerformHTTPRedirection response: HTTPURLResponse,\n        newRequest request: URLRequest,\n        completionHandler: @escaping (URLRequest?) -> Void\n    ) {\n        var newRequest = request\n        self.headers.forEach { newRequest.setValue($1, forHTTPHeaderField: $0) }\n        completionHandler(newRequest)\n    }\n}\n\ninternal extension OpenAISource {\n    func sessionConfiguration(lastEventId: String?) -> URLSessionConfiguration {\n        var additionalHeaders = headers\n        if let eventID = lastEventId {\n            additionalHeaders[\"Last-Event-Id\"] = eventID\n        }\n\n        additionalHeaders[\"Accept\"] = \"text/event-stream\"\n        additionalHeaders[\"Cache-Control\"] = \"no-cache\"\n\n        let sessionConfiguration = URLSessionConfiguration.default\n        sessionConfiguration.timeoutIntervalForRequest = TimeInterval(INT_MAX)\n        sessionConfiguration.timeoutIntervalForResource = TimeInterval(INT_MAX)\n        sessionConfiguration.httpAdditionalHeaders = additionalHeaders\n\n        return sessionConfiguration\n    }\n\n    func readyStateOpen() {\n        self.readyState = .open\n    }\n}\n\nprivate extension OpenAISource {\n    func notifyReceivedEvents(_ events: [OpenAIEvent]) {\n        for event in events {\n            lastEventId = event.id\n            retryTime = event.retryTime ?? OpenAISource.DefaultRetryTime\n\n            if event.onlyRetryEvent == true {\n                continue\n            }\n\n            if event.event == nil || event.event == \"message\" {\n                mainQueue.async { [weak self] in\n                    self?.onMessageCallback?(Message(id: event.id, event: \"message\", data: event.data))\n                }\n            }\n\n            if let eventName = event.event, let eventHandler = eventListeners[eventName] {\n                mainQueue.async {\n                    eventHandler(Message(id: event.id, event: event.event, data: event.data))\n                }\n            }\n        }\n    }\n\n    // Following \"5 Processing model\" from:\n    // https://www.w3.org/TR/2009/WD-eventsource-20090421/#handler-eventsource-onerror\n    func shouldReconnect(statusCode: Int) -> Bool {\n        switch statusCode {\n        case 200:\n            return false\n        case _ where statusCode > 200 && statusCode < 300:\n            return true\n        default:\n            return false\n        }\n    }\n}\n\npublic extension OpenAISource {\n    @preconcurrency\n    func streamData<T: Decodable & Sendable>() -> AsyncThrowingStream<T, Error> {\n        return AsyncThrowingStream { continuation in\n            let connection = OpenAISource(url: self.url)\n\n            connection.onMessageCallback = { message in\n                do {\n                    if message.data != nil, message.data! == \"[DONE]\" {\n                        continuation.finish()\n                    }\n                    \n                    guard let data = message.data?.data(using: .utf8) else {\n                        throw OpenAIError.invalidData\n                    }\n                    let result = try OpenAIKitSession.decodeData(T.self, with: data)\n                    continuation.yield(result)\n                } catch {\n                    do {\n                        guard let data = message.data?.data(using: .utf8) else {\n                            throw OpenAIError.invalidData\n                        }\n                        let errorOpenAI = try JSONDecoder().decode(OpenAIErrorResponse.self, from: data)\n                        continuation.finish(throwing: errorOpenAI)\n                    } catch {\n                        continuation.finish(throwing: error)\n                    }\n                }\n            }\n\n            continuation.onTermination = { @Sendable _ in\n                connection.disconnect()\n            }\n\n            connection.connect()\n        }\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/OpenAIStreamer/OpenAIStreamParser.swift",
    "content": "//\n//  OpenAIStreamParser.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n#if os(Linux) || SERVER\nimport FoundationNetworking\n#endif\n\npublic final class OpenAIStreamParser {\n    //  Events are separated by end of line. End of line can be:\n    //  \\r = CR (Carriage Return) → Used as a new line character in Mac OS before X\n    //  \\n = LF (Line Feed) → Used as a new line character in Unix/Mac OS X\n    //  \\r\\n = CR + LF → Used as a new line character in Windows\n    private let validNewlineCharacters = [\"\\r\\n\", \"\\n\", \"\\r\"]\n    private let dataBuffer: NSMutableData\n\n    init() {\n        dataBuffer = NSMutableData()\n    }\n\n    var currentBuffer: String? {\n        return NSString(data: dataBuffer as Data, encoding: String.Encoding.utf8.rawValue) as String?\n    }\n\n    func append(data: Data?) -> [OpenAIEvent] {\n        guard let data = data else { return [] }\n        dataBuffer.append(data)\n\n        let events = extractEventsFromBuffer().compactMap { [weak self] eventString -> OpenAIEvent? in\n            guard let self = self else { return nil }\n            return OpenAIEvent(eventString: eventString, newLineCharacters: self.validNewlineCharacters)\n        }\n\n        return events\n    }\n\n    private func extractEventsFromBuffer() -> [String] {\n        var events = [String]()\n\n        var searchRange =  NSRange(location: 0, length: dataBuffer.length)\n        while let foundRange = searchFirstEventDelimiter(in: searchRange) {\n            // if we found a delimiter range that means that from the beggining of the buffer\n            // until the beggining of the range where the delimiter was found we have an event.\n            // The beggining of the event is: searchRange.location\n            // The lenght of the event is the position where the foundRange was found.\n            let dataChunk = dataBuffer.subdata(\n                with: NSRange(location: searchRange.location, length: foundRange.location - searchRange.location)\n            )\n\n            if let text = String(bytes: dataChunk, encoding: .utf8) {\n                events.append(text)\n            }\n\n            // We move the searchRange start position (location) after the fundRange we just found and\n            searchRange.location = foundRange.location + foundRange.length\n            searchRange.length = dataBuffer.length - searchRange.location\n        }\n\n        // We empty the piece of the buffer we just search in.\n        dataBuffer.replaceBytes(in: NSRange(location: 0, length: searchRange.location), withBytes: nil, length: 0)\n\n        return events\n    }\n\n    // This methods returns the range of the first delimiter found in the buffer. For example:\n    // If in the buffer we have: `id: event-id-1\\ndata:event-data-first\\n\\n`\n    // This method will return the range for the `\\n\\n`.\n    private func searchFirstEventDelimiter(in range: NSRange) -> NSRange? {\n        let delimiters = validNewlineCharacters.map { \"\\($0)\\($0)\".data(using: String.Encoding.utf8)! }\n\n        for delimiter in delimiters {\n            let foundRange = dataBuffer.range(\n                of: delimiter, options: NSData.SearchOptions(), in: range\n            )\n\n            if foundRange.location != NSNotFound {\n                return foundRange\n            }\n        }\n\n        return nil\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/Whisper/SRT.swift",
    "content": "//\n//  SRT.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\npublic struct SRT: Codable {\n    public let id: Int\n    public let start: String\n    public let end: String\n    public let content: String\n\n    public static func parseSRT(from input: String) -> [SRT] {\n        let lines = input.split(separator: \"\\n\").map(String.init)\n        var subtitles: [SRT] = []\n\n        var index = 0\n        while index < lines.count {\n            if\n                let id = Int(lines[index]),\n                let range = lines[index + 1]\n                    .split(separator: \" \")\n                    .first(where: { $0 == \"-->\" })\n                    .map(String.init)?\n                    .surroundingWords,\n                range.count == 2\n            {\n                let content = lines[index + 2]\n                let subtitle = SRT(id: id, start: range[0], end: range[1], content: content)\n                subtitles.append(subtitle)\n                index += 3\n            } else {\n                index += 1\n            }\n        }\n        return subtitles\n    }\n\n    public static func exportSRT(subtitles: [SRT]) -> String {\n        return subtitles.map { \"\\($0.id)\\n\\($0.start) --> \\($0.end)\\n\\($0.content)\" }\n            .joined(separator: \"\\n\\n\")\n    }\n}\n"
  },
  {
    "path": "Sources/OpenAIKit/Utils/Whisper/WebVTT.swift",
    "content": "//\n//  WebVTTCue.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\npublic struct WebVTTCue: Codable {\n    public let startTime: String\n    public let endTime: String\n    public let text: String\n\n    public static func parseWebVTT(from input: String) -> [WebVTTCue] {\n        var cues: [WebVTTCue] = []\n        let lines = input.split(separator: \"\\n\")\n        var index = 0\n\n        // Skip the \"WEBVTT\" header\n        if lines.count > 0 && lines[0] == \"WEBVTT\" {\n            index += 1\n        }\n\n        while index < lines.count {\n            let timeRange = lines[index].components(separatedBy: \" --> \")\n            if timeRange.count == 2 {\n                let startTime = String(timeRange[0])\n                let endTime = String(timeRange[1])\n\n                index += 1\n                var text = \"\"\n                while index < lines.count && !lines[index].isEmpty {\n                    text += (text.isEmpty ? \"\" : \"\\n\") + lines[index]\n                    index += 1\n                }\n\n                let cue = WebVTTCue(startTime: startTime, endTime: endTime, text: text)\n                cues.append(cue)\n            }\n\n            index += 1\n        }\n\n        return cues\n    }\n\n    public static func exportCuesToWebVTT(_ cues: [WebVTTCue]) -> String {\n        var output = \"WEBVTT\\n\\n\"\n        for cue in cues {\n            output += \"\\(cue.startTime) --> \\(cue.endTime)\\n\"\n            output += cue.text + \"\\n\\n\"\n        }\n        return output\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIAudioSpeechTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIAudioSpeechTests: XCTestCase {\n    func testSpeechParametersEncodeExpectedKeys() throws {\n        let params = SpeechParameters(\n            input: \"Hello world\",\n            model: \"gpt-4o-mini-tts\",\n            voice: \"alloy\",\n            instructions: \"Calm voice\",\n            responseFormat: \"mp3\",\n            speed: 1.2,\n            streamFormat: \"audio\"\n        )\n\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n\n        XCTAssertEqual(object[\"input\"] as? String, \"Hello world\")\n        XCTAssertEqual(object[\"model\"] as? String, \"gpt-4o-mini-tts\")\n        XCTAssertEqual(object[\"voice\"] as? String, \"alloy\")\n        XCTAssertEqual(object[\"instructions\"] as? String, \"Calm voice\")\n        XCTAssertEqual(object[\"response_format\"] as? String, \"mp3\")\n        XCTAssertEqual(object[\"speed\"] as? Double, 1.2)\n        XCTAssertEqual(object[\"stream_format\"] as? String, \"audio\")\n    }\n\n    func testMockSpeechReturnsData() async throws {\n        let mock = MockOpenAI()\n        let data = try await mock.createSpeech(parameters: SpeechParameters(input: \"test\"))\n        XCTAssertFalse(data.isEmpty)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIBatchesTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIBatchesTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testBatchCreateParametersEncodeInputFileId() throws {\n        let params = BatchCreateParameters(\n            inputFileID: \"file_123\",\n            endpoint: \"/v1/responses\",\n            completionWindow: \"24h\"\n        )\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n\n        XCTAssertEqual(object[\"input_file_id\"] as? String, \"file_123\")\n        XCTAssertEqual(object[\"endpoint\"] as? String, \"/v1/responses\")\n        XCTAssertEqual(object[\"completion_window\"] as? String, \"24h\")\n    }\n\n    func testBatchMethodsAreExposed() {\n        let client = makeClient()\n\n        let createBatch: (BatchCreateParameters) async throws -> BatchObject = client.batches.create\n        let listBatches: () async throws -> BatchListResponse = client.batches.list\n        let retrieveBatch: (String) async throws -> BatchObject = client.batches.retrieve\n        let cancelBatch: (String) async throws -> BatchObject = client.batches.cancel\n\n        XCTAssertNotNil(createBatch)\n        XCTAssertNotNil(listBatches)\n        XCTAssertNotNil(retrieveBatch)\n        XCTAssertNotNil(cancelBatch)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIBetaAssistantsTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIBetaAssistantsTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testThreadRunCreateParametersEncodeAssistantId() throws {\n        let params = ThreadRunCreateParameters(assistantId: \"asst_123\", model: \"gpt-4o-mini\")\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n\n        XCTAssertEqual(object[\"assistant_id\"] as? String, \"asst_123\")\n        XCTAssertEqual(object[\"model\"] as? String, \"gpt-4o-mini\")\n    }\n\n    func testBetaAssistantAndThreadMethodsAreExposed() {\n        let client = makeClient()\n\n        let createAssistant: (AssistantCreateParameters) async throws -> AssistantObject = client.beta.assistants.create\n        let listAssistants: () async throws -> AssistantListResponse = client.beta.assistants.list\n        let retrieveAssistant: (String) async throws -> AssistantObject = client.beta.assistants.retrieve\n        let updateAssistant: (String, AssistantUpdateParameters) async throws -> AssistantObject = client.beta.assistants.update\n        let deleteAssistant: (String) async throws -> DeleteObject = client.beta.assistants.delete\n\n        let createThread: (ThreadCreateParameters) async throws -> ThreadObject = client.beta.threads.create\n        let retrieveThread: (String) async throws -> ThreadObject = client.beta.threads.retrieve\n        let updateThread: (String, ThreadUpdateParameters) async throws -> ThreadObject = client.beta.threads.update\n        let deleteThread: (String) async throws -> DeleteObject = client.beta.threads.delete\n\n        let createRun: (String, ThreadRunCreateParameters) async throws -> ThreadRunObject = client.beta.threads.runs.create\n        let listRuns: (String) async throws -> ThreadRunListResponse = client.beta.threads.runs.list\n        let retrieveRun: (String, String) async throws -> ThreadRunObject = client.beta.threads.runs.retrieve\n        let cancelRun: (String, String) async throws -> ThreadRunObject = client.beta.threads.runs.cancel\n\n        let listSteps: (String, String) async throws -> ThreadRunStepListResponse = client.beta.threads.runs.steps.list\n        let retrieveStep: (String, String, String) async throws -> ThreadRunStepObject = client.beta.threads.runs.steps.retrieve\n\n        XCTAssertNotNil(createAssistant)\n        XCTAssertNotNil(listAssistants)\n        XCTAssertNotNil(retrieveAssistant)\n        XCTAssertNotNil(updateAssistant)\n        XCTAssertNotNil(deleteAssistant)\n        XCTAssertNotNil(createThread)\n        XCTAssertNotNil(retrieveThread)\n        XCTAssertNotNil(updateThread)\n        XCTAssertNotNil(deleteThread)\n        XCTAssertNotNil(createRun)\n        XCTAssertNotNil(listRuns)\n        XCTAssertNotNil(retrieveRun)\n        XCTAssertNotNil(cancelRun)\n        XCTAssertNotNil(listSteps)\n        XCTAssertNotNil(retrieveStep)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIClientScaffoldTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIClientScaffoldTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testTopLevelResourcesAreAccessible() {\n        let client = makeClient()\n\n        XCTAssertNotNil(client.completions)\n        XCTAssertNotNil(client.chat)\n        XCTAssertNotNil(client.embeddings)\n        XCTAssertNotNil(client.files)\n        XCTAssertNotNil(client.images)\n        XCTAssertNotNil(client.audio)\n        XCTAssertNotNil(client.moderations)\n        XCTAssertNotNil(client.models)\n        XCTAssertNotNil(client.fineTuning)\n        XCTAssertNotNil(client.vectorStores)\n        XCTAssertNotNil(client.webhooks)\n        XCTAssertNotNil(client.beta)\n        XCTAssertNotNil(client.batches)\n        XCTAssertNotNil(client.uploads)\n        XCTAssertNotNil(client.responses)\n        XCTAssertNotNil(client.realtime)\n        XCTAssertNotNil(client.conversations)\n        XCTAssertNotNil(client.evals)\n        XCTAssertNotNil(client.containers)\n        XCTAssertNotNil(client.skills)\n        XCTAssertNotNil(client.videos)\n    }\n\n    func testNestedResourcesAreAccessible() {\n        let client = makeClient()\n\n        XCTAssertNotNil(client.chat.completions)\n        XCTAssertNotNil(client.audio.speech)\n        XCTAssertNotNil(client.audio.transcriptions)\n        XCTAssertNotNil(client.audio.translations)\n        XCTAssertNotNil(client.vectorStores.files)\n        XCTAssertNotNil(client.vectorStores.fileBatches)\n        XCTAssertNotNil(client.uploads.parts)\n        XCTAssertNotNil(client.responses.inputItems)\n        XCTAssertNotNil(client.responses.inputTokens)\n        XCTAssertNotNil(client.realtime.calls)\n        XCTAssertNotNil(client.realtime.clientSecrets)\n        XCTAssertNotNil(client.conversations.items)\n        XCTAssertNotNil(client.evals.runs.outputItems)\n        XCTAssertNotNil(client.containers.files.content)\n        XCTAssertNotNil(client.skills.versions.content)\n        XCTAssertNotNil(client.skills.content)\n        XCTAssertNotNil(client.beta.assistants)\n        XCTAssertNotNil(client.beta.threads.messages)\n        XCTAssertNotNil(client.beta.threads.runs.steps)\n        XCTAssertNotNil(client.beta.chatkit.sessions)\n        XCTAssertNotNil(client.beta.chatkit.threads)\n        XCTAssertNotNil(client.beta.realtime.sessions)\n        XCTAssertNotNil(client.beta.realtime.transcriptionSessions)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIContainersTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIContainersTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testContainerFileCreateParametersEncodeFileId() throws {\n        let params = ContainerFileCreateParameters(fileID: \"file_123\")\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n        XCTAssertEqual(object[\"file_id\"] as? String, \"file_123\")\n    }\n\n    func testContainerMethodsAreExposed() {\n        let client = makeClient()\n\n        let createContainer: (ContainerCreateParameters) async throws -> ContainerObject = client.containers.create\n        let listContainers: () async throws -> ContainerListResponse = client.containers.list\n        let retrieveContainer: (String) async throws -> ContainerObject = client.containers.retrieve\n        let deleteContainer: (String) async throws -> DeleteObject = client.containers.delete\n\n        let createContainerFile: (String, ContainerFileCreateParameters) async throws -> ContainerFileObject = client.containers.files.create\n        let listContainerFiles: (String) async throws -> ContainerFileListResponse = client.containers.files.list\n        let retrieveContainerFile: (String, String) async throws -> ContainerFileObject = client.containers.files.retrieve\n        let deleteContainerFile: (String, String) async throws -> DeleteObject = client.containers.files.delete\n        let retrieveContainerFileContent: (String, String) async throws -> Data = client.containers.files.content.retrieve\n\n        XCTAssertNotNil(createContainer)\n        XCTAssertNotNil(listContainers)\n        XCTAssertNotNil(retrieveContainer)\n        XCTAssertNotNil(deleteContainer)\n        XCTAssertNotNil(createContainerFile)\n        XCTAssertNotNil(listContainerFiles)\n        XCTAssertNotNil(retrieveContainerFile)\n        XCTAssertNotNil(deleteContainerFile)\n        XCTAssertNotNil(retrieveContainerFileContent)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIConversationsTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIConversationsTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testConversationItemCreateParametersEncode() throws {\n        let params = ConversationItemCreateParameters(role: \"user\", content: \"hello\")\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n        XCTAssertEqual(object[\"type\"] as? String, \"message\")\n        XCTAssertEqual(object[\"role\"] as? String, \"user\")\n        XCTAssertEqual(object[\"content\"] as? String, \"hello\")\n    }\n\n    func testConversationMethodsAreExposed() {\n        let client = makeClient()\n\n        let createConversation: (ConversationCreateParameters) async throws -> ConversationObject = client.conversations.create\n        let listConversation: () async throws -> ConversationListResponse = client.conversations.list\n        let retrieveConversation: (String) async throws -> ConversationObject = client.conversations.retrieve\n        let deleteConversation: (String) async throws -> DeleteObject = client.conversations.delete\n\n        let listItems: (String) async throws -> ConversationItemListResponse = client.conversations.items.list\n        let createItem: (String, ConversationItemCreateParameters) async throws -> ConversationItemObject = client.conversations.items.create\n        let retrieveItem: (String, String) async throws -> ConversationItemObject = client.conversations.items.retrieve\n        let deleteItem: (String, String) async throws -> DeleteObject = client.conversations.items.delete\n\n        XCTAssertNotNil(createConversation)\n        XCTAssertNotNil(listConversation)\n        XCTAssertNotNil(retrieveConversation)\n        XCTAssertNotNil(deleteConversation)\n        XCTAssertNotNil(listItems)\n        XCTAssertNotNil(createItem)\n        XCTAssertNotNil(retrieveItem)\n        XCTAssertNotNil(deleteItem)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIEncodingMigrationTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIEncodingMigrationTests: XCTestCase {\n    private func jsonObject<T: Encodable>(_ value: T) throws -> [String: Any] {\n        let data = try JSONEncoder().encode(value)\n        guard let object = try JSONSerialization.jsonObject(with: data) as? [String: Any] else {\n            XCTFail(\"Expected JSON dictionary\")\n            return [:]\n        }\n        return object\n    }\n\n    func testCompletionParametersEncodeSnakeCaseKeys() throws {\n        let params = CompletionParameters(\n            model: .textCurie001,\n            prompt: [\"hello\"],\n            maxTokens: 32,\n            temperature: 0.5,\n            topP: 0.9,\n            numberOfCompletions: 2,\n            stream: true\n        )\n\n        let encoded = try jsonObject(params)\n        XCTAssertEqual(encoded[\"model\"] as? String, \"text-curie-001\")\n        XCTAssertEqual(encoded[\"max_tokens\"] as? Int, 32)\n        XCTAssertEqual(encoded[\"top_p\"] as? Double, 0.9)\n        XCTAssertEqual(encoded[\"n\"] as? Int, 2)\n        XCTAssertEqual(encoded[\"stream\"] as? Bool, true)\n    }\n\n    func testChatParametersEncodeModelAndFunctions() throws {\n        let parameters = Parameters(\n            type: \"object\",\n            properties: [\n                \"location\": ParameterDetail(type: \"string\")\n            ],\n            required: [\"location\"]\n        )\n        let function = Function(\n            name: \"lookup_weather\",\n            description: \"Find weather for city\",\n            parameters: parameters\n        )\n        let tool = ChatTool(function: function)\n        let params = ChatParameters(\n            model: .gpt4,\n            customModel: \"gpt-5.2\",\n            messages: [ChatMessage(role: .user, content: \"hello\")],\n            functionCall: \"auto\",\n            functions: [function],\n            tools: [tool],\n            toolChoice: \"required\",\n            responseFormat: ChatResponseFormat(type: .jsonObject),\n            seed: 7,\n            maxCompletionTokens: 128,\n            parallelToolCalls: true,\n            logprobs: true,\n            topLogprobs: 2\n        )\n\n        let encoded = try jsonObject(params)\n        XCTAssertEqual(encoded[\"model\"] as? String, \"gpt-5.2\")\n        XCTAssertEqual(encoded[\"function_call\"] as? String, \"auto\")\n        XCTAssertNotNil(encoded[\"functions\"])\n        XCTAssertEqual(encoded[\"tool_choice\"] as? String, \"required\")\n        XCTAssertEqual(encoded[\"seed\"] as? Int, 7)\n        XCTAssertEqual(encoded[\"max_completion_tokens\"] as? Int, 128)\n        XCTAssertEqual(encoded[\"parallel_tool_calls\"] as? Bool, true)\n        XCTAssertEqual(encoded[\"logprobs\"] as? Bool, true)\n        XCTAssertEqual(encoded[\"top_logprobs\"] as? Int, 2)\n        XCTAssertNotNil(encoded[\"tools\"])\n        XCTAssertNotNil(encoded[\"response_format\"])\n    }\n\n    func testImageParametersEncodeExpectedKeyNames() throws {\n        let params = ImageParameters(\n            prompt: \"A test image\",\n            numberofImages: 1,\n            resolution: .large,\n            quality: .hd,\n            style: .vivid,\n            model: .dalle3,\n            responseFormat: .url\n        )\n\n        let encoded = try jsonObject(params)\n        XCTAssertEqual(encoded[\"prompt\"] as? String, \"A test image\")\n        XCTAssertEqual(encoded[\"n\"] as? Int, 1)\n        XCTAssertEqual(encoded[\"size\"] as? String, \"1024x1024\")\n        XCTAssertEqual(encoded[\"response_format\"] as? String, \"url\")\n        XCTAssertEqual(encoded[\"model\"] as? String, \"dall-e-3\")\n    }\n\n    func testEmbeddingsParametersEncodeDirectly() throws {\n        let params = EmbeddingsParameters(model: \"text-embedding-3-small\", input: \"hello\", user: \"u1\")\n        let encoded = try jsonObject(params)\n\n        XCTAssertEqual(encoded[\"model\"] as? String, \"text-embedding-3-small\")\n        XCTAssertEqual(encoded[\"input\"] as? String, \"hello\")\n        XCTAssertEqual(encoded[\"user\"] as? String, \"u1\")\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIEvalsTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIEvalsTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testEvalRunCreateParametersEncodeInput() throws {\n        let params = EvalRunCreateParameters(input: \"sample-input\", model: \"gpt-5.2\")\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n        XCTAssertEqual(object[\"input\"] as? String, \"sample-input\")\n        XCTAssertEqual(object[\"model\"] as? String, \"gpt-5.2\")\n    }\n\n    func testEvalMethodsAreExposed() {\n        let client = makeClient()\n\n        let createEval: (EvalCreateParameters) async throws -> EvalObject = client.evals.create\n        let listEvals: () async throws -> EvalListResponse = client.evals.list\n        let retrieveEval: (String) async throws -> EvalObject = client.evals.retrieve\n        let deleteEval: (String) async throws -> DeleteObject = client.evals.delete\n\n        let createRun: (String, EvalRunCreateParameters) async throws -> EvalRunObject = client.evals.runs.create\n        let listRuns: (String) async throws -> EvalRunListResponse = client.evals.runs.list\n        let retrieveRun: (String, String) async throws -> EvalRunObject = client.evals.runs.retrieve\n        let cancelRun: (String, String) async throws -> EvalRunObject = client.evals.runs.cancel\n        let listOutputItems: (String, String) async throws -> EvalRunOutputItemListResponse = client.evals.runs.outputItems.list\n\n        XCTAssertNotNil(createEval)\n        XCTAssertNotNil(listEvals)\n        XCTAssertNotNil(retrieveEval)\n        XCTAssertNotNil(deleteEval)\n        XCTAssertNotNil(createRun)\n        XCTAssertNotNil(listRuns)\n        XCTAssertNotNil(retrieveRun)\n        XCTAssertNotNil(cancelRun)\n        XCTAssertNotNil(listOutputItems)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIFineTuningTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIFineTuningTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testFineTuningParametersEncodeTrainingFileKey() throws {\n        let params = FineTuningJobCreateParameters(\n            model: \"gpt-4o-mini\",\n            trainingFileID: \"file_train\",\n            validationFileID: \"file_val\"\n        )\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n\n        XCTAssertEqual(object[\"training_file\"] as? String, \"file_train\")\n        XCTAssertEqual(object[\"validation_file\"] as? String, \"file_val\")\n    }\n\n    func testFineTuningMethodsAreExposed() {\n        let client = makeClient()\n\n        let createJob: (FineTuningJobCreateParameters) async throws -> FineTuningJobObject = client.fineTuning.jobs.create\n        let listJobs: () async throws -> FineTuningJobListResponse = client.fineTuning.jobs.list\n        let retrieveJob: (String) async throws -> FineTuningJobObject = client.fineTuning.jobs.retrieve\n        let cancelJob: (String) async throws -> FineTuningJobObject = client.fineTuning.jobs.cancel\n        let listEvents: (String) async throws -> FineTuningJobEventListResponse = client.fineTuning.jobs.listEvents\n        let listCheckpoints: (String) async throws -> FineTuningCheckpointListResponse = client.fineTuning.jobs.listCheckpoints\n\n        XCTAssertNotNil(createJob)\n        XCTAssertNotNil(listJobs)\n        XCTAssertNotNil(retrieveJob)\n        XCTAssertNotNil(cancelJob)\n        XCTAssertNotNil(listEvents)\n        XCTAssertNotNil(listCheckpoints)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIRealtimeTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIRealtimeTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testRealtimeReferParameterEncoding() throws {\n        let params = RealtimeCallReferParameters(target: \"agent-2\", reason: \"escalation\")\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n        XCTAssertEqual(object[\"target\"] as? String, \"agent-2\")\n        XCTAssertEqual(object[\"reason\"] as? String, \"escalation\")\n    }\n\n    func testRealtimeMethodsAreExposed() async throws {\n        let client = makeClient()\n\n        let createCall: (RealtimeCallCreateParameters) async throws -> RealtimeCallObject = client.realtime.calls.create\n        let acceptCall: (String) async throws -> RealtimeCallObject = client.realtime.calls.accept\n        let hangupCall: (String) async throws -> RealtimeCallObject = client.realtime.calls.hangup\n        let referCall: (String, RealtimeCallReferParameters) async throws -> RealtimeCallObject = client.realtime.calls.refer\n        let rejectCall: (String) async throws -> RealtimeCallObject = client.realtime.calls.reject\n        let createSecret: (RealtimeClientSecretCreateParameters) async throws -> RealtimeClientSecretResponse = client.realtime.clientSecrets.create\n\n        XCTAssertNotNil(createCall)\n        XCTAssertNotNil(acceptCall)\n        XCTAssertNotNil(hangupCall)\n        XCTAssertNotNil(referCall)\n        XCTAssertNotNil(rejectCall)\n        XCTAssertNotNil(createSecret)\n\n        let connection = await client.realtime.connect(options: .init(model: \"gpt-realtime\")).enter()\n        let event = await connection.receive()\n        XCTAssertEqual(event?.type, \"connected\")\n        await connection.close()\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIResponsesTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIResponsesTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testResponseInputTokenParametersEncode() throws {\n        let params = ResponseInputTokensParameters(model: \"gpt-5.2\", input: \"hello\")\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n        XCTAssertEqual(object[\"model\"] as? String, \"gpt-5.2\")\n        XCTAssertEqual(object[\"input\"] as? String, \"hello\")\n    }\n\n    func testResponseResourceMethodsAreExposed() {\n        let client = makeClient()\n\n        let createResponse: (ResponseCreateParameters) async throws -> ResponseObject = client.responses.create\n        let parseResponse: (ResponseCreateParameters) async throws -> ResponseObject = client.responses.parse\n        let streamResponse: (ResponseCreateParameters) throws -> AsyncThrowingStream<ResponseObject, Error> = client.responses.stream\n        let retrieveResponse: (String) async throws -> ResponseObject = client.responses.retrieve\n        let cancelResponse: (String) async throws -> ResponseObject = client.responses.cancel\n        let deleteResponse: (String) async throws -> DeleteObject = client.responses.delete\n\n        let listInputItems: (String) async throws -> ResponseInputItemListResponse = client.responses.inputItems.list\n        let countInputTokens: (ResponseInputTokensParameters) async throws -> ResponseInputTokenCount = client.responses.inputTokens.create\n\n        XCTAssertNotNil(createResponse)\n        XCTAssertNotNil(parseResponse)\n        XCTAssertNotNil(streamResponse)\n        XCTAssertNotNil(retrieveResponse)\n        XCTAssertNotNil(cancelResponse)\n        XCTAssertNotNil(deleteResponse)\n        XCTAssertNotNil(listInputItems)\n        XCTAssertNotNil(countInputTokens)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAISkillsAndVideosTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAISkillsAndVideosTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testVideoCreateParametersEncodePrompt() throws {\n        let params = VideoCreateParameters(model: \"sora-1\", prompt: \"A fast river in spring\")\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n        XCTAssertEqual(object[\"model\"] as? String, \"sora-1\")\n        XCTAssertEqual(object[\"prompt\"] as? String, \"A fast river in spring\")\n    }\n\n    func testSkillsAndVideosMethodsAreExposed() {\n        let client = makeClient()\n\n        let createSkill: (SkillCreateParameters) async throws -> SkillObject = client.skills.create\n        let listSkills: () async throws -> SkillListResponse = client.skills.list\n        let retrieveSkill: (String) async throws -> SkillObject = client.skills.retrieve\n        let updateSkill: (String, SkillUpdateParameters) async throws -> SkillObject = client.skills.update\n        let deleteSkill: (String) async throws -> DeleteObject = client.skills.delete\n\n        let retrieveSkillContent: (String) async throws -> Data = client.skills.content.retrieve\n        let updateSkillContent: (String, SkillContentUpdateParameters) async throws -> SkillObject = client.skills.content.update\n        let listVersions: (String) async throws -> SkillVersionListResponse = client.skills.versions.list\n        let retrieveVersion: (String, String) async throws -> SkillVersionObject = client.skills.versions.retrieve\n        let retrieveVersionContent: (String, String) async throws -> Data = client.skills.versions.content.retrieve\n\n        let createVideo: (VideoCreateParameters) async throws -> VideoObject = client.videos.create\n        let listVideos: () async throws -> VideoListResponse = client.videos.list\n        let retrieveVideo: (String) async throws -> VideoObject = client.videos.retrieve\n        let cancelVideo: (String) async throws -> VideoObject = client.videos.cancel\n\n        XCTAssertNotNil(createSkill)\n        XCTAssertNotNil(listSkills)\n        XCTAssertNotNil(retrieveSkill)\n        XCTAssertNotNil(updateSkill)\n        XCTAssertNotNil(deleteSkill)\n        XCTAssertNotNil(retrieveSkillContent)\n        XCTAssertNotNil(updateSkillContent)\n        XCTAssertNotNil(listVersions)\n        XCTAssertNotNil(retrieveVersion)\n        XCTAssertNotNil(retrieveVersionContent)\n        XCTAssertNotNil(createVideo)\n        XCTAssertNotNil(listVideos)\n        XCTAssertNotNil(retrieveVideo)\n        XCTAssertNotNil(cancelVideo)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAITransportOptionsTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAITransportOptionsTests: XCTestCase {\n    func testConfigurationHeadersIncludeOrganizationProjectAndCustomHeaders() {\n        let config = Configuration(\n            apiKey: \"test_key\",\n            organizationId: \"org_test\",\n            projectId: \"proj_test\",\n            webhookSecret: \"whsec_test\",\n            baseURL: URL(string: \"https://example.com/v1\")!,\n            requestOptions: OpenAIRequestOptions(\n                timeoutInterval: 42,\n                maxRetries: 3,\n                additionalHeaders: [\"X-Test-Header\": \"value\"]\n            )\n        )\n\n        let headers = OpenAIKitSession.shared.headers(for: config)\n\n        XCTAssertEqual(headers[\"Authorization\"], \"Bearer test_key\")\n        XCTAssertEqual(headers[\"OpenAI-Organization\"], \"org_test\")\n        XCTAssertEqual(headers[\"OpenAI-Project\"], \"proj_test\")\n        XCTAssertEqual(headers[\"X-Test-Header\"], \"value\")\n    }\n\n    func testStatusErrorMappingUsesTypedCases() {\n        let payload = \"\"\"\n        {\n          \"error\": {\n            \"message\": \"invalid request\",\n            \"type\": \"invalid_request_error\",\n            \"param\": null,\n            \"code\": \"bad_request\"\n          }\n        }\n        \"\"\".data(using: .utf8)!\n\n        let badRequest = OpenAIKitSession.statusError(for: 400, data: payload)\n        if case .badRequest(let response) = badRequest {\n            XCTAssertEqual(response?.error.message, \"invalid request\")\n        } else {\n            XCTFail(\"Expected .badRequest\")\n        }\n\n        let unauthorized = OpenAIKitSession.statusError(for: 401, data: payload)\n        if case .authentication = unauthorized {\n            XCTAssertTrue(true)\n        } else {\n            XCTFail(\"Expected .authentication\")\n        }\n\n        let rateLimited = OpenAIKitSession.statusError(for: 429, data: payload)\n        if case .rateLimit = rateLimited {\n            XCTAssertTrue(true)\n        } else {\n            XCTFail(\"Expected .rateLimit\")\n        }\n\n        let server = OpenAIKitSession.statusError(for: 503, data: payload)\n        if case .internalServer(let code, _) = server {\n            XCTAssertEqual(code, 503)\n        } else {\n            XCTFail(\"Expected .internalServer\")\n        }\n\n        let unexpected = OpenAIKitSession.statusError(for: 418, data: payload)\n        if case .unexpectedStatusCode(let code, _) = unexpected {\n            XCTAssertEqual(code, 418)\n        } else {\n            XCTFail(\"Expected .unexpectedStatusCode\")\n        }\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIUploadsTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIUploadsTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testUploadCompleteParametersEncodePartIds() throws {\n        let params = UploadCompleteParameters(partIDs: [\"part_1\", \"part_2\"])\n        let data = try JSONEncoder().encode(params)\n        let object = try XCTUnwrap(try JSONSerialization.jsonObject(with: data) as? [String: Any])\n        let partIDs = object[\"part_ids\"] as? [String]\n        XCTAssertEqual(partIDs?.count, 2)\n    }\n\n    func testUploadMethodsAreExposed() {\n        let client = makeClient()\n\n        let createUpload: (UploadCreateParameters) async throws -> UploadObject = client.uploads.create\n        let retrieveUpload: (String) async throws -> UploadObject = client.uploads.retrieve\n        let cancelUpload: (String) async throws -> UploadObject = client.uploads.cancel\n        let completeUpload: (String, UploadCompleteParameters) async throws -> UploadObject = client.uploads.complete\n        let createPart: (String, UploadPartCreateParameters) async throws -> UploadPartObject = client.uploads.parts.create\n\n        XCTAssertNotNil(createUpload)\n        XCTAssertNotNil(retrieveUpload)\n        XCTAssertNotNil(cancelUpload)\n        XCTAssertNotNil(completeUpload)\n        XCTAssertNotNil(createPart)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIVectorStoresTests.swift",
    "content": "import XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIVectorStoresTests: XCTestCase {\n    private func makeClient() -> OpenAI {\n        OpenAI(.init(organizationId: \"org_test\", apiKey: \"test_key\"))\n    }\n\n    func testVectorStoreParametersEncodeFileIdsKey() throws {\n        let createParams = VectorStoreCreateParameters(name: \"Docs\", fileIDs: [\"file_1\", \"file_2\"])\n        let createData = try JSONEncoder().encode(createParams)\n        let createObject = try XCTUnwrap(try JSONSerialization.jsonObject(with: createData) as? [String: Any])\n        XCTAssertNotNil(createObject[\"file_ids\"])\n\n        let fileParams = VectorStoreFileCreateParameters(fileID: \"file_123\")\n        let fileData = try JSONEncoder().encode(fileParams)\n        let fileObject = try XCTUnwrap(try JSONSerialization.jsonObject(with: fileData) as? [String: Any])\n        XCTAssertEqual(fileObject[\"file_id\"] as? String, \"file_123\")\n    }\n\n    func testVectorStoreMethodsAreExposed() {\n        let client = makeClient()\n\n        let createStore: (VectorStoreCreateParameters) async throws -> VectorStoreObject = client.vectorStores.create\n        let listStores: () async throws -> VectorStoreListResponse = client.vectorStores.list\n        let retrieveStore: (String) async throws -> VectorStoreObject = client.vectorStores.retrieve\n        let updateStore: (String, VectorStoreUpdateParameters) async throws -> VectorStoreObject = client.vectorStores.update\n        let deleteStore: (String) async throws -> DeleteObject = client.vectorStores.delete\n\n        let createFile: (String, VectorStoreFileCreateParameters) async throws -> VectorStoreFileObject = client.vectorStores.files.create\n        let listFiles: (String) async throws -> VectorStoreFileListResponse = client.vectorStores.files.list\n        let retrieveFile: (String, String) async throws -> VectorStoreFileObject = client.vectorStores.files.retrieve\n        let deleteFile: (String, String) async throws -> DeleteObject = client.vectorStores.files.delete\n\n        let createBatch: (String, VectorStoreFileBatchCreateParameters) async throws -> VectorStoreFileBatchObject = client.vectorStores.fileBatches.create\n        let listBatches: (String) async throws -> VectorStoreFileBatchListResponse = client.vectorStores.fileBatches.list\n        let retrieveBatch: (String, String) async throws -> VectorStoreFileBatchObject = client.vectorStores.fileBatches.retrieve\n        let cancelBatch: (String, String) async throws -> VectorStoreFileBatchObject = client.vectorStores.fileBatches.cancel\n\n        XCTAssertNotNil(createStore)\n        XCTAssertNotNil(listStores)\n        XCTAssertNotNil(retrieveStore)\n        XCTAssertNotNil(updateStore)\n        XCTAssertNotNil(deleteStore)\n        XCTAssertNotNil(createFile)\n        XCTAssertNotNil(listFiles)\n        XCTAssertNotNil(retrieveFile)\n        XCTAssertNotNil(deleteFile)\n        XCTAssertNotNil(createBatch)\n        XCTAssertNotNil(listBatches)\n        XCTAssertNotNil(retrieveBatch)\n        XCTAssertNotNil(cancelBatch)\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Client/OpenAIWebhooksTests.swift",
    "content": "import CryptoKit\nimport XCTest\n@testable import OpenAIKit\n\n@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)\nfinal class OpenAIWebhooksTests: XCTestCase {\n    private struct TestWebhookEvent: Decodable {\n        let type: String\n    }\n\n    private let secret = \"whsec_test_123\"\n\n    private func makeClient() -> OpenAI {\n        OpenAI(\n            .init(\n                apiKey: \"test_key\",\n                organizationId: \"org_test\",\n                webhookSecret: secret\n            )\n        )\n    }\n\n    private func signature(timestamp: String, payload: String) -> String {\n        let message = \"\\(timestamp).\\(payload)\"\n        let key = SymmetricKey(data: Data(secret.utf8))\n        let digest = HMAC<SHA256>.authenticationCode(for: Data(message.utf8), using: key)\n        return Data(digest).map { String(format: \"%02x\", $0) }.joined()\n    }\n\n    func testVerifySignatureAcceptsValidHeaders() throws {\n        let client = makeClient()\n        let payload = #\"{\"type\":\"response.completed\"}\"#\n        let timestamp = \"1700000000\"\n        let sig = signature(timestamp: timestamp, payload: payload)\n        let headers = [\n            \"OpenAI-Timestamp\": timestamp,\n            \"OpenAI-Signature\": \"v1=\\(sig)\"\n        ]\n\n        XCTAssertNoThrow(try client.webhooks.verifySignature(payload: payload, headers: headers))\n    }\n\n    func testVerifySignatureRejectsInvalidSignature() {\n        let client = makeClient()\n        let payload = #\"{\"type\":\"response.completed\"}\"#\n        let headers = [\n            \"OpenAI-Timestamp\": \"1700000000\",\n            \"OpenAI-Signature\": \"v1=deadbeef\"\n        ]\n\n        XCTAssertThrowsError(try client.webhooks.verifySignature(payload: payload, headers: headers))\n    }\n\n    func testUnwrapVerifiesAndDecodes() throws {\n        let client = makeClient()\n        let payload = #\"{\"type\":\"response.completed\"}\"#\n        let timestamp = \"1700000000\"\n        let sig = signature(timestamp: timestamp, payload: payload)\n        let headers = [\n            \"webhook-timestamp\": timestamp,\n            \"webhook-signature\": sig\n        ]\n\n        let event = try client.webhooks.unwrap(payload: payload, headers: headers, as: TestWebhookEvent.self)\n        XCTAssertEqual(event.type, \"response.completed\")\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Extension/BundleExtension.swift",
    "content": "//\n//  BundleExtension.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport Foundation\n\nextension Bundle {\n    static var test: Bundle {\n        let bundle: Bundle\n        #if SWIFT_PACKAGE\n        bundle = Bundle.module\n        #else\n        bundle = Bundle(for: OpenAIKitTests.self)\n        #endif\n\n        return bundle\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Mocks/MockOpenAI.swift",
    "content": "//\n//  MockOpenAI.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nimport Foundation\n@testable import OpenAIKit\n\nclass MockOpenAI: OpenAIProtocol {\n    func getDecodedData<T: Decodable>(_ type: T.Type = T.self, with jsonData: String) async throws -> T {\n        guard let url = Bundle.test.url(forResource: jsonData, withExtension: \"json\") else {\n            print(\"Getting Url for bundle has failed.\")\n            throw MockOpenAIError.urlBundleFailed\n        }\n\n        guard let data = try? Data(contentsOf: url) else {\n            print(\"Setting data using contents of url has failed.\")\n            throw MockOpenAIError.dataCoersionFailed\n        }\n\n        let decoder = JSONDecoder()\n        decoder.keyDecodingStrategy = .useDefaultKeys\n\n        guard let result = try? decoder.decode(T.self, from: data) else {\n            print(\"Decoding data has failed.\")\n            throw MockOpenAIError.dataCodingFailed\n        }\n\n        return result\n    }\n\n    func listModels() async throws -> ListModelResponse {\n        return try await getDecodedData(with: \"ModelsResponse\") as ListModelResponse\n    }\n\n    func retrieveModel(modelId id: String) async throws -> Model {\n        return try await getDecodedData(with: \"RetrieveModelResponse\") as Model\n    }\n\n    func generateCompletion(parameters param: CompletionParameters) async throws -> CompletionResponse {\n        return try await getDecodedData(with: \"CompletionResponse\") as CompletionResponse\n    }\n\n    func generateCompletionStreaming(\n        parameters param: OpenAIKit.CompletionParameters\n    ) throws -> AsyncThrowingStream<OpenAIKit.CompletionResponse, Error> {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func createImage(parameters param: ImageParameters) async throws -> ImageResponse {\n        if let user = param.user {\n            switch user {\n            case \"promptApple\": return try await getDecodedData(with: \"ImageApple\") as ImageResponse\n            case \"promptOtter\": return try await getDecodedData(with: \"ImageOtter\") as ImageResponse\n            case \"promptEmpty\": throw MockOpenAIError.invalidPrompt\n            case \"number1\": return try await getDecodedData(with: \"ImageURL1\") as ImageResponse\n            case \"number2\": return try await getDecodedData(with: \"ImageURL2\") as ImageResponse\n            case \"number10\": return try await getDecodedData(with: \"ImageURL10\") as ImageResponse\n            case \"number11\": return try await getDecodedData(with: \"ImageURL11\") as ImageResponse\n            case \"number0\": return try await getDecodedData(with: \"ImageURL0\") as ImageResponse\n            case \"number-1\": return try await getDecodedData(with: \"ImageURL-1\") as ImageResponse\n            case \"sizeSmallURL\": return try await getDecodedData(with: \"ImageURLSmall\") as ImageResponse\n            case \"sizeSmallB64\": return try await getDecodedData(with: \"ImageB64Small\") as ImageResponse\n            case \"sizeMediumURL\": return try await getDecodedData(with: \"ImageURLMedium\") as ImageResponse\n            case \"sizeMediumB64\": return try await getDecodedData(with: \"ImageB64Medium\") as ImageResponse\n            case \"sizeLargeURL\": return try await getDecodedData(with: \"ImageURLLarge\") as ImageResponse\n            case \"sizeLargeB64\": return try await getDecodedData(with: \"ImageB64Large\") as ImageResponse\n            case \"responseURL\": return try await getDecodedData(with: \"ImageURL\") as ImageResponse\n            case \"responseB64\": return try await getDecodedData(with: \"ImageB64\") as ImageResponse\n            default: throw MockOpenAIError.invalidUser\n            }\n        }\n\n        throw MockOpenAIError.invalidUser\n    }\n\n    func generateChatCompletion(parameters param: ChatParameters) async throws -> ChatResponse {\n        throw MockOpenAIError.notImplemented\n    }\n    \n    func generateChatCompletionStreaming(\n        parameters param: ChatParameters\n    ) throws -> AsyncThrowingStream<ChatResponse, Error> {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func generateImageEdits(parameters param: ImageEditParameters) async throws -> ImageResponse {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func generateImageVariations(parameters param: ImageVariationParameters) async throws -> ImageResponse {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func createEmbeddings(parameters param: EmbeddingsParameters) async throws -> EmbeddingsResponse {\n        return try await getDecodedData(with: \"EmbeddingsResponse\") as EmbeddingsResponse\n    }\n\n    func createTranscription(parameters param: TranscriptionParameters) async throws -> TranscriptionResponse {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func createTranslation(parameters param: TranscriptionParameters) async throws -> TranscriptionResponse {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func createSpeech(parameters param: SpeechParameters) async throws -> Data {\n        Data(\"audio\".utf8)\n    }\n\n    func listFiles() async throws -> ListFilesResponse {\n        return try await getDecodedData(with: \"ListFilesResponse\") as ListFilesResponse\n    }\n\n    func uploadFile(parameters param: UploadFileParameters) async throws -> File {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func deleteFile(fileId id: String) async throws -> DeleteObject {\n        return try await getDecodedData(with: \"DeleteFileResponse\") as DeleteObject\n    }\n\n    func retrieveFile(fileId id: String) async throws -> File {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func retrieveFileContent(fileId id: String) async throws -> [OpenAIKit.FileContent] {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func deleteModel(model: String) async throws -> DeleteObject {\n        throw MockOpenAIError.notImplemented\n    }\n\n    func checkContentPolicy(parameters param: ContentPolicyParameters) async throws -> ContentPolicyResponse {\n        return try await getDecodedData(with: \"ContentPolicyResponse\") as ContentPolicyResponse\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/OpenAIKitTests.swift",
    "content": "//\n//  OpenAIKitTests.swift\n//  OpenAIKit\n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport XCTest\n@testable import OpenAIKit\n\nfinal class OpenAIKitTests: XCTestCase {\n    func testThatVerifiesOpenAIIsAbleToFetchAListOfModels() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            // When\n            let modelsResponse = try await mockOpenAI.listModels()\n\n            // Then\n            XCTAssertEqual(\n                modelsResponse.object,\n                .list,\n                \"Model Response is not a list object.\"\n            )\n            XCTAssertFalse(\n                modelsResponse.data.isEmpty,\n                \"Model Response data is empty.\"\n            )\n            XCTAssertEqual(\n                modelsResponse.data[0].id,\n                \"model-id-0\",\n                \"Model Response doesn't contain the named model.\"\n            )\n            XCTAssertEqual(\n                modelsResponse.data[0].object,\n                .model,\n                \"Model type isn't a model.\"\n            )\n            XCTAssertEqual(\n                modelsResponse.data[0].created,\n                1686935002,\n                \"Model doesn't contain correct creation date.\"\n            )\n            XCTAssertEqual(\n                modelsResponse.data[0].ownedBy,\n                \"organization-owner\",\n                \"Model doesn't have correct owner.\"\n            )\n        } catch {\n            XCTFail(\"LIST MODELS TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToRetrieveModelUsingID() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            // When\n            let model = try await mockOpenAI.retrieveModel(\n                modelId: \"davinci\"\n            )\n\n            // Then\n            XCTAssertEqual(\n                model.id,\n                \"davinci\",\n                \"Model Response doesn't contain the Davinvi model.\"\n            )\n            XCTAssertEqual(\n                model.object,\n                .model,\n                \"Model type isn't a model.\"\n            )\n            XCTAssertEqual(\n                model.created,\n                1686935002,\n                \"Model doesn't contain correct creation date.\"\n            )\n            XCTAssertEqual(\n                model.ownedBy,\n                \"openai\",\n                \"Model doesn't have correct owner.\"\n            )\n        } catch {\n            XCTFail(\"RETRIEVE MODEL TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToCompleteTextPrompts() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            let completionParameter = CompletionParameters(model: .davinci)\n\n            // When\n            let completionResponse = try await mockOpenAI.generateCompletion(\n                parameters: completionParameter\n            )\n\n            // Then\n            XCTAssertEqual(\n                completionResponse.id,\n                \"cmpl-69nq0IKF1lwssd3QdLnz4fQ4yCt4O\",\n                \"Completion Response has incorrect ID.\"\n            )\n            XCTAssertEqual(\n                completionResponse.object,\n                .textCompletion,\n                \"Completion Response has incorrect object type.\"\n            )\n            XCTAssertEqual(\n                completionResponse.created,\n                1667794548,\n                \"Completion Response has incorrect creation date.\"\n            )\n            XCTAssertEqual(\n                completionResponse.model,\n                \"text-davinci-002\",\n                \"Completion Response has incorrect model.\"\n            )\n            XCTAssertTrue(\n                completionResponse.choices[0].text.contains(\"This is a test\"),\n                \"Completion Response has incorrect completion.\"\n            )\n            XCTAssertEqual(\n                completionResponse.choices[0].index,\n                0,\n                \"Completion Response has incorrect index.\"\n            )\n            XCTAssertNil(\n                completionResponse.choices[0].logprobs,\n                \"Completion Response shouldn't have logprobs.\"\n            )\n            XCTAssertEqual(\n                completionResponse.choices[0].finishReason!,\n                \"length\",\n                \"Completion Response has incorrect finish reason.\"\n            )\n            XCTAssertEqual(\n                completionResponse.usage.promptTokens,\n                5,\n                \"Completion Response has incorrect prompt token usage.\"\n            )\n            XCTAssertEqual(\n                completionResponse.usage.completionTokens,\n                6,\n                \"Completion Response has incorrect completion token usage.\"\n            )\n            XCTAssertEqual(\n                completionResponse.usage.totalTokens,\n                11,\n                \"Completion Response has incorrect total token usage.\"\n            )\n        } catch {\n            XCTFail(\"COMPLETION PROMPT TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToGenerateImagesUsingGivenPrompts() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            let parameterApple = ImageParameters(\n                prompt: \"A red apple.\",\n                user: \"promptApple\"\n            )\n            let parameterOtter = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                user: \"promptOtter\"\n            )\n\n            // When\n            let apple = try await mockOpenAI.createImage(\n                parameters: parameterApple\n            )\n            let otter = try await mockOpenAI.createImage(\n                parameters: parameterOtter\n            )\n\n            // Then\n            XCTAssertEqual(\n                apple.created,\n                1667676516,\n                \"Created date of Apple is incorrect.\"\n            )\n            XCTAssertFalse(\n                apple.data.isEmpty,\n                \"Contents of Apple is empty.\"\n            )\n            XCTAssertTrue(\n                apple.data[0].image.contains(\"img-nsJnMAwG1wUsEx5kem6LWGvJ.png\"),\n                \"Contents of Apple URL isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                otter.created,\n                1667661280,\n                \"Created date of Otter is incorrect.\"\n            )\n            XCTAssertFalse(\n                otter.data.isEmpty,\n                \"Contents of Otter is empty.\"\n            )\n            XCTAssertTrue(\n                otter.data[0].image.contains(\"img-byoTBAgSaGlyyTCGjnFhbSVx.png\"),\n                \"Contents of Otter URL isn't valid.\"\n            )\n        } catch {\n            XCTFail(\"PROMPT TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesEmptyPromptsThrowAnError() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            // When\n            let parameterEmptyPrompt = ImageParameters(\n                prompt: \"\",\n                user: \"promptEmpty\"\n            )\n\n            // Then\n            _ = try await mockOpenAI.createImage(\n                parameters: parameterEmptyPrompt\n            )\n        } catch MockOpenAIError.invalidPrompt {\n            XCTAssertTrue(true)\n        } catch {\n            XCTFail(\"EMPTY PROMPT TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToGenerateImagesGivenDifferentResponseTypes() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            let parameterUrl = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                responseFormat: .url,\n                user: \"responseURL\"\n            )\n            let parameterB64 = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                responseFormat: .base64Json,\n                user: \"responseB64\"\n            )\n\n            // When\n            let url = try await mockOpenAI.createImage(\n                parameters: parameterUrl\n            )\n            let b64 = try await mockOpenAI.createImage(\n                parameters: parameterB64\n            )\n\n            // Then\n            XCTAssertEqual(\n                url.created,\n                1667661280,\n                \"Created date of url is incorrect.\"\n            )\n            XCTAssertFalse(\n                url.data.isEmpty,\n                \"Contents of url is empty.\"\n            )\n            XCTAssertTrue(\n                url.data[0].image.contains(\"img-byoTBAgSaGlyyTCGjnFhbSVx.png\"),\n                \"Contents of url URL isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                b64.created,\n                1667615111,\n                \"Created date of b64 is incorrect.\"\n            )\n            XCTAssertFalse(\n                b64.data.isEmpty,\n                \"Contents of b64 is empty.\"\n            )\n            XCTAssertTrue(\n                b64.data[0].image.contains(\"CAQAAAf8C/wL9AAACAQEA////AAH+/gD+/wD+AAH+AAD+Af//A\"),\n                \"Contents of b64 data isn't valid.\"\n            )\n        } catch {\n            XCTFail(\"RESPONSE TYPE TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToGenerateDifferentResolutions() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            let parameterSmallUrl = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                resolution: .small,\n                user: \"sizeSmallURL\"\n            )\n            let parameterSmallB64 = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                resolution: .small,\n                user: \"sizeSmallB64\"\n            )\n\n            let parameterMediumUrl = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                resolution: .medium,\n                user: \"sizeMediumURL\"\n            )\n            let parameterMediumB64 = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                resolution: .medium,\n                user: \"sizeMediumB64\"\n            )\n\n            let parameterLargeUrl = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                resolution: .large,\n                user: \"sizeLargeURL\"\n            )\n            let parameterLargeB64 = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                resolution: .large,\n                user: \"sizeLargeB64\"\n            )\n\n            // When\n            let smallUrl = try await mockOpenAI.createImage(\n                parameters: parameterSmallUrl\n            )\n            let smallB64 = try await mockOpenAI.createImage(\n                parameters: parameterSmallB64\n            )\n\n            let mediumUrl = try await mockOpenAI.createImage(\n                parameters: parameterMediumUrl\n            )\n            let mediumB64 = try await mockOpenAI.createImage(\n                parameters: parameterMediumB64\n            )\n\n            let largeUrl = try await mockOpenAI.createImage(\n                parameters: parameterLargeUrl\n            )\n            let largeB64 = try await mockOpenAI.createImage(\n                parameters: parameterLargeB64\n            )\n\n            // Then\n            XCTAssertEqual(\n                smallUrl.created,\n                1667661280,\n                \"Created date of smallUrl is incorrect.\"\n            )\n            XCTAssertFalse(\n                smallUrl.data.isEmpty,\n                \"Contents of smallUrl is empty.\"\n            )\n            XCTAssertTrue(\n                smallUrl.data[0].image.contains(\"img-byoTBAgSaGlyyTCGjnFhbSVx.png\"),\n                \"Contents of smallUrl URL isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                smallB64.created,\n                1667615111,\n                \"Created date of smallB64 is incorrect.\"\n            )\n            XCTAssertFalse(\n                smallB64.data.isEmpty,\n                \"Contents of smallB64 is empty.\"\n            )\n            XCTAssertTrue(\n                smallB64.data[0].image.contains(\"CAQAAAf8C/wL9AAACAQEA////AAH+/gD+/wD+AAH+AAD+Af//A\"),\n                \"Contents of smallB64 data isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                mediumUrl.created,\n                1667674510,\n                \"Created date of mediumUrl is incorrect.\"\n            )\n            XCTAssertFalse(\n                mediumUrl.data.isEmpty,\n                \"Contents of mediumUrl is empty.\"\n            )\n            XCTAssertTrue(\n                mediumUrl.data[0].image.contains(\"img-euW0HHRIAcFPddYSrH88KT5m.png\"),\n                \"Contents of mediumUrl URL isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                mediumB64.created,\n                1667674568,\n                \"Created date of mediumB64 is incorrect.\"\n            )\n            XCTAssertFalse(\n                mediumB64.data.isEmpty,\n                \"Contents of mediumB64 is empty.\"\n            )\n            XCTAssertTrue(\n                mediumB64.data[0].image.contains(\"+/v/7AP0CAwL+9/3x8vL3+PoFBQr+Afj8AgEB/wEFAAMAAwcIB\"),\n                \"Contents of mediumB64 data isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                largeUrl.created,\n                1667674848,\n                \"Created date of largeUrl is incorrect.\"\n            )\n            XCTAssertFalse(\n                largeUrl.data.isEmpty,\n                \"Contents of largeUrl is empty.\"\n            )\n            XCTAssertTrue(\n                largeUrl.data[0].image.contains(\"img-8cl5NT9LdOxfxtb50M3SoMtg.png\"),\n                \"Contents of largeUrl URL isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                largeB64.created,\n                1667674929, \"Created date of smallB64 is incorrect.\"\n            )\n            XCTAssertFalse(\n                largeB64.data.isEmpty,\n                \"Contents of smallB64 is empty.\"\n            )\n            XCTAssertTrue(\n                largeB64.data[0].image.contains(\"+BAEDAf7+/vv//gYAAQAB/gID/v38AgAA/v/+Af8BBPwA/AIAA\"),\n                \"Contents of smallB64 data isn't valid.\"\n            )\n        } catch {\n            XCTFail(\"RESOLUTION TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToGenerateImageGivenDifferentImageAmountsAndDoesNotGoOverNorUnderLimits() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            let image1Parameter = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                numberofImages: 1,\n                user: \"number1\"\n            )\n            let image2Parameter = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                numberofImages: 2,\n                user: \"number2\"\n            )\n            let image10Parameter = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                numberofImages: 10,\n                user: \"number10\"\n            )\n            let image11Parameter = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                numberofImages: 11,\n                user: \"number11\"\n            )\n            let image0Parameter = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                numberofImages: 0,\n                user: \"number0\"\n            )\n            let imageNegative1Parameter = ImageParameters(\n                prompt: \"A cute baby sea otter\",\n                numberofImages: -1,\n                user: \"number-1\"\n            )\n\n            // When\n            let image1 = try await mockOpenAI.createImage(\n                parameters: image1Parameter\n            )\n            let image2 = try await mockOpenAI.createImage(\n                parameters: image2Parameter\n            )\n            let image10 = try await mockOpenAI.createImage(\n                parameters: image10Parameter\n            )\n            let image11 = try await mockOpenAI.createImage(\n                parameters: image11Parameter\n            )\n            let image0 = try await mockOpenAI.createImage(\n                parameters: image0Parameter\n            )\n            let imageNegative1 = try await mockOpenAI.createImage(\n                parameters: imageNegative1Parameter\n            )\n\n            // Then\n            XCTAssertEqual(\n                image1.created,\n                1667661280,\n                \"Created date of image1 is incorrect.\"\n            )\n            XCTAssertFalse(\n                image1.data.isEmpty,\n                \"Contents of image1 is empty.\"\n            )\n            XCTAssertTrue(\n                image1.data[0].image.contains(\"img-byoTBAgSaGlyyTCGjnFhbSVx.png\"),\n                \"Contents of image1 URL isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                image2.created,\n                1667676103,\n                \"Created date of image2 is incorrect.\"\n            )\n            XCTAssertFalse(\n                image2.data.isEmpty,\n                \"Contents of image2 is empty.\"\n            )\n\n            image2.data.enumerated().forEach { (idx, response) in\n                XCTAssertTrue(\n                    response.image.contains(\"org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M\"),\n                    \"URL of image2 at index \\(idx) isn't valid.\"\n                )\n            }\n\n            XCTAssertEqual(\n                image10.created,\n                1667676139,\n                \"Created date of image10 is incorrect.\"\n            )\n            XCTAssertFalse(\n                image10.data.isEmpty,\n                \"Contents of image10 is empty.\"\n            )\n\n            image10.data.enumerated().forEach { (idx, response) in\n                XCTAssertTrue(\n                    response.image.contains(\"org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M\"),\n                    \"URL of image10 at index \\(idx) isn't valid.\"\n                )\n            }\n\n            XCTAssertEqual(\n                image11Parameter.numberOfImages,\n                10,\n                \"Image11's parameters wasn't set correctly.\"\n            )\n            XCTAssertEqual(\n                image11.created,\n                1667676139,\n                \"Created date of image11 is incorrect.\"\n            )\n            XCTAssertFalse(\n                image11.data.isEmpty,\n                \"Contents of image11 is empty.\"\n            )\n\n            image11.data.enumerated().forEach { (idx, response) in\n                XCTAssertTrue(\n                    response.image.contains(\"org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M\"),\n                    \"URL of image11 at index \\(idx) isn't valid.\"\n                )\n            }\n\n            XCTAssertEqual(\n                image0Parameter.numberOfImages,\n                1,\n                \"Image0's parameters wasn't set correctly.\"\n            )\n            XCTAssertEqual(\n                image0.created,\n                1667661280,\n                \"Created date of image0 is incorrect.\"\n            )\n            XCTAssertFalse(\n                image0.data.isEmpty,\n                \"Contents of image0 is empty.\"\n            )\n            XCTAssertTrue(\n                image0.data[0].image.contains(\"img-byoTBAgSaGlyyTCGjnFhbSVx.png\"),\n                \"Contents of image0 URL isn't valid.\"\n            )\n\n            XCTAssertEqual(\n                imageNegative1Parameter.numberOfImages,\n                1,\n                \"imageNegative1's parameters wasn't set correctly.\"\n            )\n            XCTAssertEqual(\n                imageNegative1.created,\n                1667661280,\n                \"Created date of imageNegative1 is incorrect.\"\n            )\n            XCTAssertFalse(\n                imageNegative1.data.isEmpty,\n                \"Contents of imageNegative1 is empty.\"\n            )\n            XCTAssertTrue(\n                imageNegative1.data[0].image.contains(\"img-byoTBAgSaGlyyTCGjnFhbSVx.png\"),\n                \"Contents of imageNegative1 URL isn't valid.\"\n            )\n        } catch {\n            XCTFail(\"IMAGE NUMBER TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToReturnEmbeddingsForInput() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n            let embeddingsParam = EmbeddingsParameters(\n                model: \"text-similarity-babbage-001\",\n                input: \"The food was delicious and the waiter...\"\n            )\n\n            // When\n            let embeddingsResponse = try await mockOpenAI.createEmbeddings(\n                parameters: embeddingsParam\n            )\n\n            // Then\n            XCTAssertEqual(\n                embeddingsResponse.object,\n                .list,\n                \"Embeddings Response is not a list object.\"\n            )\n            XCTAssertEqual(\n                embeddingsResponse.data[0].object,\n                .embedding,\n                \"Embeddings data is not an embedding object.\"\n            )\n            XCTAssertEqual(\n                embeddingsResponse.data[0].embedding.count,\n                2048,\n                \"Embeddings data doesn't contain correct amount of floats.\"\n            )\n            XCTAssertEqual(\n                embeddingsResponse.data[0].embedding[0],\n                0.0028667077,\n                \"Embeddings data isn't correct.\"\n            )\n            XCTAssertEqual(\n                embeddingsResponse.data[0].index,\n                0,\n                \"Embeddings data index isn't correct.\"\n            )\n            XCTAssertEqual(\n                embeddingsResponse.usage.promptTokens,\n                8,\n                \"Prompt token amount isn't correct.\"\n            )\n            XCTAssertEqual(\n                embeddingsResponse.usage.totalTokens,\n                8,\n                \"Total token amount isn't correct.\"\n            )\n        } catch {\n            XCTFail(\"EMBEDDINGS CREATION FAILED WITH ERROR - \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToReturnListedFiles() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            // When\n            let filesResponse = try await mockOpenAI.listFiles()\n\n            // Then\n            XCTAssertEqual(\n                filesResponse.object,\n                .list,\n                \"Files Response isn't list object.\"\n            )\n            XCTAssertEqual(\n                filesResponse.data[0].id,\n                \"file-uvdyS3qukzhVrcvxOcjk0Xss\",\n                \"File ID isn't correct.\"\n            )\n            XCTAssertEqual(\n                filesResponse.data[0].object,\n                .file,\n                \"File isn't file object.\"\n            )\n            XCTAssertEqual(\n                filesResponse.data[0].purpose,\n                \"fine-tune\",\n                \"File Purpose isn't correct.\"\n            )\n            XCTAssertEqual(\n                filesResponse.data[0].filename,\n                \"sampleData.jsonl\",\n                \"File name isn't correct\"\n            )\n            XCTAssertEqual(\n                filesResponse.data[0].bytes,\n                18950,\n                \"File size isn't correct.\"\n            )\n            XCTAssertEqual(\n                filesResponse.data[0].createdAt,\n                1668098746,\n                \"File creation date isn't correct.\"\n            )\n            XCTAssertEqual(\n                filesResponse.data[0].status,\n                .processed,\n                \"File status isn't correct.\"\n            )\n            XCTAssertNil(\n                filesResponse.data[0].statusDetails,\n                \"File status details isn't nil.\"\n            )\n        } catch {\n            XCTFail(\"LIST FILES FAILED WITH ERROR - \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToDeleteFileAndRespondWithResponse() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            // When\n            let deleteFileResponse = try await mockOpenAI.deleteFile(\n                fileId: \"file-XjGxS3KTG0uNmNOK362iJua3\"\n            )\n\n            // Then\n            XCTAssertEqual(\n                deleteFileResponse.id,\n                \"file-XjGxS3KTG0uNmNOK362iJua3\",\n                \"File ID isn't correct.\"\n            )\n            XCTAssertEqual(\n                deleteFileResponse.object,\n                .file,\n                \"File isn't file object.\"\n            )\n            XCTAssertTrue(\n                deleteFileResponse.deleted,\n                \"File isn't deleted.\"\n            )\n        } catch {\n            XCTFail(\"DELETE FILE FAILED WITH ERROR - \\(error)\")\n        }\n    }\n\n    func testThatVerifiesOpenAIIsAbleToSendContentPolicyResult() async {\n        do {\n            // Given\n            let mockOpenAI = MockOpenAI()\n\n            let contentPolicyParameter = ContentPolicyParameters(\n                input: \"I want to kill them.\"\n            )\n\n            // When\n            let contentPolicyResult = try await mockOpenAI.checkContentPolicy(\n                parameters: contentPolicyParameter\n            )\n\n            // Then\n            XCTAssertEqual(\n                contentPolicyResult.id,\n                \"modr-69OQBfTkTYrcLo7k3oL3PxmpkUeoL\",\n                \"Content Policy ID doesn't match.\"\n            )\n            XCTAssertEqual(\n                contentPolicyResult.model,\n                \"text-moderation-003\",\n                \"Content Policy Model doesn't match.\"\n            )\n            XCTAssertFalse(\n                contentPolicyResult.results.isEmpty,\n                \"Content Policy Result is empty.\"\n            )\n            XCTAssertEqual(\n                contentPolicyResult.results[0].flagged,\n                true,\n                \"Content Policy Flag doesn't match.\"\n            )\n            XCTAssertEqual(\n                contentPolicyResult.results[0].categories.hate,\n                true,\n                \"Content Policy Category doesn't match.\"\n            )\n            XCTAssertEqual(\n                contentPolicyResult.results[0].categoryScores.hate,\n                0.4068171977996826,\n                \"Content Policy Category Score doesn't match.\"\n            )\n        } catch {\n            XCTFail(\"CONTENT POLICY TEST FAILED WITH ERROR: \\(error)\")\n        }\n    }\n}\n"
  },
  {
    "path": "Tests/OpenAIKitTests/Types/Enums/MockOpenAIError.swift",
    "content": "//\n//  File.swift\n//  \n//\n//  Copyright (c) 2023 OpenDive\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//  \n\nenum MockOpenAIError: Error {\n    case urlBundleFailed\n    case dataCoersionFailed\n    case dataCodingFailed\n    case invalidUser\n    case invalidPrompt\n    case notImplemented\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Completions/CompletionResponse.json",
    "content": "{\n  \"id\": \"cmpl-69nq0IKF1lwssd3QdLnz4fQ4yCt4O\",\n  \"object\": \"text_completion\",\n  \"created\": 1667794548,\n  \"model\": \"text-davinci-002\",\n  \"choices\": [\n    {\n      \"text\": \"\\n\\nThis is a test\",\n      \"index\": 0,\n      \"logprobs\": null,\n      \"finish_reason\": \"length\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 5,\n    \"completion_tokens\": 6,\n    \"total_tokens\": 11\n  }\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Content Policy/ContentPolicyResponse.json",
    "content": "{\n  \"id\": \"modr-69OQBfTkTYrcLo7k3oL3PxmpkUeoL\",\n  \"model\": \"text-moderation-003\",\n  \"results\": [\n    {\n      \"categories\": {\n        \"hate\": true,\n        \"hate/threatening\": true,\n        \"self-harm\": false,\n        \"sexual\": false,\n        \"sexual/minors\": false,\n        \"violence\": true,\n        \"violence/graphic\": false\n      },\n      \"category_scores\": {\n        \"hate\": 0.4068171977996826,\n        \"hate/threatening\": 0.6911801695823669,\n        \"self-harm\": 6.969435344217345e-05,\n        \"sexual\": 0.00024072942323982716,\n        \"sexual/minors\": 7.919080962892622e-05,\n        \"violence\": 0.9743136763572693,\n        \"violence/graphic\": 0.0014632269740104675\n      },\n      \"flagged\": true\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Delete File/DeleteFileResponse.json",
    "content": "{\n  \"id\": \"file-XjGxS3KTG0uNmNOK362iJua3\",\n  \"object\": \"file\",\n  \"deleted\": true\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Embeddings/EmbeddingsResponse.json",
    "content": "{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"embedding\",\n      \"index\": 0,\n      \"embedding\": [\n        0.0028667077,\n        0.018867997,\n        -0.030135695,\n        -0.004034549,\n        0.024676088,\n        -0.0030139843,\n        -0.012645043,\n        0.0063681565,\n        0.007314046,\n        -0.021091666,\n        -0.004127893,\n        0.019979833,\n        0.020792965,\n        0.030384613,\n        0.01447874,\n        -0.013682202,\n        -0.007085871,\n        -0.02077637,\n        0.026335543,\n        0.04732764,\n        0.13069864,\n        0.03191131,\n        0.005542578,\n        -0.0015619616,\n        -0.0035947934,\n        -0.0041444874,\n        -0.056686968,\n        -0.0140887685,\n        -0.036773514,\n        -0.010512644,\n        0.008218449,\n        0.015764818,\n        0.00985716,\n        -0.017789353,\n        0.012827584,\n        -0.014196633,\n        0.032541905,\n        -0.02314939,\n        -0.002360574,\n        -0.029123427,\n        0.0073970184,\n        0.01356604,\n        0.03547914,\n        -0.020311723,\n        -0.030285046,\n        0.02300004,\n        -0.01150002,\n        0.032044068,\n        -0.015565683,\n        0.024062091,\n        -0.019730914,\n        0.008048355,\n        -0.0030222815,\n        0.0001533699,\n        0.026335543,\n        0.040457502,\n        0.014080471,\n        0.027463973,\n        0.011275994,\n        0.060370956,\n        0.0026385328,\n        -0.019266266,\n        0.028077971,\n        0.009649728,\n        0.027497161,\n        0.029057048,\n        0.01861908,\n        0.026219381,\n        -0.008985946,\n        0.012346341,\n        0.0046049864,\n        0.011450237,\n        0.009052324,\n        0.025489222,\n        0.025406249,\n        0.008637461,\n        -0.006413792,\n        -0.02704911,\n        0.02266815,\n        -0.0025223708,\n        0.022551987,\n        -0.02756354,\n        -0.007911449,\n        0.02457652,\n        -0.004770932,\n        -0.014470443,\n        -0.018137839,\n        0.0022195205,\n        -0.014636389,\n        0.029040454,\n        0.02358085,\n        -0.029073643,\n        -0.004239906,\n        0.004787526,\n        0.01934924,\n        0.029671047,\n        0.019432213,\n        0.06103474,\n        -0.0001505177,\n        0.0013918675,\n        0.011748938,\n        -0.006650264,\n        0.020162372,\n        -0.0032753483,\n        -0.02570495,\n        -0.03161261,\n        0.010379888,\n        0.03172877,\n        0.008259935,\n        0.0020846897,\n        0.00611509,\n        -0.018867997,\n        -0.033471197,\n        -0.0012103646,\n        -0.022917068,\n        0.010047997,\n        0.042183332,\n        0.007928044,\n        -0.038001508,\n        0.022170313,\n        -0.007961233,\n        -0.024178252,\n        -0.03760324,\n        -0.023813173,\n        -0.0075920043,\n        0.01679368,\n        0.00035522698,\n        0.01971432,\n        -0.021672476,\n        0.019083727,\n        0.0045012706,\n        0.018453134,\n        0.0246429,\n        -0.017125571,\n        -0.03401882,\n        0.020610426,\n        0.009965024,\n        0.017075786,\n        0.0063059274,\n        -0.03245893,\n        0.014312795,\n        0.0038354143,\n        -0.05074612,\n        -0.019963238,\n        0.0121886935,\n        -0.0419842,\n        0.015101036,\n        0.027231649,\n        -0.0070319385,\n        -0.013823256,\n        0.03976053,\n        -0.02902386,\n        -0.011632776,\n        0.019979833,\n        0.024360793,\n        0.023381714,\n        -0.0033541725,\n        -0.02318258,\n        -0.001297486,\n        0.016071817,\n        0.0246429,\n        -0.047360834,\n        0.011466831,\n        0.013350312,\n        0.0061773197,\n        0.009160189,\n        -0.0029579776,\n        0.042880304,\n        0.028758347,\n        -0.01648668,\n        0.019382428,\n        0.0006233326,\n        0.008720433,\n        -0.007770396,\n        0.01828719,\n        0.032575093,\n        0.033902656,\n        0.036673944,\n        0.040689826,\n        0.00079290813,\n        -0.0057002264,\n        -0.019930048,\n        0.011599587,\n        0.0069863037,\n        -0.04244885,\n        -0.016768787,\n        0.013756878,\n        -0.00014001648,\n        0.0048331614,\n        -0.0052646194,\n        0.015026361,\n        -0.057151612,\n        0.0023170135,\n        0.013989202,\n        0.0012923002,\n        0.0057334155,\n        -0.057383936,\n        -0.03114796,\n        -0.03753686,\n        -0.0072518163,\n        0.01989686,\n        0.01989686,\n        -0.008164517,\n        -0.004770932,\n        -0.023531064,\n        -0.028526023,\n        0.00173413,\n        0.020610426,\n        -0.034549844,\n        -0.0054347133,\n        -0.008454921,\n        -0.023896145,\n        0.0047833775,\n        0.023232363,\n        -0.023813173,\n        0.035280004,\n        -0.023431499,\n        -0.005828834,\n        0.010164159,\n        -0.02358085,\n        0.0021987772,\n        -0.019415617,\n        0.0077952878,\n        0.008127178,\n        -0.0313305,\n        0.0014852118,\n        -0.006903331,\n        -0.018867997,\n        -0.022784311,\n        0.005165052,\n        0.008023462,\n        0.029073643,\n        -0.003893495,\n        0.006625372,\n        -0.015275279,\n        -0.0035367124,\n        0.013507959,\n        -0.025754735,\n        -0.011159832,\n        -0.009840566,\n        0.01700941,\n        -0.050181903,\n        0.008554488,\n        -0.0011470979,\n        -0.030500773,\n        -0.01617968,\n        0.024294414,\n        -0.011616182,\n        0.02245242,\n        -0.00026499413,\n        0.0071605463,\n        0.030716503,\n        0.0034454425,\n        -0.008160368,\n        -0.03730454,\n        0.044606138,\n        -0.008297273,\n        0.009533566,\n        0.0014043134,\n        0.0191667,\n        -0.008695542,\n        0.03401882,\n        -0.011989559,\n        0.0014063877,\n        -0.019681131,\n        0.028559212,\n        0.01646179,\n        0.044805273,\n        0.026368732,\n        -0.01752384,\n        -0.00049109483,\n        0.0011574696,\n        -0.008318015,\n        -0.0052106874,\n        0.06203041,\n        0.006766426,\n        0.016768787,\n        -0.00438096,\n        0.0073513836,\n        -0.011607884,\n        -0.018336972,\n        -0.00237302,\n        0.005040593,\n        -0.029588073,\n        -0.0067000478,\n        -0.010944103,\n        0.05064655,\n        0.03806789,\n        0.010396482,\n        -0.019100321,\n        0.034383897,\n        0.0050571878,\n        -0.017407678,\n        0.005376633,\n        0.025505817,\n        -0.02665084,\n        0.013491365,\n        0.004237832,\n        0.020510858,\n        -0.010155861,\n        0.019697726,\n        -0.004505419,\n        0.008417583,\n        -0.0032546052,\n        -0.003945353,\n        -0.0017424272,\n        0.049650878,\n        -0.014702767,\n        -0.028343484,\n        -0.01268653,\n        -0.0073057488,\n        -0.011483425,\n        0.0030658422,\n        0.039163128,\n        -0.040125612,\n        0.0155159,\n        -0.0099401325,\n        -0.04819056,\n        -0.008629164,\n        -0.01104367,\n        -0.010288618,\n        0.012213585,\n        -0.0051152688,\n        -0.026003653,\n        -0.012387828,\n        0.012794394,\n        -0.02387955,\n        0.044805273,\n        0.00593255,\n        -0.0073264916,\n        -0.0018907409,\n        0.019531779,\n        0.0129935285,\n        -0.00012277371,\n        0.008994243,\n        -0.017789353,\n        0.0003573013,\n        -0.0070485333,\n        -0.0133420145,\n        0.008927865,\n        0.010927508,\n        -0.0047833775,\n        -0.010927508,\n        0.015283576,\n        0.008471515,\n        0.0118982885,\n        0.0071149115,\n        0.01919989,\n        0.008226746,\n        0.018552702,\n        0.024228036,\n        -0.0063391165,\n        -0.009467188,\n        0.024593117,\n        0.012371234,\n        0.01609671,\n        -0.01597225,\n        0.04155274,\n        0.013275636,\n        0.0255556,\n        0.0037980767,\n        0.010720076,\n        0.0057583074,\n        -0.016544761,\n        0.001871035,\n        -0.027795862,\n        -0.016694112,\n        -0.013001827,\n        0.0072601135,\n        -0.019515185,\n        -0.01432939,\n        -0.015374846,\n        0.0076376395,\n        -0.014155147,\n        -0.015856087,\n        0.03264147,\n        -0.027779268,\n        -0.0154163325,\n        0.012396125,\n        0.02522371,\n        -0.02522371,\n        -0.009118702,\n        0.020792965,\n        -0.026634244,\n        -0.007890706,\n        0.020909127,\n        0.06730747,\n        0.0016179682,\n        -0.014843821,\n        -0.011491722,\n        -0.011997856,\n        -0.014603199,\n        -0.00958335,\n        0.010661995,\n        -0.0065341024,\n        0.0331559,\n        -0.008911271,\n        -0.012487396,\n        0.0050613363,\n        -0.042216524,\n        0.0136905,\n        -0.040888958,\n        -0.019946644,\n        0.0025306682,\n        -0.0062146573,\n        0.044207867,\n        0.0035885705,\n        0.00723937,\n        0.07202033,\n        0.0014032762,\n        -0.00017644669,\n        0.032077257,\n        0.021075072,\n        0.03264147,\n        -0.0019788996,\n        -0.011300885,\n        0.019448807,\n        0.0057251183,\n        -0.021290801,\n        -0.028758347,\n        0.0067622773,\n        -0.01865227,\n        0.01876843,\n        0.005882766,\n        0.012761205,\n        -0.0020971356,\n        -0.009865457,\n        0.0067581288,\n        -0.012221882,\n        0.036673944,\n        -0.018171027,\n        -0.0059449957,\n        -0.02957148,\n        0.0052853627,\n        -0.004974215,\n        0.025837706,\n        -0.008562786,\n        -0.018751835,\n        0.02139037,\n        0.009326135,\n        -0.026783597,\n        -0.004009657,\n        0.005314403,\n        0.016204573,\n        0.020444479,\n        0.0076583824,\n        0.026601056,\n        0.035280004,\n        -0.011466831,\n        0.017424272,\n        0.042249713,\n        -0.013433284,\n        -0.013980905,\n        -0.0035968677,\n        -0.0055508753,\n        -0.0122467745,\n        0.023763388,\n        0.017175354,\n        -0.00034615185,\n        0.005866172,\n        -0.022419231,\n        0.0062063597,\n        -0.04971726,\n        -0.011815316,\n        0.032259796,\n        0.006969709,\n        -0.018668864,\n        -0.00739287,\n        -0.02774608,\n        -0.014702767,\n        0.027994998,\n        0.024211442,\n        0.037735995,\n        -0.045402676,\n        0.0019498591,\n        0.0055135377,\n        0.015291873,\n        -0.0041693794,\n        0.022717932,\n        0.0069531146,\n        0.0051360116,\n        -0.010686887,\n        0.0060404143,\n        -0.016403709,\n        -0.020510858,\n        0.0046464726,\n        0.01661114,\n        -0.019830482,\n        -0.0015474414,\n        -0.013806662,\n        -0.00087328797,\n        0.038466156,\n        -0.01989686,\n        0.007853368,\n        -0.0037960021,\n        -0.038632102,\n        0.010354997,\n        0.0063930484,\n        -0.014254714,\n        0.022933662,\n        -0.010081186,\n        0.03172877,\n        -0.031645797,\n        0.020195562,\n        -0.020975506,\n        0.014404065,\n        -0.003976468,\n        0.016619436,\n        -0.005235579,\n        0.022286475,\n        -0.014652983,\n        0.0023916888,\n        0.0017351671,\n        0.023763388,\n        -0.022485608,\n        0.028293699,\n        -0.001356604,\n        0.018552702,\n        0.008977649,\n        0.01715876,\n        -0.0036590972,\n        0.0322432,\n        0.015175711,\n        0.0031073287,\n        0.032575093,\n        0.009002541,\n        0.030434396,\n        -0.012752908,\n        -0.018901188,\n        -0.007608599,\n        0.01737449,\n        0.022800906,\n        -0.0003881568,\n        0.024725873,\n        -0.03723816,\n        0.028243916,\n        -0.019000754,\n        0.013068205,\n        -0.048124183,\n        -0.0062063597,\n        -0.000007231754,\n        -0.004903688,\n        0.007314046,\n        0.038432967,\n        -0.011060264,\n        -0.017324705,\n        -0.13660629,\n        -0.0015681845,\n        0.007558815,\n        0.046464726,\n        0.022120528,\n        -0.03501449,\n        -0.020328319,\n        0.014993171,\n        -0.014935091,\n        0.019249672,\n        0.0069987494,\n        0.008355354,\n        0.01971432,\n        0.01880162,\n        -0.017623408,\n        -0.022867283,\n        -0.00876192,\n        0.022983445,\n        0.012221882,\n        -0.016362222,\n        0.014030688,\n        0.0020774296,\n        0.0037939278,\n        -0.0034454425,\n        0.019764103,\n        -0.031247528,\n        -0.009093811,\n        -0.01183191,\n        0.012437612,\n        0.0051857955,\n        -0.014213228,\n        -0.0061233873,\n        0.013126285,\n        0.03581103,\n        0.0034599628,\n        0.022883877,\n        -0.0056421454,\n        0.0011242804,\n        -0.0012819286,\n        -0.04523673,\n        0.0050447416,\n        -0.10753265,\n        0.035313193,\n        -0.009757592,\n        0.025837706,\n        -0.038798045,\n        -0.021954583,\n        -0.000019511555,\n        -0.038200643,\n        0.057549883,\n        -0.023116201,\n        0.00048668688,\n        -0.003820894,\n        -0.003945353,\n        0.005007404,\n        0.024211442,\n        0.028144348,\n        0.020278534,\n        0.031181151,\n        -0.0018005081,\n        0.012346341,\n        0.0027609174,\n        -0.0038457857,\n        -0.0022921215,\n        -0.018137839,\n        0.0090772165,\n        0.023630632,\n        -0.020593831,\n        -0.016196277,\n        -0.0024539183,\n        0.0310318,\n        -0.010446266,\n        -0.0161216,\n        -0.05472881,\n        0.0057209693,\n        -0.013242447,\n        0.0071439515,\n        -0.0023564254,\n        0.032375958,\n        -0.011516615,\n        0.0077040177,\n        -0.018502917,\n        -0.015266982,\n        -0.016528167,\n        0.005189944,\n        0.022485608,\n        0.00063474133,\n        0.019681131,\n        -0.02333193,\n        0.0099982135,\n        0.008712136,\n        0.004920283,\n        -0.020909127,\n        -0.011184723,\n        -0.027546946,\n        -0.01843654,\n        0.0077247606,\n        -0.01767319,\n        -0.0099401325,\n        0.039959665,\n        0.021025289,\n        0.002960052,\n        -0.03176196,\n        -0.004405852,\n        -0.016810274,\n        0.018785026,\n        -0.005484497,\n        0.0067041963,\n        -0.042581603,\n        0.022469014,\n        0.017772758,\n        -0.008911271,\n        0.025356466,\n        -0.0016916065,\n        0.02208734,\n        -0.006127536,\n        0.0061067925,\n        -0.0071149115,\n        0.017474055,\n        0.0036715432,\n        0.042050578,\n        -0.0018108798,\n        0.0026717219,\n        -0.012586962,\n        -0.011417047,\n        0.036043353,\n        0.011450237,\n        -0.01737449,\n        -0.0029890924,\n        0.0059491443,\n        0.008878082,\n        -0.016445193,\n        -0.007816031,\n        0.010072889,\n        0.07613578,\n        0.017805947,\n        0.005849577,\n        -0.0110934535,\n        0.04082258,\n        -0.016478384,\n        -0.014735956,\n        0.00093396177,\n        0.018834809,\n        -0.0030471734,\n        -0.03750367,\n        0.004505419,\n        -0.0112096155,\n        0.010238835,\n        0.014677876,\n        -0.0016190053,\n        0.004675513,\n        -0.011051967,\n        -0.011624479,\n        0.0072933026,\n        -0.013084799,\n        -0.04304625,\n        -0.013159474,\n        -0.029040454,\n        -0.0029807952,\n        0.028990671,\n        -0.043643653,\n        -0.00035833847,\n        -0.02314939,\n        0.0035035233,\n        -0.029455317,\n        -0.00027718078,\n        -0.006841101,\n        -0.00575001,\n        -0.003976468,\n        -0.0058786175,\n        0.020095995,\n        -0.0070402357,\n        0.009060621,\n        0.008475664,\n        -0.023315337,\n        -0.016685816,\n        -0.0048497557,\n        0.018967565,\n        -0.0022091488,\n        -0.022684744,\n        0.018818215,\n        -0.020212157,\n        0.017357895,\n        0.013715392,\n        -0.0048580533,\n        -0.040590256,\n        0.038764857,\n        0.020394696,\n        0.027679702,\n        -0.002263081,\n        -0.004011731,\n        0.01773957,\n        -0.004146562,\n        0.0013534926,\n        0.006364008,\n        -0.01013097,\n        -0.030699909,\n        -0.016204573,\n        0.036275677,\n        -0.028642185,\n        0.00459254,\n        0.028874509,\n        0.00483731,\n        0.011549803,\n        0.009782485,\n        0.011856803,\n        -0.03322228,\n        0.003696435,\n        0.012296558,\n        -0.00032722368,\n        0.028741753,\n        0.031114772,\n        0.007459248,\n        -0.00061244244,\n        -0.030218666,\n        -0.012006153,\n        -0.011516615,\n        -0.002034906,\n        0.0120725315,\n        -0.00200794,\n        0.014570011,\n        -0.010811347,\n        0.021108262,\n        0.025605382,\n        0.01858589,\n        0.034848545,\n        0.018901188,\n        0.021937989,\n        0.022020962,\n        0.059640795,\n        -0.0037462185,\n        -0.0492858,\n        -0.0028189984,\n        -0.05731756,\n        -0.009956727,\n        0.009691214,\n        -0.036673944,\n        0.0054388624,\n        0.016295843,\n        0.0069157765,\n        -0.0006337042,\n        0.012205288,\n        0.016528167,\n        0.000619184,\n        0.007372127,\n        -0.020228751,\n        -0.21041884,\n        0.047925048,\n        0.015656954,\n        -0.025140736,\n        0.004314582,\n        -0.019100321,\n        0.003905941,\n        -0.0071937353,\n        -0.01323415,\n        -0.0012829658,\n        -0.008085692,\n        0.024676088,\n        -0.0010283432,\n        0.0151840085,\n        -0.021075072,\n        0.006455278,\n        0.0061814683,\n        0.0005496943,\n        0.016229466,\n        0.00084580324,\n        0.002236115,\n        -0.004820715,\n        -0.019631347,\n        -0.0016241911,\n        0.0077247606,\n        -0.007052682,\n        -0.0020763925,\n        0.0019508962,\n        -0.0004993921,\n        0.001428168,\n        0.039295882,\n        0.0012840029,\n        -0.0011470979,\n        0.044971216,\n        0.036275677,\n        -0.01432939,\n        -0.01661114,\n        0.0051111197,\n        0.024344198,\n        0.022037556,\n        -0.010321807,\n        -0.029305967,\n        -0.041486364,\n        -0.012802691,\n        -0.0029683493,\n        0.01572333,\n        -0.01843654,\n        0.00083335734,\n        0.0014738031,\n        0.036176108,\n        0.015466116,\n        -0.007272559,\n        -0.0013929047,\n        -0.02643511,\n        0.009848863,\n        0.007152249,\n        0.026036842,\n        0.008595974,\n        -0.010703482,\n        0.0110934535,\n        0.017391084,\n        -0.01140875,\n        -0.015366549,\n        -0.015225495,\n        0.0025389653,\n        -0.008496407,\n        0.014769145,\n        0.0028376672,\n        -0.001838883,\n        0.006774723,\n        -0.008434177,\n        0.0040386976,\n        0.00666271,\n        -0.021008695,\n        -0.009989916,\n        0.021556314,\n        0.013300528,\n        0.0014105364,\n        0.021241019,\n        0.021838421,\n        0.013474771,\n        -0.018917782,\n        0.0016812349,\n        0.053102545,\n        0.01837016,\n        -0.009981619,\n        0.021888206,\n        0.034848545,\n        0.0022050003,\n        -0.006579737,\n        -0.0019654164,\n        -0.011641073,\n        0.024659494,\n        -0.019913454,\n        -0.0011906587,\n        0.022402637,\n        0.00006683194,\n        -0.023614038,\n        0.014304498,\n        0.040656637,\n        -0.0024145064,\n        0.0021033585,\n        -0.0011201318,\n        -0.042847116,\n        -0.010968994,\n        -0.027098892,\n        -0.025721544,\n        -0.032757632,\n        -0.011848506,\n        0.0014323167,\n        0.0005079486,\n        0.039926477,\n        -0.007567113,\n        0.10089484,\n        -0.032591686,\n        -0.051907737,\n        0.021075072,\n        0.01934924,\n        0.0031384435,\n        0.033338442,\n        -0.027829053,\n        -0.03866529,\n        0.0047045536,\n        -0.0024601414,\n        -0.029770615,\n        0.02902386,\n        -0.009624836,\n        -0.02409528,\n        0.029953154,\n        -0.04158593,\n        0.017175354,\n        -0.020461075,\n        0.0017040523,\n        -0.009525269,\n        -0.015167414,\n        -0.006293481,\n        -0.0043975543,\n        -0.024676088,\n        0.023763388,\n        -0.004119596,\n        -0.021937989,\n        0.0076957205,\n        -0.02260177,\n        0.020311723,\n        -0.014337687,\n        -0.008011017,\n        0.02354766,\n        0.013715392,\n        0.017590217,\n        -0.0255556,\n        -0.0145534165,\n        0.023381714,\n        -0.0033873615,\n        -0.0021106186,\n        0.023597443,\n        -0.0078658145,\n        0.0035450098,\n        0.025588788,\n        0.011450237,\n        -0.008927865,\n        -0.01919989,\n        0.0191667,\n        -0.031977687,\n        -0.008392692,\n        0.0038291912,\n        0.0068286555,\n        -0.00054762,\n        0.0029579776,\n        0.023697011,\n        0.0007311971,\n        0.005588213,\n        0.034516655,\n        -0.015449521,\n        0.0072269244,\n        0.013449879,\n        0.006227103,\n        0.0026696476,\n        -0.023381714,\n        0.01767319,\n        -0.034251142,\n        -0.006596332,\n        0.0072476678,\n        0.010794751,\n        -0.022618365,\n        -0.0014914348,\n        0.018785026,\n        0.0044805272,\n        0.009326135,\n        0.01341669,\n        -0.023398308,\n        -0.0088448925,\n        0.028592402,\n        0.030533964,\n        0.018303784,\n        -0.013848148,\n        0.0026696476,\n        0.006102644,\n        -0.03571146,\n        0.01752384,\n        -0.040557068,\n        -0.02427782,\n        0.008795109,\n        0.00041901227,\n        -0.0059491443,\n        -0.0012300707,\n        0.03264147,\n        0.01986367,\n        -0.019697726,\n        0.020494264,\n        0.008255786,\n        0.016735598,\n        -0.008803406,\n        0.016569654,\n        -0.038499344,\n        -0.0017216841,\n        0.0011989559,\n        -0.03023526,\n        0.009317837,\n        0.010844535,\n        0.022103934,\n        0.013259042,\n        0.026003653,\n        0.025837706,\n        0.013159474,\n        -0.05250514,\n        0.0063391165,\n        -0.037005834,\n        -0.023929333,\n        -0.013549446,\n        -0.003976468,\n        -0.008176962,\n        -0.004372663,\n        0.00391009,\n        -0.029339155,\n        -0.009923538,\n        0.004600838,\n        -0.021788638,\n        -0.033753306,\n        0.01487701,\n        -0.015266982,\n        -0.022634959,\n        0.01770638,\n        0.013798364,\n        -0.013756878,\n        0.015432927,\n        0.021971177,\n        0.03292358,\n        0.03537957,\n        0.020743182,\n        -0.017789353,\n        0.015988844,\n        0.012412719,\n        0.026451705,\n        0.009865457,\n        0.0032504566,\n        -0.0054554567,\n        -0.021655882,\n        0.052040495,\n        -0.01657795,\n        0.032741036,\n        0.008483961,\n        0.01934924,\n        -0.045900512,\n        -0.011168129,\n        -0.0074426536,\n        0.024327604,\n        0.04125404,\n        0.009848863,\n        0.036507998,\n        0.0021552166,\n        -0.00775795,\n        -0.002242338,\n        -0.03581103,\n        0.038466156,\n        0.020212157,\n        -0.01013097,\n        -0.009749295,\n        -0.006546548,\n        -0.004994958,\n        -0.017822541,\n        0.018253999,\n        0.02095891,\n        0.02062702,\n        0.0035325638,\n        0.0133835,\n        0.032691255,\n        0.009732701,\n        0.12651682,\n        0.03610973,\n        -0.003526341,\n        -0.0075007346,\n        -0.031496447,\n        0.009906944,\n        -0.006251995,\n        0.023630632,\n        0.0055508753,\n        0.01895097,\n        -0.077264205,\n        -0.01928286,\n        -0.011757235,\n        0.023929333,\n        0.018237405,\n        0.014180039,\n        -0.0014592828,\n        0.009375918,\n        -0.0073513836,\n        -0.047991425,\n        0.0120144505,\n        -0.011765532,\n        -0.033769898,\n        -0.0043353247,\n        0.019697726,\n        0.012089126,\n        -0.02628576,\n        0.038532533,\n        0.010628806,\n        0.0014084621,\n        -0.00006456315,\n        -0.007567113,\n        0.024891818,\n        0.018187622,\n        -0.009525269,\n        -0.013624121,\n        0.0022008514,\n        0.014038986,\n        0.0046298783,\n        0.04274755,\n        0.008160368,\n        -0.006538251,\n        0.0057790503,\n        -0.0121306125,\n        -0.0061731706,\n        -0.0099982135,\n        0.04377641,\n        -0.021622693,\n        -0.010330104,\n        -0.035445947,\n        0.005148458,\n        -0.014893604,\n        -0.0020587607,\n        0.021705665,\n        -0.00391009,\n        -0.021191234,\n        -0.040258367,\n        -0.0048414585,\n        -0.027497161,\n        0.018386757,\n        -0.046331972,\n        -0.045369487,\n        0.009118702,\n        0.0068120607,\n        0.023796577,\n        -0.0029061197,\n        -0.014628092,\n        -0.005268768,\n        0.019100321,\n        0.022950256,\n        0.028227322,\n        0.015042955,\n        0.043278575,\n        -0.008247489,\n        0.011475128,\n        0.012736313,\n        -0.008027611,\n        -0.034151573,\n        0.009160189,\n        0.012794394,\n        0.0018627377,\n        -0.0014717288,\n        -0.0032587538,\n        -0.008280678,\n        0.00073534576,\n        0.01676049,\n        -0.005907658,\n        0.006413792,\n        0.0003694879,\n        -0.006409643,\n        -0.03640843,\n        -0.01861908,\n        -0.0018990383,\n        0.027762674,\n        0.003395659,\n        -0.02625257,\n        0.0022340408,\n        0.0052397274,\n        0.0074302074,\n        0.009093811,\n        0.026086625,\n        -0.013856445,\n        -0.007890706,\n        0.041718688,\n        0.0006570403,\n        0.011441939,\n        -0.029820397,\n        0.021423558,\n        -0.025057763,\n        -0.037005834,\n        -0.032989956,\n        0.037271347,\n        0.015930763,\n        -0.00921827,\n        -0.0041507105,\n        0.0013441582,\n        -0.011234507,\n        -0.025057763,\n        -0.003957799,\n        -0.03008591,\n        -0.0071812896,\n        0.0005761419,\n        0.024311008,\n        0.017490651,\n        0.028874509,\n        -0.014860415,\n        0.0027298026,\n        -0.013059907,\n        0.008479812,\n        -0.028774941,\n        0.0038250426,\n        0.029405534,\n        -0.0027941065,\n        -0.00091633,\n        0.013217555,\n        -0.036308866,\n        0.0018098425,\n        -0.015656954,\n        0.012097424,\n        0.008168665,\n        0.0459337,\n        0.020178966,\n        -0.01168256,\n        0.023016633,\n        0.03806789,\n        -0.00007033235,\n        -0.012379531,\n        0.040125612,\n        -0.005144309,\n        0.0121306125,\n        0.035445947,\n        0.008093989,\n        0.01213891,\n        0.030069316,\n        0.012172099,\n        -0.005534281,\n        0.045369487,\n        -0.03216023,\n        0.014445552,\n        -0.0023419051,\n        -0.03836659,\n        -0.0004861683,\n        -0.022684744,\n        0.035147246,\n        -0.009450594,\n        0.0022485608,\n        -0.027613323,\n        0.001519438,\n        -0.0073638293,\n        0.017142165,\n        -0.0022132974,\n        -0.0060279686,\n        -0.01013097,\n        -0.004787526,\n        0.012752908,\n        0.028210727,\n        -0.005281214,\n        -0.0024476955,\n        -0.026883163,\n        -0.014719361,\n        0.0044307434,\n        0.030069316,\n        0.035246816,\n        -0.022867283,\n        0.0035678272,\n        -0.017789353,\n        0.019233078,\n        0.013491365,\n        -0.0059864824,\n        -0.0065175076,\n        0.011300885,\n        0.007890706,\n        0.023713605,\n        0.025671761,\n        -0.0036985092,\n        -0.016685816,\n        0.012279963,\n        0.020643614,\n        0.011599587,\n        0.024891818,\n        -0.024510143,\n        -0.012412719,\n        0.016171385,\n        -0.003024356,\n        -0.03221001,\n        -0.000033286324,\n        -0.011292588,\n        -0.0037794076,\n        0.011466831,\n        0.07593664,\n        0.031778555,\n        -0.03081607,\n        -0.0070900195,\n        0.003182004,\n        -0.027463973,\n        0.007264262,\n        -0.004721148,\n        -0.023265552,\n        -0.009367621,\n        0.02358085,\n        -0.025439437,\n        -0.0014914348,\n        0.017772758,\n        0.0132258525,\n        0.0039826906,\n        0.003051322,\n        -0.029521696,\n        -0.049385365,\n        0.022485608,\n        0.011657668,\n        0.01150002,\n        0.0034578883,\n        0.012645043,\n        0.0021406964,\n        -0.012105721,\n        -0.020394696,\n        0.011259399,\n        -0.015582278,\n        0.024908412,\n        0.017557029,\n        -0.03793513,\n        -0.006733237,\n        0.0039889137,\n        -0.0038686034,\n        -0.0031073287,\n        -0.009525269,\n        0.008662352,\n        0.018486323,\n        -0.0012549625,\n        0.0036466513,\n        0.00183266,\n        0.025057763,\n        -0.008197705,\n        -0.003428848,\n        0.023779983,\n        0.018386757,\n        0.03380309,\n        0.01657795,\n        0.005600659,\n        -0.011508317,\n        -0.019399023,\n        0.00012666306,\n        0.027596729,\n        0.030500773,\n        -0.035611894,\n        0.002300419,\n        -0.047659535,\n        -0.013798364,\n        -0.045834135,\n        -0.01655306,\n        0.0022215948,\n        -0.0058371313,\n        0.02972083,\n        -0.008936163,\n        0.014586605,\n        -0.015955655,\n        0.019598158,\n        0.009649728,\n        -0.000032346397,\n        -0.006148279,\n        -0.033935845,\n        0.009292945,\n        -0.010579023,\n        -0.025539005,\n        -0.004974215,\n        0.0071563977,\n        0.024028901,\n        0.014760848,\n        -0.009533566,\n        0.0013078576,\n        -0.0012269592,\n        -0.0046049864,\n        0.042581603,\n        0.01700941,\n        0.013864743,\n        -0.02026194,\n        0.043013062,\n        -0.023763388,\n        0.013524555,\n        0.0029455319,\n        0.025140736,\n        -0.02351447,\n        -0.017208543,\n        0.0068701417,\n        -0.025688356,\n        -0.07082552,\n        0.008687245,\n        -0.0067290883,\n        -0.052704275,\n        -0.024991386,\n        0.010960697,\n        0.020095995,\n        -0.0002342683,\n        -0.020129183,\n        0.03139688,\n        0.025140736,\n        -0.042150144,\n        0.00014688766,\n        0.014254714,\n        0.005588213,\n        -0.020942315,\n        -0.018187622,\n        0.0017123496,\n        -0.0018948896,\n        -0.004088481,\n        0.014047283,\n        -0.012371234,\n        0.029853586,\n        -0.017391084,\n        0.013350312,\n        -0.017905515,\n        0.025870897,\n        0.011168129,\n        0.012728016,\n        0.006944817,\n        0.041021716,\n        -0.011491722,\n        -0.0032006728,\n        -0.009110405,\n        -0.0038976439,\n        -0.0038997182,\n        -0.04115447,\n        -0.0022941958,\n        -0.019880265,\n        0.01049605,\n        0.012711422,\n        -0.027812459,\n        0.02917321,\n        0.0010838312,\n        0.015225495,\n        0.0045095677,\n        0.0032649767,\n        -0.03571146,\n        -0.023016633,\n        0.0018865924,\n        0.025173925,\n        0.009425702,\n        0.019614752,\n        0.0038748262,\n        0.017075786,\n        -0.015383143,\n        -0.018088054,\n        0.013532852,\n        0.011342372,\n        0.004331176,\n        0.06438684,\n        0.011798722,\n        -0.021406963,\n        0.0517086,\n        -0.0124708,\n        -0.005268768,\n        -0.017507246,\n        0.01073667,\n        0.0133835,\n        -0.024062091,\n        -0.051774982,\n        0.02771289,\n        -0.033355035,\n        0.0035906448,\n        -0.027546946,\n        -0.006853547,\n        -0.0046215807,\n        0.0025472627,\n        -0.01630414,\n        0.002178034,\n        -0.018137839,\n        -0.030467585,\n        0.0057997936,\n        0.027629917,\n        0.03245893,\n        0.0076625315,\n        -0.0063059274,\n        -0.011466831,\n        0.021191234,\n        -0.007459248,\n        -0.0077662473,\n        0.0007503846,\n        -0.0035968677,\n        -0.013897931,\n        -0.0012684455,\n        0.00061503536,\n        0.010462861,\n        -0.0124708,\n        0.011840208,\n        0.00949208,\n        -0.0044348924,\n        0.018171027,\n        0.016752193,\n        0.0059781848,\n        0.0040055085,\n        -0.004526162,\n        0.009010838,\n        -0.0014426883,\n        -0.06050371,\n        0.0011097603,\n        0.030899042,\n        -0.047360834,\n        -0.02084275,\n        -0.020792965,\n        0.00011155942,\n        0.031894717,\n        0.0048829447,\n        -0.0017590218,\n        -0.03325547,\n        0.0322432,\n        0.040258367,\n        -0.0013140806,\n        -0.023481281,\n        -0.0013120063,\n        0.006853547,\n        0.0237302,\n        -0.004113373,\n        -0.015764818,\n        0.018867997,\n        0.013756878,\n        0.012728016,\n        0.021241019,\n        0.009110405,\n        -0.0033811387,\n        -0.026767,\n        0.014105364,\n        0.0063474136,\n        0.014810632,\n        0.028924292,\n        -0.007504883,\n        0.0072269244,\n        0.017606812,\n        0.012952043,\n        -0.02734781,\n        0.019017348,\n        0.01557398,\n        -0.019299457,\n        -0.024875224,\n        0.0062105088,\n        -0.024676088,\n        -0.0109772915,\n        -0.03260828,\n        -0.0042689466,\n        -0.00782018,\n        0.011624479,\n        0.0152420895,\n        0.008280678,\n        -0.016171385,\n        0.014428957,\n        -0.0097658895,\n        0.018270595,\n        0.038499344,\n        0.013275636,\n        0.021738853,\n        0.030915638,\n        -0.019614752,\n        0.029671047,\n        0.03541276,\n        0.014644686,\n        -0.014470443,\n        0.0060943468,\n        0.0048580533,\n        -0.01876843,\n        0.025273493,\n        -0.036242485,\n        -0.0015049179,\n        0.025572194,\n        -0.018685458,\n        0.013731986,\n        -0.015441224,\n        0.01934924,\n        0.00046049862,\n        0.009906944,\n        -0.0018969639,\n        0.0010267874,\n        0.0015816676,\n        -0.038798045,\n        0.01296034,\n        0.0039930623,\n        0.010106078,\n        0.023979118,\n        -0.026750406,\n        -0.013839851,\n        -0.004721148,\n        -0.006579737,\n        -0.0027298026,\n        0.0024331752,\n        0.05320211,\n        0.00092047866,\n        -0.018005082,\n        -0.046099648,\n        -0.045469053,\n        0.004559351,\n        0.03157942,\n        -0.009989916,\n        -0.013267339,\n        0.010321807,\n        0.0020566864,\n        0.0063349674,\n        0.018021677,\n        0.0072269244,\n        -0.008226746,\n        0.016694112,\n        -0.01140875,\n        0.0034724085,\n        0.023497876,\n        0.002601195,\n        -0.038831234,\n        -0.017756164,\n        0.016586248,\n        -0.027364405,\n        -0.012827584,\n        -0.008400989,\n        0.03793513,\n        -0.019415617,\n        0.005990631,\n        -0.018386757,\n        -0.022253284,\n        0.007712315,\n        -0.019233078,\n        -0.01150002,\n        -0.027447378,\n        0.080715865,\n        0.0002994797,\n        0.0012269592,\n        0.02333193,\n        -0.022352852,\n        -0.06136663,\n        0.019847076,\n        0.028509429,\n        -0.007878261,\n        0.015648656,\n        0.012437612,\n        0.0026094923,\n        0.037437294,\n        0.029621264,\n        0.009326135,\n        0.026750406,\n        -0.029671047,\n        0.0034433682,\n        -0.025671761,\n        -0.013159474,\n        0.02056064,\n        0.00030829554,\n        0.005849577,\n        0.011732344,\n        -0.0066710073,\n        -0.001303709,\n        0.006318373,\n        0.003657023,\n        -0.0048995395,\n        0.0038872722,\n        -0.02625257,\n        0.0072601135,\n        0.0013763101,\n        0.035114057,\n        0.028277105,\n        0.007438505,\n        -0.028492834,\n        -0.029803803,\n        0.021921394,\n        -0.0037980767,\n        -0.048588827,\n        -0.03939545,\n        0.021489937,\n        -0.013906229,\n        0.0087287305,\n        0.009359323,\n        -0.018867997,\n        0.03547914,\n        0.0022651553,\n        0.0034744828,\n        -0.0068369526,\n        -0.025472626,\n        -0.016378816,\n        -0.011840208,\n        -0.01949859,\n        -0.013026718,\n        -0.00015298097,\n        0.015706737,\n        0.013308825,\n        -0.018735241,\n        0.031230934,\n        0.01752384,\n        -0.013308825,\n        -0.010628806,\n        -0.0017766535,\n        -0.03084926,\n        -0.009143595,\n        0.0025534856,\n        0.0043519195,\n        -0.009160189,\n        0.018785026,\n        0.05004915,\n        0.026700623,\n        -0.027546946,\n        0.0030762139,\n        0.014312795,\n        0.006364008,\n        -0.016022034,\n        -0.025406249,\n        -0.013267339,\n        0.0054803486,\n        0.027098892,\n        -0.0154744135,\n        -0.022734527,\n        0.021108262,\n        -0.033504386,\n        0.015507602,\n        -0.04115447,\n        0.01228826,\n        0.00030077613,\n        -0.0219048,\n        -0.006081901,\n        -0.0034993747,\n        0.023116201,\n        0.006430386,\n        -0.012429315,\n        -0.049385365,\n        -0.011292588,\n        -0.016901545,\n        -0.052737463,\n        -0.0021261761,\n        -0.008620867,\n        0.00088002946,\n        0.029256184,\n        -0.015200604,\n        0.0058454284,\n        -0.0069655604,\n        -0.010247132,\n        -0.004053218,\n        -0.016619436,\n        0.024759062,\n        0.027480567,\n        -0.040623445,\n        0.0069821547,\n        -0.004484676,\n        -0.00903573,\n        0.011242804,\n        0.012603557,\n        -0.0118651,\n        -0.0035781988,\n        0.027032515,\n        -0.02117464,\n        -0.0027173567,\n        -0.017988486,\n        -0.038598914,\n        -0.020178966,\n        -0.021091666,\n        0.01159129,\n        -0.00045972076,\n        -0.005189944,\n        0.010205645,\n        0.00047994536,\n        -0.015922466,\n        -0.011400453,\n        -0.015491008,\n        -0.042847116,\n        -0.021772044,\n        -0.020245345,\n        0.002014163,\n        0.023614038,\n        -0.014976577,\n        0.022186907,\n        0.009409107,\n        0.010504347,\n        0.008886379,\n        0.040026043,\n        0.03015229,\n        0.009691214,\n        -0.008620867,\n        0.013117988,\n        -0.019996427,\n        0.00059999654,\n        0.019216483,\n        -0.019316051,\n        -0.0017590218,\n        0.029836992,\n        0.0005652517,\n        -0.0064345347,\n        0.010645401,\n        0.020013021,\n        -0.04271436,\n        0.03730454,\n        0.01934924,\n        0.012479098,\n        -0.023979118,\n        -0.014943388,\n        0.024410576,\n        0.01341669,\n        -0.016685816,\n        -0.01697622,\n        0.043477707,\n        -0.00520239,\n        -0.008828298,\n        -0.010620509,\n        -0.017424272,\n        0.006285184,\n        -0.02275112,\n        0.0031052544,\n        -0.03912994,\n        0.0310318,\n        -0.009027433,\n        0.013001827,\n        -0.0006114053,\n        -0.016138196,\n        -0.0011159831,\n        0.030202072,\n        -0.01861908,\n        0.010695185,\n        0.0017828764,\n        -0.00008874192,\n        -0.014926793,\n        0.031977687,\n        0.0063847513,\n        -0.007347235,\n        0.03368693,\n        0.0003954169,\n        0.0032234904,\n        0.0066544125,\n        0.018403351,\n        0.011599587,\n        0.0043602167,\n        0.0043602167,\n        -0.003331355,\n        0.011143237,\n        0.03401882,\n        -0.009898646,\n        -0.05227282,\n        -0.008936163,\n        -0.050845686,\n        -0.01232145,\n        0.006430386,\n        -0.023348525,\n        -0.027065704,\n        -0.03932907,\n        0.003808448,\n        0.016412005,\n        0.012354639,\n        -0.02865878,\n        -0.03674032,\n        0.004903688,\n        -0.0024954048,\n        0.04852245,\n        0.020394696,\n        0.024194848,\n        -0.009873754,\n        0.011740641,\n        -0.021108262,\n        -0.011417047,\n        0.014843821,\n        0.0067581288,\n        -0.008687245,\n        -0.060072254,\n        -0.011516615,\n        -0.03856572,\n        0.0027878836,\n        0.021440152,\n        0.023431499,\n        0.009898646,\n        0.00918508,\n        0.008919568,\n        -0.014370876,\n        0.0076210448,\n        -0.022618365,\n        -0.0025016277,\n        -0.013914526,\n        0.0048912424,\n        -0.0113257775,\n        0.010753266,\n        0.0025410398,\n        -0.011881694,\n        0.0075712614,\n        -0.008239192,\n        0.016735598,\n        0.010819644,\n        -0.027596729,\n        -0.0035221921,\n        -0.038831234,\n        0.027845647,\n        0.004028326,\n        -0.028210727,\n        0.014155147,\n        0.022286475,\n        0.0022527096,\n        0.023647226,\n        0.039528206,\n        -0.01323415,\n        0.014138552,\n        -0.0055384296,\n        -0.0049327286,\n        -0.009176783,\n        0.005745861,\n        0.042083766,\n        -0.016080115,\n        -0.004725297,\n        -0.02260177,\n        0.02041129,\n        -0.0035657529,\n        -0.015549089,\n        -0.008496407,\n        0.0052978084,\n        -0.013117988,\n        -0.0040386976,\n        0.0018897038,\n        -0.010794751,\n        -0.020444479,\n        -0.023697011,\n        -0.0024248778,\n        -0.004273095,\n        0.011433641,\n        0.017540434,\n        0.036773514,\n        0.018204216,\n        0.027215054,\n        0.02175545,\n        0.022684744,\n        0.015109333,\n        -0.008251637,\n        -0.0056089563,\n        0.015507602,\n        -0.013333717,\n        -0.018917782,\n        -0.007928044,\n        0.031629205,\n        0.010703482,\n        -0.017722974,\n        -0.0007197884,\n        -0.0059698876,\n        0.05582405,\n        0.011425344,\n        0.007434356,\n        -0.0027920322,\n        -0.03327206,\n        0.01807146,\n        -0.022717932,\n        -0.015715035,\n        0.013997499,\n        0.017075786,\n        -0.004113373,\n        -0.014520227,\n        -0.00438096,\n        -0.00077735074,\n        -0.024228036,\n        -0.00048331614,\n        0.018403351,\n        -0.003937056,\n        0.0022485608,\n        0.024028901,\n        -0.020942315,\n        0.017905515,\n        -0.010968994,\n        0.011217913,\n        -0.00033189091,\n        0.01655306,\n        0.0036922863,\n        -0.020544047,\n        -0.034450278,\n        0.03428433,\n        -0.012952043,\n        0.029554885,\n        0.024593117,\n        -0.027414188,\n        0.02811116,\n        -0.00046542514,\n        0.028874509,\n        -0.0047999723,\n        0.0141468495,\n        -0.0043062847,\n        -0.013333717,\n        0.022834094,\n        0.018336972,\n        -0.014287903,\n        -0.035114057,\n        0.03312271,\n        0.011193021,\n        -0.0012404423,\n        0.024078686,\n        0.034383897,\n        0.034052007,\n        0.005443011,\n        -0.026302354,\n        -0.017507246,\n        0.03206066,\n        -0.02026194,\n        -0.037404105,\n        0.0031571123,\n        0.012578665,\n        0.011300885,\n        -0.02953829,\n        -0.029505102,\n        0.010894319,\n        0.0028625592,\n        -0.008475664,\n        -0.02643511,\n        -0.008927865,\n        0.0033603953,\n        0.000022509594,\n        -0.012736313,\n        0.0313305,\n        0.029372346,\n        -0.005534281,\n        -0.026335543,\n        -0.01837016,\n        0.020361507,\n        -0.0130516095,\n        0.003084511,\n        -0.005443011,\n        0.032259796,\n        -0.005679483,\n        -0.0032110445,\n        0.0003705251,\n        -0.0034392194,\n        0.020361507,\n        0.0131096905,\n        0.024493549,\n        -0.013939418,\n        0.0024663643,\n        -0.042515226,\n        -0.026783597,\n        0.042548414,\n        -0.012645043,\n        0.008035908,\n        0.0058537256,\n        0.005646294,\n        -0.018735241,\n        0.005281214,\n        0.013640716,\n        0.0040905555,\n        0.024476955,\n        -0.0026115666,\n        0.017606812,\n        0.031795148,\n        -0.005339295,\n        0.012628449,\n        -0.013192664,\n        -0.060769226,\n        0.004878796,\n        0.012869069,\n        -0.016984517,\n        -0.0056296997,\n        0.020178966,\n        0.032259796,\n        -0.007948787,\n        0.012404422,\n        0.003005687,\n        -0.008637461,\n        0.054330543,\n        0.009226567,\n        0.02114145,\n        0.020925721,\n        -0.004177677,\n        -0.015615467,\n        -0.008131327\n      ]\n    }\n  ],\n  \"model\": \"text-similarity-babbage:001\",\n  \"usage\": {\n    \"prompt_tokens\": 8,\n    \"total_tokens\": 8\n  }\n}\n\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/NumberOfImages/ImageURL-1.json",
    "content": "{\n  \"created\": 1667661280,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-byoTBAgSaGlyyTCGjnFhbSVx.png?st=2022-11-05T14%3A14%3A40Z&se=2022-11-05T16%3A14%3A40Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A20%3A52Z&ske=2022-11-06T02%3A20%3A52Z&sks=b&skv=2021-08-06&sig=Gb%2BBa63eW2kp8cZlD7Kmkz7BhtiRKmKgxnvds1mqA6A%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/NumberOfImages/ImageURL0.json",
    "content": "{\n  \"created\": 1667661280,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-byoTBAgSaGlyyTCGjnFhbSVx.png?st=2022-11-05T14%3A14%3A40Z&se=2022-11-05T16%3A14%3A40Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A20%3A52Z&ske=2022-11-06T02%3A20%3A52Z&sks=b&skv=2021-08-06&sig=Gb%2BBa63eW2kp8cZlD7Kmkz7BhtiRKmKgxnvds1mqA6A%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/NumberOfImages/ImageURL1.json",
    "content": "{\n  \"created\": 1667661280,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-byoTBAgSaGlyyTCGjnFhbSVx.png?st=2022-11-05T14%3A14%3A40Z&se=2022-11-05T16%3A14%3A40Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A20%3A52Z&ske=2022-11-06T02%3A20%3A52Z&sks=b&skv=2021-08-06&sig=Gb%2BBa63eW2kp8cZlD7Kmkz7BhtiRKmKgxnvds1mqA6A%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/NumberOfImages/ImageURL10.json",
    "content": "{\n  \"created\": 1667676139,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-9zZUe6K4CTKwiFVtCTPhAEMK.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=GSG1TvHGYZkFBNMPF1mFj/IHW3Cv38qrEf5rOLjtKOE%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-TBCCe12ag8BHOfNqjU8tS9jy.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=73LhuURgM8VT8HxjOk8V5EFG9e/wSv%2BMcsKSqwtVv1c%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-1QFf5erj73pVtUrPRvKXyY0R.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=nKZcUc8OzsXsqCKHarzBSDqU%2By5lGVuvkzYjzatw7bs%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-JO5HiAWyRkmEF9mZVWN81WRw.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=X8XoFhNnqi0fJEI9qZtmp8Ig6XBC6Wz7bzCacbj%2BP7w%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-CIZdrniO1nbRSHRasJvhO5VI.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=gzvv2YGW/e0J9FKb1M1DoV%2BeEv8uWHFuHS3OebpbhsM%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-G7RFB3ZkcRFeeaWK5mn6CTAu.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=aYRcwd%2BvGRtVf75f8ABCL0zrzQxiVEjpwikQhhQ4EXA%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-T3PieacwGynP6zfeytLJoWZ5.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=78i4lL2P6Avm63VDro9ZSqs/tgHlDpJ2Tule3CQ7crg%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-CweooP1vUz9sMWdfTqqODIBa.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=ZtfKnYWzqRUttn3PPMUDDKxpSUm98mDCNbh1B1C8H/U%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-J1xND8faZLkSbBZxcknKXnfR.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=6aIeRYmy4Iv4LznnMmMqe0zSHP9GVQmASM5nm3LpR8k%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-kMEOILQHM0mPgnK9zOM1XOjc.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=rJIAe5Bw3InLynaIvZlPZPj%2BIS9SnA8wxSuRu3CA9DM%3D\"\n    }\n  ]\n}\n\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/NumberOfImages/ImageURL11.json",
    "content": "{\n  \"created\": 1667676139,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-9zZUe6K4CTKwiFVtCTPhAEMK.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=GSG1TvHGYZkFBNMPF1mFj/IHW3Cv38qrEf5rOLjtKOE%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-TBCCe12ag8BHOfNqjU8tS9jy.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=73LhuURgM8VT8HxjOk8V5EFG9e/wSv%2BMcsKSqwtVv1c%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-1QFf5erj73pVtUrPRvKXyY0R.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=nKZcUc8OzsXsqCKHarzBSDqU%2By5lGVuvkzYjzatw7bs%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-JO5HiAWyRkmEF9mZVWN81WRw.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=X8XoFhNnqi0fJEI9qZtmp8Ig6XBC6Wz7bzCacbj%2BP7w%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-CIZdrniO1nbRSHRasJvhO5VI.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=gzvv2YGW/e0J9FKb1M1DoV%2BeEv8uWHFuHS3OebpbhsM%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-G7RFB3ZkcRFeeaWK5mn6CTAu.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=aYRcwd%2BvGRtVf75f8ABCL0zrzQxiVEjpwikQhhQ4EXA%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-T3PieacwGynP6zfeytLJoWZ5.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=78i4lL2P6Avm63VDro9ZSqs/tgHlDpJ2Tule3CQ7crg%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-CweooP1vUz9sMWdfTqqODIBa.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=ZtfKnYWzqRUttn3PPMUDDKxpSUm98mDCNbh1B1C8H/U%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-J1xND8faZLkSbBZxcknKXnfR.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=6aIeRYmy4Iv4LznnMmMqe0zSHP9GVQmASM5nm3LpR8k%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-kMEOILQHM0mPgnK9zOM1XOjc.png?st=2022-11-05T18%3A22%3A19Z&se=2022-11-05T20%3A22%3A19Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A26%3A08Z&ske=2022-11-06T01%3A26%3A08Z&sks=b&skv=2021-08-06&sig=rJIAe5Bw3InLynaIvZlPZPj%2BIS9SnA8wxSuRu3CA9DM%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/NumberOfImages/ImageURL2.json",
    "content": "{\n  \"created\": 1667676103,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-P3mDeKMbJ63GMw7fVozuEEYj.png?st=2022-11-05T18%3A21%3A43Z&se=2022-11-05T20%3A21%3A43Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A31%3A42Z&ske=2022-11-06T02%3A31%3A42Z&sks=b&skv=2021-08-06&sig=01gs1eE8/w%2BtLtIb4IzRLOmafbH4somfktvUNzB%2BUw0%3D\"\n    },\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-pPmibgcYrjAmxDy9WMEVhchU.png?st=2022-11-05T18%3A21%3A43Z&se=2022-11-05T20%3A21%3A43Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A31%3A42Z&ske=2022-11-06T02%3A31%3A42Z&sks=b&skv=2021-08-06&sig=YVgHqL0%2BO%2BHqcvrbvvEPrx0/C2cGmHpCFKbF0YLGbYc%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Prompt/ImageApple.json",
    "content": "{\n  \"created\": 1667676516,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-nsJnMAwG1wUsEx5kem6LWGvJ.png?st=2022-11-05T18%3A28%3A36Z&se=2022-11-05T20%3A28%3A36Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A38%3A29Z&ske=2022-11-06T01%3A38%3A29Z&sks=b&skv=2021-08-06&sig=vcMLSEIudZIXGC5Zl2PlCkDehCLllTGrj99V06oAjGw%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Prompt/ImageOtter.json",
    "content": "{\n  \"created\": 1667661280,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-byoTBAgSaGlyyTCGjnFhbSVx.png?st=2022-11-05T14%3A14%3A40Z&se=2022-11-05T16%3A14%3A40Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A20%3A52Z&ske=2022-11-06T02%3A20%3A52Z&sks=b&skv=2021-08-06&sig=Gb%2BBa63eW2kp8cZlD7Kmkz7BhtiRKmKgxnvds1mqA6A%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Resolution/Large/ImageB64Large.json",
    "content": "{\n  \"created\": 1667674929,\n  \"data\": [\n    {\n      \"b64_json\": \"+BAEDAf7+/vv//gYAAQAB/gID/v38AgAA/v/+Af8BBPwA/AIAAwIB/wD++v3+AAAA/gH/A/3//P8A/v7/AwEGAAAEAgP//Pr7AwQG/f7+/fj6/QP8/wIIAQD+Afn8/AMAAv8CAQEA/fz//wH/AQEAwMDAP8ABf8A/QD+/fv5AgQD/f4DBAIA/v4C/QD9/v//BP8DAgT+/vsC/gD8AAEE/v/9AgAE/wH++P3/BAcDAvz++f39AvwFAAD+Av7/+fb98e/zAAQD8gABDgH9BggFAgMC/wD+A/4EAP/9+vv7/QH+//35AQEB//8BCAkD9vn9/f//BAMCBAP/AQH+/QECBgIC/P/9/v39BAH//AABAQICA/8A/wX/AP8GAQECAgH//gH9Af//Av4DAgYC9/r5AwEBBgID//0B/gL9APwEAAP//wH/AwABAQEEAQUC/Pn/BQUD+f3+////AwACBQMG/P/7/wIBBf4A/QQA9fL3/fr4CQIAIBsc6Ofp7+72AwIE4eDm8u70AwoEFhkQAQAAAwMI7O3yFhv+APT51tXdExoODPwC/v0B/f//8fLxAf//DAkC/v77BAEL/gf8BQEFBAgGBgUNAgEEBAT/+fr9BAMC/fv+/wP+/AQECwgK/fz+/f3+AAEEBAIA/f8ABAECAgMD/gAB/vv+/QD8AAAEAQAA+Pn7BAUCAQQC//8A/fj9BQABAgIA/QUBBAEIBgj++vz8Av38/wYF/fwABAH/+v37+vb4+fP7/PsB/vv57+76Bf0IAwgDBgEBCQgLBQcF/fz6AQIB/f/8AwMH/Pr78vb1BQQF+gH8CQMF///6/f8BAQAD/wMEAwD+9/b4BQL/AwgFAQECAf8B/wAB/v39/P0AAgMAAQH/AQAB/wMAAQABAAQEBQMEBwQIAv4BAAIE/P3/AgAFAf8CAwIB+fv5AQUFBQgGAwIB+vf3AAUE/gIFAv4A/wEAAAAAAwMF/wL+/vn/BAcD/gAC/v36/P8A/gIBBQAGAwgBAP8B/P38A/8AAgYC//j/AwD7+wAG/gIABAAB/wEABgIC/QAB/wICAAH9/gUH/wT9//j8Af8D/Pv+AQQCAP77/QAC/f398vb0BwcFAAD8+vz9/vv/Cg0J9fD1/vn57/4ACgoH9/j3AP7+AQL/+vgADBMR/fv7+vj4BgYK+f7/9/byBAIQBQMC+//9+/z8AfwBAwQD/Pv6/wL/AwQC//z/9fv1//r+BQMEAAD9CggK8/PxBAQGBAUD/wH+Af0B+/36/v/8AgEE/f38AP/+//3///wAAAQC+/v8AP4DAwUHBAAF/gADAf/9AP3+/f388/MACQsKCQ7++fX4/wEEAgME+vb5Av4DCgVQvZMAAAXcSURBVAkE///+9vjyDAoTAAP+A/4DBP4BExAO9ff3+/n/9vj4AAD2GRkR3eHx9gEE/ggI7vP3A/j4DAQECA4RDA0C9fXr+fn9Cv8F7vLuAwMDBgQD8/Hz9fP1+Pn5BwUI+f3/+/8ABgUE/QEDAQIDBQEJ+Pv5CAcD+vf8BwgC+vX98vnyBf0CBg0E/PwAA/8D/v/9AwT+/f8EAv368vTyCwcLAPr3CgUFBBEMAgUH/v788fH0CQwF9PXz+vfzCAoNDQ8QDA4P9fX2/f375ebkDAsLCxIT+vv9/P37CgkNBwsMAQICAv4E5eDb9fXz+vn47uzmBAMKCQwQIygl+v4A6eXkA/z5DAMC+vr3DhcZ8fLw8/DzCQYHBf8F8u/r+fj7/QoL/vv5/Pf28/3//vf3Eg4L/Pn3CQUCAP8B+/b3/AAAAwMJAAP9/v7+/vjx8fD08vX1APwE+QUG2u7vCgYJAwYF/gME+f/7AfLvAgH+BgUBEBMPC/gH9vf67urx+Pv0CAgR+fz8/f4AA/79BwkG//kA/Pf8/f729/n98/Dy9fz6+gAA+v3/8OvsDxELAPwB2Nve8/P4AgQE+Pz5GRcT+vv4Af0B8fHz//v7CgYF7ejjCgT7/Pf0CQEA+PX2EBELERUVBAMD///+BgME+AML+v0A8/T0BwIBAgD8AgL8CwoJ/v/8CQECDwgO/fsA6OvmCgUHCQ0GBf0A9vPy+Pj2CQwLCAoHAgUE/vkH+vz89vX3BfsJAwcJAv0A+/z59fX0CwoJCQgJ+v76+vT2+/MA9fP5+voE7vD3+PkAAwcB7uvrCAwGCwwM/f0B//wD/P79AwP9AAH++Pv6/vv5/v8AAwYABAYGAAT/+Pf3AwIG/QH+AgIB/P//DhISAQAB/fj7BAsDCgcLCgj9+/8B/v36AgEI/gD59fr9AQEA9vX1AAD7EAsJCgkBBP/8/v38/P7/+v369PT1//v7/AX7//oDAQX+//sC/P0DAQMGEBMK9vkDBQT/BgIFBQUG/QL+AwP+CwkLCQsDAP79/vn9/wQFAwH//QADAgYEAgH9APwA+fz59/b+/Pv/CAYFBQYDAgEBAP0F/fr39PH0//0A//8A+/X0/gMCBhQV9PTyBQgL/PD08fP1+QcHAv789Pj4BQgD7+/tAAIBCAgHBQcE9vr6BwUABgL//AEFBAsFAQP+/f38+/7/FAsS+f75//8BAgMF+QIC/fj6AwQEBQkIAP4ABgsI9fr8AwUF9vj3AQYHBwYJ7e/0+Pv/CwgF+vn3//gDAwEBCQoL+/v4DQsK4eTkA/z/BgwN9vb4/Pz6EhIS8fXv//v8BPgE/gDxAgAB/P8CCAYM9vn1DgsNBgkK7vHx8vHvBgMIAfkJ+Pv7+fz6BQ8KCwEMFhcZ9/Hu+ffx9PYE6OfpDw0Q+fLv/f/8Dg8M+fv1/Pn9+vv9AQb/8vb6/P389wMJ+vj09PTv9fHz+/n3AQsJ9fD2/wEA9fX3/fv7/wEACQwLFRIT+Pv99vX0+fsBAwD/Av//CAEGAQEBDQ8IAgIGAwAD8e7vBQcJBAQE+/v3AwMFCQYJ+ff++vz5BfoFAwEA5+vq8/H3//z/+Pj4CQgIBAQAGRcQ/f4B8/TyCQQKBgQE9PX2//wB8fnyDhIQ9fT18PDvDg4L9PHy7u/6+voA8/H0CggN6vLq7fDvA/4CGCUT7uz0+/72AAIDEhca+PX1+/n/AwUBDQgN9fj5+ff6+/r8/v8B7+zvBwwCFRoX9PH4+fb1DAgJ9Qr5/v0A8/rz/vj4+vn2BAYDEBIPBwkF+fr47O7s8vXu+fz7BQQE9Pj3AQYF///+BwsICQsJJyQo2dbaAQH/9fT27/LzHh0c9PT2//vyFBIU6/n5BAMEBgT/FBMQ6ejn8/L3EBYAAP8DB\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Resolution/Large/ImageURLLarge.json",
    "content": "{\n  \"created\": 1667674848,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-8cl5NT9LdOxfxtb50M3SoMtg.png?st=2022-11-05T18%3A00%3A48Z&se=2022-11-05T20%3A00%3A48Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T00%3A57%3A59Z&ske=2022-11-06T00%3A57%3A59Z&sks=b&skv=2021-08-06&sig=mlcctWBT0JdMKoa2bvqoFtMqSrleUTESgJkYljxPlEg%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Resolution/Medium/ImageB64Medium.json",
    "content": "{\n  \"created\": 1667674568,\n  \"data\": [\n    {\n      \"b64_json\": \"+/v/7AP0CAwL+9/3x8vL3+PoFBQr+Afj8AgEB/wEFAAMAAwcIBwUCBRMQAwMDBQMBAwf+/wH8AQAA/f/++/wDBAL+/v78+/kEAwIICAr//vsGBwf+/v8EAgINDw/+/wH59/f5+/n//v//A///AgMCAAACBggOExgA/vwDAgIIDxP/BAX3+vsCAQQBAf//Af8BAgL+/fz/AAABAP8BAQMDAwIA/wD+AP4C/wAA/QD/AP4EAQT7Avn/AP8EBQMGAwT9AP7//v79AQAEAwf8/vsFAgX7APj7+PwDCgYGBQcCAwT//v0CAAD9/wADAwQAAAAEAgIBBgH//gL//////wADAgAEBQMD/gL3/PkA//7+/QAAAQcGAwX+Afr9+/0BBQb8/P4AAQIDBQT///8BAgIA/wH++/4CBgQDBAMBAAD7/P0BAAH//v7+AQECAAL+/f7/AwD7+fwB/PwEBP4IBAYCAgL8+/38/fkFAQYCAgMB/v7+/fv+AgAB/QD+AP8CAQL+Af///P39/f3+/v8D//v+/wMCAgD+//r6AQEEBQP9//79/v79+vwBBQUFBQD9/gD8/Pv6+fv+AP3+/P4FBgL+///+/v4CAAH9/vz//f8CAgEB///+AAEBAf//AQAD/wD//v/+/f38/Pv9/QH8/f0EAgACAP///f/+AgL/AAABAv8A/wECAP//AAL//wAB/gABAwEA/v/+AQAA/P4BAQEAAwIE/gD+AAAA/v/9//8ABP8CAwEBAAD+Af7//gEAAAIC/f//AwICAAEC/fz+AwD//f/8AgID/v/8/wAB/wEAAQEB/v/+AQAA//4AAAEBBQAB/gD//wAAAAEC//79AQEA/gABAwD//v7/AAABAQABAAEAAP7+/wAAAgIC/v3+AAL//v//AgEC/gAAAQEB/gD/AwEC/v//AQAB//8BAgEA/v///wABAv//AQIC/////wH/AwAB/v//AwID/v39AAEBAAABAAAA///9AP8CAgIAAAH+Av8E/wEA//39AQP+/QABAf4F/gD+Av0BAQD/AQEA/gAAAP8BAQABBgMB+/v8/gAAAgED/v8AAQH//gD+AAD/Af4C/wEBAAEAAQD/Af4A/wL/AgAFAAD9/wEBAAAAAwIA/f4BAgAA/wEB/v3+AQEAAAAAAAAA/v3+AQIC/wEB/f/9BAAC/wEBAQEAAf7//wD//P8AAwAAAAIAAgEC/v//AAH//gAAA//9//8BAAL/AP//AAIBAP4BAQIC/wD/AP7+AAEA/wD/AP////7+AgIEAAH+AP/+/wEBAQAB/v//AQH+AgEB//3//wD/AP4BAAEBAgL/AAH+/f0AAQEA/wEBAQAAAAEDAAH9AQEC/gD+AgEB/wH/AwAD/v///////QD+AgECAP8AAAEAAQEA/wAAAQICAQEBAP///wD//wAAAAH+/wD/AP4BAQEC/wL+/v8BAgD+AQEBAQEB/wD9AQEDAv79/v//AAEBAgIE///+/wEBAQEA/wH9AQECAf8BAAEB/v7+AP0BAQEA////+fn5AgIE/v7//wH/AAAAAgACAP4BAgAA/gAB+/z8/wICAQEB/f3//wD+AAAD/f/+AQD/AAEBAwEE/v7+AAAD///9AwME/////QAA/wL+AP4B/v///gMCAgAE/wQB/QEC/v0AAQAAAQADAgIB//7/AP8A/wD9/QAAAAICAQAC/v3+/wD//fz9//8ABQIEBgoCAQD///7+/f3/AwUAAQEB/fr9/QD+AwMC/wAA///+AQEA/f7//wH9BP8DAgIBAQMDAQIEBAIB/v4B+vr/+//9Af8A/wEB/wD9Af0CAQMBAAL//vz+AQMC/wH//v7+AAP/+vz+AwL//v4ABAACAAD+AAAA/gEAAf////8B/fv7AQMFAP8A/P/8AQD/AwMDAP//AQEDAP/9//79AQIB/f3+BAT/AAMB+/v5+vz+AQEAAwICAQIAAQEA/Pv8/QABAAD9AP8D/gL////+/wD+/v7+AP7/+/4BAwMBAQMBAgACAwUDAf0CAf/++/37CAMGAAMC/P78//39/v3/AQD/AAID//z98ezr/fn4CQUE/gMDAwECBQUGAgUGBwoNBgkJAQIA/v0C+/37/f/8////Af/+//77BAIJ/P39AgEACAcF/v/+AAEDAwIDBwcGBQQDBwcH/v7++fX9//z8//7/AAIFAv8AAgQGCgsPFhwkDg8R/v79BwoPAwYJAQICAQIB/fz7//z8/v8BAP8ABAME/v/9AQEB/f8BAgD/AP8CAAAABwcE/wH+Af8AAvwA+/v8/wIC/gAA/v7+AgEDBQcGBwkJ+vz7/fz+Av/7Avz9/f8ABQICAgED/gH/AQcDAfz9+Pj4BAUEBAQFAf0A+v37+/z7AAABCgoKAgACAQAADAsKAgIC9/f5AgD+AgIDAQEA/v4A+/0AAwUFAP/+AAABAAEB//7/BQUEAAD/+/v7BAIDAgQEAgH/Af4B/f39AQD/AgQBAgEFAfwC+QL3/fz9AgME/wEA+/v9/v38BAMHAgEC/wIBBQAE+v39/fv6AQIDAgEC/QD+AP4B//7+/v3+/P36AQME//4AAP4DAwMAAgAA/Pz+AAEAAf8C+f78BPz///7/AQEA+/v8/f39/v/8/v4ABAYI/wMEA/z7/wMD/Pz8/f39/v8BAwMC//0AAQEEAwMBAgQB/Pr6+Pj4AQIB+/z8Af/8BP///v4BAQH/Av8A//4BAQD9/v8B/gIDAf/9/gAAAAD/Af0CAf8AAv0AAQMCAAMBAv8C/wD///8AAQMCAQEBAAD//v7/AgMAAAACAAEAAAD/AAEBAv/+/wAB/wMCAf7+AAACAP8A/gH/AwACAP8A/wH+/gECAAD+//8AAAIBAP7//wEA/wD/AgAA/wEBAQABAAIBAf7//v8AAAEBAf7/AAD+/gABAv/+/v79//8BAP//AAICAf7+/wEAAAEBAf7//f7+/wECAwAAAAEAAP///gABAQL/AAEAAQD+/wAAAAD/AP8A/wIA//0B/wL+AP4BAAMBAQEAAP/+/wEBAP39/gEB/wEEAAIA/gAAAQD/AAMCAv7+/QEBAP8BAf//AP7+AAIBAP3//gEBAPz+/QEEAgP+/v0A/wAB/v/+AQAB/wEBAv4AAAD9/wEBAP//AP0A/wMAAQIA//8AAv79/gABAAABAgEC/f8AAgD+/wEBAgAB/wACAQH9AP8B//7//gP/AQMBAf8AAf///gABAv4BAQIAAQP/AAABAAEBBP8A/wH//wECAgH9AAAC\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Resolution/Medium/ImageURLMedium.json",
    "content": "{\n  \"created\": 1667674510,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-euW0HHRIAcFPddYSrH88KT5m.png?st=2022-11-05T17%3A55%3A10Z&se=2022-11-05T19%3A55%3A10Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T01%3A59%3A18Z&ske=2022-11-06T01%3A59%3A18Z&sks=b&skv=2021-08-06&sig=MKT7ppV/JsOoB1%2BqdLhW4NUliwk3emt2TVZHzKxyPsE%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Resolution/Small/ImageB64Small.json",
    "content": "{\n  \"created\": 1667615111,\n  \"data\": [\n    {\n      \"b64_json\": \"iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAAaGVYSWZNTQAqAAAACAACknwAAgAAACkAAAAmkoYAAgAAABgAAABQAAAAAE9wZW5BSS0tMzA4ZTg2NzZiNWMwMjE4OTE4NmViMGNhYTRmOTViYzgAAE1hZGUgd2l0aCBPcGVuQUkgREFMTC1FAC/8JS8AAQAASURBVHgBACuB1H4BQiIkAAEBAAAAAAAAAQEBAAAAAQABAAAAAAAB/wAAAAEBAP8A/wD/AAEAAAAAAAAA//8AAAEAAP8BAAEAAf8BAAEAAQAB/wEAAAAAAQEAAP8AAAABAAD/AAABAAEAAP8AAAIBAQAAAAD///8AAAAAAP8AAQEA/wAAAP8AAAEAAP8AAAEAAAAAAQEBAAAAAQAB/wEAAQABAAD//wD/AAAAAQAAAAABAAABAAD+/wEAAQABAP8AAQEB/wD/AQAA/wABAAH//wABAAAA/wEAAQABAAEBAQEAAAABAQICAgIBAgECAAEBAAAA/////v8A//7////9/v//AP//AAABAQIBAgECAQEBAgMDAgMCAwQDAQEBAQEBAwMCAAAAAQECAAD//////f39/vz9/wD//vz+/v79/v//////AQAAAQEBAQAAAgICAQIAAQD/AAAAAAAAAAAAAQEB/wAAAP//AAAA/////v7/AAEBAgIBAQAAAQEAAQEBAQEAAQEAAgICAgICAQEA/wD///79/f3//f38/v7///8AAgD+AgEBAwMCBAICAwQDBAMDAQEBAgEAAAAAAP8A/////v7+//7+/v/+AQAAAAD/AAH/AgEAAgICBAIDAQIBAQEAAQAA//////4A/f79+/z9/QAB/f38/fz+AP8A/wEAAAAAAQIBAwMBBAQCBgUEBgUFBQYEBAMEBAMDAQIBAQEB/v/+/f38/f39AQEAAwICBQUECAcEBwYEBAICAQEA/f7++/z9+/v++/v7/fz++fr5+fj4/Pz7+/v7+/z8+vn8+vv7/f39Af//AAD/AgIBBgUDCAYFBwcDBgQEBAMBAQEAAP8A/v////8A/wD//v///f3//P39+/38+/v9/v7+AAD/AgEBBAMBBAQBBAIBBgUEBQQDAgIAAQD/AgEB//8AAP8A/Pz8/v7+/f7+/v8A////AAAAAAEAAQEAAQAAAAD/AgEBAQEAAP///gD///7//f3++/z9/P3//P3//P4A/f///v7//wH//v//BAECAgEBAQABAAD/AAEBAAABAQD/AAAAAAAAAQEAAQAAAAABAP8AAAEBAf//Af8A/gEBAQAAAAAAAAABAAEBAQABAQD/AAECAQD/AAABAQABAAAA/wD/Af8BAAEAAAABAAEBAf8AAAH/Af8B/wEAAAABAAAAAAH/AAACAAAA/wABAQAAAAABAQEAAAEBAQAA/wAAAAAAAAAAAQIAAf8BAAD//wAAAQAAAAAAAgIAAP8BAQEBAAD//wAAAf8AAAABAAD/AQACAQAAAAAAAP8BAQEAAf//AAEAAQD/AP//AP4A/wD/AAAAAP8AAP8A//8A//4AAQAAAP8BAQIAAQEAAQABAQABAQABAAACAgAAAQABAQECAgACAwEBAQEAAP7//wAA/wECAAAD///8/v4A//7/Af3+/gD/////AAEA/wEBAQH//wH+AAAA//8A/wH///8AAAICAQH/AQAB//8AAQD///3+/wAA/wICAgAAAAIAAAECAP///wD//gABAQMCAQEC////Af7//v/////+/////wD//wAAAAMCAf7+//0C/gT+Af0CAAECAAEAAQABAAAA/wD/AP/////+//////8A/v///gEA/wEAAAICAQMC/QICAgMCAQAAAAAAAP3+/v3+//7///7+//z9//7/AP7+/gEAAf///wECAf8AAQABAAEB/gEB/gAB/v/+//7//gIBAQABAP7//v7//v39/wAAAAIC/f7/AAAA/v/+/QQEAwICAP7+//v7/fn6/Pn4+fv8/f38/P7+//3+////AP/+Af7/AP//Af/+Af7//wAAAP8AAP3/Af3/AP7+AP////7//gIAAf//AP////8AAP///wD+AP///v///f/+/v8A/v7///////4B////AAAAAgADAQIC/QIBAf4AAAEAAAIBAAD/AP7+//z+//3+//7+//8AAP7+/wEBAAIAAQD//wICAgEBAQACAQAAAAAA/wD+/v7+/v39//7+//7/AP//AP7+/f/+AP8AAAEBAf///wQCAgEBAQIBAAH/Af8AAAAAAAABAgEAAP8BAAL/AAEBAAD/AAAAAAD/AQAB/wAAAAP/AP8BAAD/AAEBAAEAAAEAAAAAAgAAAQEBAQD//wAAAQAA/wEAAAD/AP8AAAEBAAD/AAACAAAAAgAD/wH/AAABAAAAAAAA//8AAQEAAAEAAP8AAAEAAP8BAQEAAAD/AQECAAAA/wAAAQH/AP8B/wAAAQEAAP8A/wEAAgAA/wABAQEA/wAAAgAB/wEBAQD+AAAAAQAB/wEAAgABAAAAAAH/AQABAAAAAQEAAgIBAAEAAAEAAQAAAAAB/wD///8AAQECAAH/Af8BAAAAAQEAAQH/AAABAgIAAQIBAQIAAgMBAgEBAgIBAgIBAAEBAAAAAP4AAAH/AQAAAAL/Af//AAL+AP0AAAH/AAD/AP7/AAEA/wAB/v8CAQH/AP8AAP/+//8A//8D/wIAAAD/AP4A/wH///8AAAD/AAD9/v0AAQAA/wABAQD///8AAAEBAP8AAQEAAQAAAP4AAAAAAAAA/wEAAQAA/gEBAQD//gH+Af8C/wD9//4DAgACAQEAAP8AAQAA/wAAAP8A////////////AP7///////4AAP8DAQEDAv8CAv8CAQEBAQH/AAD/AP8A///+///9/v/9/v/+/v/+/gAAAf8A//8A/wAAAgEA/gEA/f//Af79//0EBQED/wIDAgIBAQD/AP/+/v79/f3//v8CAQD9Av79/AD7BAMDBAIDAQL/AP/7/P37+/z7+vz7/P3//v7//v3+/gD+/wH+/wD+/wD+/v/9/wD//gH/AP8DAP/+/v7+///+///+/v0CAQH9Af8AAAH///7//wH//v79/wD+/v/+/gD+///+/v///v7/AP/+/gD/Af/+//79/QH/AAD+/wAD/QEBAQEBAQD+/v///v/////9/v7///7+/wAA//8BAgH+AAACAQAAAf8C/wL9AAACAQEA////AAH+/gD+/wD+AAH+AAD+Af//A\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/Resolution/Small/ImageURLSmall.json",
    "content": "{\n  \"created\": 1667661280,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-byoTBAgSaGlyyTCGjnFhbSVx.png?st=2022-11-05T14%3A14%3A40Z&se=2022-11-05T16%3A14%3A40Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A20%3A52Z&ske=2022-11-06T02%3A20%3A52Z&sks=b&skv=2021-08-06&sig=Gb%2BBa63eW2kp8cZlD7Kmkz7BhtiRKmKgxnvds1mqA6A%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/ResponseFormat/ImageB64.json",
    "content": "{\n  \"created\": 1667615111,\n  \"data\": [\n    {\n      \"b64_json\": \"iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAAaGVYSWZNTQAqAAAACAACknwAAgAAACkAAAAmkoYAAgAAABgAAABQAAAAAE9wZW5BSS0tMzA4ZTg2NzZiNWMwMjE4OTE4NmViMGNhYTRmOTViYzgAAE1hZGUgd2l0aCBPcGVuQUkgREFMTC1FAC/8JS8AAQAASURBVHgBACuB1H4BQiIkAAEBAAAAAAAAAQEBAAAAAQABAAAAAAAB/wAAAAEBAP8A/wD/AAEAAAAAAAAA//8AAAEAAP8BAAEAAf8BAAEAAQAB/wEAAAAAAQEAAP8AAAABAAD/AAABAAEAAP8AAAIBAQAAAAD///8AAAAAAP8AAQEA/wAAAP8AAAEAAP8AAAEAAAAAAQEBAAAAAQAB/wEAAQABAAD//wD/AAAAAQAAAAABAAABAAD+/wEAAQABAP8AAQEB/wD/AQAA/wABAAH//wABAAAA/wEAAQABAAEBAQEAAAABAQICAgIBAgECAAEBAAAA/////v8A//7////9/v//AP//AAABAQIBAgECAQEBAgMDAgMCAwQDAQEBAQEBAwMCAAAAAQECAAD//////f39/vz9/wD//vz+/v79/v//////AQAAAQEBAQAAAgICAQIAAQD/AAAAAAAAAAAAAQEB/wAAAP//AAAA/////v7/AAEBAgIBAQAAAQEAAQEBAQEAAQEAAgICAgICAQEA/wD///79/f3//f38/v7///8AAgD+AgEBAwMCBAICAwQDBAMDAQEBAgEAAAAAAP8A/////v7+//7+/v/+AQAAAAD/AAH/AgEAAgICBAIDAQIBAQEAAQAA//////4A/f79+/z9/QAB/f38/fz+AP8A/wEAAAAAAQIBAwMBBAQCBgUEBgUFBQYEBAMEBAMDAQIBAQEB/v/+/f38/f39AQEAAwICBQUECAcEBwYEBAICAQEA/f7++/z9+/v++/v7/fz++fr5+fj4/Pz7+/v7+/z8+vn8+vv7/f39Af//AAD/AgIBBgUDCAYFBwcDBgQEBAMBAQEAAP8A/v////8A/wD//v///f3//P39+/38+/v9/v7+AAD/AgEBBAMBBAQBBAIBBgUEBQQDAgIAAQD/AgEB//8AAP8A/Pz8/v7+/f7+/v8A////AAAAAAEAAQEAAQAAAAD/AgEBAQEAAP///gD///7//f3++/z9/P3//P3//P4A/f///v7//wH//v//BAECAgEBAQABAAD/AAEBAAABAQD/AAAAAAAAAQEAAQAAAAABAP8AAAEBAf//Af8A/gEBAQAAAAAAAAABAAEBAQABAQD/AAECAQD/AAABAQABAAAA/wD/Af8BAAEAAAABAAEBAf8AAAH/Af8B/wEAAAABAAAAAAH/AAACAAAA/wABAQAAAAABAQEAAAEBAQAA/wAAAAAAAAAAAQIAAf8BAAD//wAAAQAAAAAAAgIAAP8BAQEBAAD//wAAAf8AAAABAAD/AQACAQAAAAAAAP8BAQEAAf//AAEAAQD/AP//AP4A/wD/AAAAAP8AAP8A//8A//4AAQAAAP8BAQIAAQEAAQABAQABAQABAAACAgAAAQABAQECAgACAwEBAQEAAP7//wAA/wECAAAD///8/v4A//7/Af3+/gD/////AAEA/wEBAQH//wH+AAAA//8A/wH///8AAAICAQH/AQAB//8AAQD///3+/wAA/wICAgAAAAIAAAECAP///wD//gABAQMCAQEC////Af7//v/////+/////wD//wAAAAMCAf7+//0C/gT+Af0CAAECAAEAAQABAAAA/wD/AP/////+//////8A/v///gEA/wEAAAICAQMC/QICAgMCAQAAAAAAAP3+/v3+//7///7+//z9//7/AP7+/gEAAf///wECAf8AAQABAAEB/gEB/gAB/v/+//7//gIBAQABAP7//v7//v39/wAAAAIC/f7/AAAA/v/+/QQEAwICAP7+//v7/fn6/Pn4+fv8/f38/P7+//3+////AP/+Af7/AP//Af/+Af7//wAAAP8AAP3/Af3/AP7+AP////7//gIAAf//AP////8AAP///wD+AP///v///f/+/v8A/v7///////4B////AAAAAgADAQIC/QIBAf4AAAEAAAIBAAD/AP7+//z+//3+//7+//8AAP7+/wEBAAIAAQD//wICAgEBAQACAQAAAAAA/wD+/v7+/v39//7+//7/AP//AP7+/f/+AP8AAAEBAf///wQCAgEBAQIBAAH/Af8AAAAAAAABAgEAAP8BAAL/AAEBAAD/AAAAAAD/AQAB/wAAAAP/AP8BAAD/AAEBAAEAAAEAAAAAAgAAAQEBAQD//wAAAQAA/wEAAAD/AP8AAAEBAAD/AAACAAAAAgAD/wH/AAABAAAAAAAA//8AAQEAAAEAAP8AAAEAAP8BAQEAAAD/AQECAAAA/wAAAQH/AP8B/wAAAQEAAP8A/wEAAgAA/wABAQEA/wAAAgAB/wEBAQD+AAAAAQAB/wEAAgABAAAAAAH/AQABAAAAAQEAAgIBAAEAAAEAAQAAAAAB/wD///8AAQECAAH/Af8BAAAAAQEAAQH/AAABAgIAAQIBAQIAAgMBAgEBAgIBAgIBAAEBAAAAAP4AAAH/AQAAAAL/Af//AAL+AP0AAAH/AAD/AP7/AAEA/wAB/v8CAQH/AP8AAP/+//8A//8D/wIAAAD/AP4A/wH///8AAAD/AAD9/v0AAQAA/wABAQD///8AAAEBAP8AAQEAAQAAAP4AAAAAAAAA/wEAAQAA/gEBAQD//gH+Af8C/wD9//4DAgACAQEAAP8AAQAA/wAAAP8A////////////AP7///////4AAP8DAQEDAv8CAv8CAQEBAQH/AAD/AP8A///+///9/v/9/v/+/v/+/gAAAf8A//8A/wAAAgEA/gEA/f//Af79//0EBQED/wIDAgIBAQD/AP/+/v79/f3//v8CAQD9Av79/AD7BAMDBAIDAQL/AP/7/P37+/z7+vz7/P3//v7//v3+/gD+/wH+/wD+/wD+/v/9/wD//gH/AP8DAP/+/v7+///+///+/v0CAQH9Af8AAAH///7//wH//v79/wD+/v/+/gD+///+/v///v7/AP/+/gD/Af/+//79/QH/AAD+/wAD/QEBAQEBAQD+/v///v/////9/v7///7+/wAA//8BAgH+AAACAQAAAf8C/wL9AAACAQEA////AAH+/gD+/wD+AAH+AAD+Af//A\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Images/ResponseFormat/ImageURL.json",
    "content": "{\n  \"created\": 1667661280,\n  \"data\": [\n    {\n      \"url\": \"https://oaidalleapiprodscus.blob.core.windows.net/private/org-3JlqS7fDgniMfkzHfwwEdBm3/user-a1pfIvdAwqSA0RVdjzqH921M/img-byoTBAgSaGlyyTCGjnFhbSVx.png?st=2022-11-05T14%3A14%3A40Z&se=2022-11-05T16%3A14%3A40Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-11-05T02%3A20%3A52Z&ske=2022-11-06T02%3A20%3A52Z&sks=b&skv=2021-08-06&sig=Gb%2BBa63eW2kp8cZlD7Kmkz7BhtiRKmKgxnvds1mqA6A%3D\"\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/List Files/ListFilesResponse.json",
    "content": "{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"object\": \"file\",\n      \"id\": \"file-uvdyS3qukzhVrcvxOcjk0Xss\",\n      \"purpose\": \"fine-tune\",\n      \"filename\": \"sampleData.jsonl\",\n      \"bytes\": 18950,\n      \"created_at\": 1668098746,\n      \"status\": \"processed\",\n      \"status_details\": null\n    }\n  ]\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/List Models/ModelsResponse.json",
    "content": "{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"model-id-0\",\n      \"object\": \"model\",\n      \"created\": 1686935002,\n      \"owned_by\": \"organization-owner\"\n    },\n    {\n      \"id\": \"model-id-1\",\n      \"object\": \"model\",\n      \"created\": 1686935002,\n      \"owned_by\": \"organization-owner\",\n    },\n    {\n      \"id\": \"model-id-2\",\n      \"object\": \"model\",\n      \"created\": 1686935002,\n      \"owned_by\": \"openai\"\n    },\n  ],\n  \"object\": \"list\"\n}\n"
  },
  {
    "path": "Tests/Resources/JSON Responses/Retrieve Model/RetrieveModelResponse.json",
    "content": "{\n  \"id\": \"davinci\",\n  \"object\": \"model\",\n  \"created\": 1686935002,\n  \"owned_by\": \"openai\"\n}\n"
  },
  {
    "path": "Tests/Test Plans/iOS-TS.xctestplan",
    "content": "{\n  \"configurations\" : [\n    {\n      \"id\" : \"34DFFD4E-7557-4BE2-9AE5-AC7A0EBFC98A\",\n      \"name\" : \"Default\",\n      \"options\" : {\n\n      }\n    }\n  ],\n  \"defaultOptions\" : {\n    \"codeCoverage\" : false\n  },\n  \"testTargets\" : [\n    {\n        \"target\" : {\n            \"containerPath\" : \"container:\",\n            \"identifier\" : \"OpenAIKitTests\",\n            \"name\" : \"OpenAITests\"\n        }\n    }\n  ],\n  \"version\" : 1\n}\n"
  }
]