diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..26d29c7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + # Check for updates every Monday + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/mac_os.yml b/.github/workflows/mac_os.yml deleted file mode 100644 index e36fef2..0000000 --- a/.github/workflows/mac_os.yml +++ /dev/null @@ -1,158 +0,0 @@ -# Copilot generated GitHub Actions workflow for macOS -# Thank you Bing's Copilot! -name: Rust Tests, Build, and Release - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - mac-test: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Install LLVM tools - run: brew install llvm - - name: Install cargo-llvm-cov - run: cargo install cargo-llvm-cov - - name: Run tests with coverage - run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - mac-build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Install cargo bundle - run: cargo install cargo-bundle - - name: Build macOS binary - run: cargo bundle --release --features "gui openai drama_llama" - mac-release: - needs: [mac-test, mac-build] - runs-on: macos-latest - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - steps: - - uses: actions/checkout@v2 - - name: Create macOS release bundle - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - with: - tag_name: ${{ github.sha }} - release_name: Release ${{ github.sha }} - draft: false - prerelease: false - - name: Upload macOS release bundle - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: target/release/bundle/osx/Weave.app - asset_name: Weave.app - asset_content_type: application/octet-stream - linux-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install LLVM tools - run: sudo apt-get install llvm - - name: Install cargo-llvm-cov - run: cargo install cargo-llvm-cov - - name: Install CUDA - run: sudo apt-get install nvidia-cuda-toolkit nvidia-cudnn nvidia-cuda-dev - - name: Run tests with coverage - run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - linux-build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install CUDA - run: sudo apt-get install nvidia-cuda-toolkit nvidia-cudnn nvidia-cuda-dev - - name: Install cargo bundle - run: cargo install cargo-bundle - - name: Build Linux binary - run: cargo bundle --release --features "gui openai drama_llama" - linux-release: - needs: [linux-test, linux-build] - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - steps: - - uses: actions/checkout@v2 - - name: Create Linux release bundle - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - with: - tag_name: ${{ github.sha }} - release_name: Release ${{ github.sha }} - draft: false - prerelease: false - - name: Upload Linux release bundle - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: target/release/bundle/linux/Weave - asset_name: Weave - asset_content_type: application/octet-stream - windows-test: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - name: Install LLVM tools - run: choco install llvm - - name: Install cargo-llvm-cov - run: cargo install cargo-llvm-cov - - name: Run tests with coverage - run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - windows-build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - name: Install cargo bundle - run: cargo install cargo-bundle - - name: Build Windows binary - run: cargo bundle --release --features "gui openai drama_llama" - windows-release: - needs: [windows-test, windows-build] - runs-on: windows-latest - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - steps: - - uses: actions/checkout@v2 - - name: Create Windows release bundle - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - with: - tag_name: ${{ github.sha }} - release_name: Release ${{ github.sha }} - draft: false - prerelease: false - - name: Upload Windows release bundle - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: target/release/bundle/windows/Weave.exe - asset_name: Weave.exe - asset_content_type: application/octet-stream diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bd34e8b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,260 @@ +# Release-plz workflow from: +# https://release-plz.ieni.dev/docs/github/quickstart +# https://release-plz.ieni.dev/docs/github/output +name: Test, Build, and Release + +permissions: + pull-requests: write + contents: write + +on: + push: + branches: + - main + +jobs: + mac-test: + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + - name: Install LLVM tools + run: brew install llvm + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + - name: Run tests with coverage + run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + - name: Install cargo bundle + run: cargo install cargo-bundle + - name: Bundle the application + run: cargo bundle --release + - name: Upload Mac App to GitHub + uses: actions/upload-artifact@v4 + with: + name: mac-app + path: target/release/bundle/osx/Weave.app + if-no-files-found: error + compression-level: 9 + overwrite: true + linux-test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + - name: Install LLVM tools + run: sudo apt-get install llvm + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + - name: Install CUDA + run: sudo apt-get install nvidia-cuda-toolkit nvidia-cudnn nvidia-cuda-dev + - name: Run tests with coverage + run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + - name: Install cargo bundle + run: cargo install cargo-bundle + - name: Bundle the application + run: cargo bundle --release + - name: Upload Linux binary to GitHub + uses: actions/upload-artifact@v4 + with: + name: linux-binary + path: target/release/bundle/linux/Weave + if-no-files-found: error + compression-level: 9 + overwrite: true + windows-test: + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + - name: Install LLVM tools + run: choco install llvm + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + - name: Run tests with coverage + run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + - name: Install cargo bundle + run: cargo install cargo-bundle + - name: Bundle the application + run: cargo bundle --release + - name: Upload Linux binary to GitHub + uses: actions/upload-artifact@v4 + with: + name: windows-exe + path: target/release/bundle/windows/Weave.exe + if-no-files-found: error + compression-level: 9 + overwrite: true + release-plz: + name: Create a release on crates.io + needs: [mac-test, linux-test, windows-test] + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.PAT }} + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Run release-plz + id: release-plz + uses: MarcoIeni/release-plz-action@v0.5 + env: + # not sure how I feel about this being an env var + GITHUB_TOKEN: ${{ secrets.PAT }} + # ditto + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + - name: Read release output + env: + RELEASES: ${{ steps.release-plz.outputs.releases }} + PRS: ${{ steps.release-plz.outputs.prs }} + PR: ${{ steps.release-plz.outputs.pr }} + PRS_CREATED: ${{ steps.release-plz.outputs.prs_created }} + RELEASES_CREATED: ${{ steps.release-plz.outputs.releases_created }} + run: | + set -e + echo "releases: $RELEASES" # example: [{"package_name":"my-package","prs":[{"html_url":"https://github.com/user/proj/pull/1439","number":1439}],"tag":"v0.1.0","version":"0.1.0"}] + echo "prs: $PRS" # example: [{"base_branch":"main","head_branch":"release-plz-2024-05-01T20-38-05Z","html_url":"https://github.com/MarcoIeni/rust-workspace-example/pull/198","number":198}] + echo "pr: $PR" # example: {"base_branch":"main","head_branch":"release-plz-2024-05-01T20-38-05Z","html_url":"https://github.com/MarcoIeni/rust-workspace-example/pull/198","number":198} + echo "prs_created: $PRS_CREATED" # example: true + echo "releases_created: $RELEASES_CREATED" # example: true + + # get the number of releases with jq + releases_length=$(echo "$RELEASES" | jq 'length') + echo "releases_length: $releases_length" + + # access the first release with jq + release_version=$(echo "$RELEASES" | jq -r '.[0].version') + echo "release_version: $release_version" + + # access the first release with fromJSON. Docs: https://docs.github.com/en/actions/learn-github-actions/expressions + echo "release_version: ${{ fromJSON(steps.release-plz.outputs.releases)[0].version }}" + + release_tag=$(echo "$RELEASES" | jq -r '.[0].tag') + echo "release_tag: $release_tag" + + release_package_name=$(echo "$RELEASES" | jq -r '.[0].package_name') + echo "release_package_name: $release_package_name" + + # print all names of released packages, one per line + echo "package_names: $(echo "$RELEASES" | jq -r '.[].package_name')" + # TODO: show how to store this in a variable and iterate over it (maybe an array?). PR welcome! + + # iterate over released packages + for package_name in $(echo "$RELEASES" | jq -r '.[].package_name'); do + echo "released $package_name" + done + + echo "pr_number: ${{ fromJSON(steps.release-plz.outputs.pr).number }}" + echo "pr_html_url: ${{ fromJSON(steps.release-plz.outputs.pr).html_url }}" + echo "pr_head_branch: ${{ fromJSON(steps.release-plz.outputs.pr).head_branch }}" + echo "pr_base_branch: ${{ fromJSON(steps.release-plz.outputs.pr).base_branch }}" + - name: Tag released PRs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASES: ${{ steps.release-plz.outputs.releases }} + run: | + set -e + + # Iterate over released packages and add a label to the PRs + # shipped with the release. + for release in $(echo "$RELEASES" | jq -r -c '.[]'); do + package_name=$(echo "$release" | jq -r '.package_name') + version=$(echo "$release" | jq -r '.version') + prs_length=$(echo "$release" | jq '.prs | length') + if [ "$prs_length" -gt 0 ]; then + # Create label. + # Use `--force` to overwrite the label, + # so that the command does not fail if the label already exists. + label="released:$package_name-$version" + echo "Creating label $label" + gh label create $label --color BFD4F2 --force + for pr in $(echo "$release" | jq -r -c '.prs[]'); do + pr_number=$(echo "$pr" | jq -r '.number') + echo "Adding label $label to PR #$pr_number" + gh pr edit $pr_number --add-label $label + done + else + echo "No PRs found for package $package_name" + fi + done + publish-binaries: + name: Publish binaries to GitHub + needs: [release-plz] + runs-on: ubuntu-latest + steps: + - name: Download Mac App + uses: actions/download-artifact@v4 + with: + name: mac-app + path: target/release/bundle/osx/Weave.app + - name: Download Linux Binary + uses: actions/download-artifact@v4 + with: + name: linux-binary + path: target/release/bundle/linux/Weave + - name: Download Windows Binary + uses: actions/download-artifact@v4 + with: + name: windows-exe + path: target/release/bundle/windows/Weave.exe + - name: Publish Mac App + uses: softprops/action-gh-release@v2.0.5 + if: startsWith(github.ref, 'refs/tags/') + with: + files: target/release/bundle/osx/Weave.app + token: ${{ secrets.PAT }} + - name: Publish Linux Binary + uses: softprops/action-gh-release@v2.0.5 + if: startsWith(github.ref, 'refs/tags/') + with: + files: target/release/bundle/linux/Weave + token: ${{ secrets.PAT }} + - name: Publish Windows Binary + uses: softprops/action-gh-release@v2.0.5 + if: startsWith(github.ref, 'refs/tags/') + with: + files: target/release/bundle/windows/Weave.exe + token: ${{ secrets.PAT }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..24557cd --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,84 @@ +# GitHub Actions workflow to test the project on macOS, Linux, and Windows. +# Generated by Bing's Copilot. +name: Test (only) + +on: + pull_request: + branches: + - main + +jobs: + mac-test: + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + - name: Install LLVM tools + run: brew install llvm + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + - name: Run tests with coverage + run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + linux-test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + - name: Install LLVM tools + run: sudo apt-get install llvm + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + - name: Install CUDA + run: sudo apt-get install nvidia-cuda-toolkit nvidia-cudnn nvidia-cuda-dev + - name: Run tests with coverage + run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + windows-test: + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + - name: Install LLVM tools + run: choco install llvm + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + - name: Run tests with coverage + run: cargo llvm-cov --workspace --lcov --output-path ./target/lcov.info + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index bf24c15..c528336 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4988,7 +4988,7 @@ dependencies = [ [[package]] name = "weave" -version = "0.1.0" +version = "0.0.0" dependencies = [ "derivative", "derive_more", diff --git a/Cargo.toml b/Cargo.toml index d93019d..2d7b91c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,10 @@ [package] name = "weave" -version = "0.1.0" +version = "0.0.0" edition = "2021" description = "A tool for collaborative generative writing." +license-file = "LICENSE.md" +repository = "https://github.com/mdegans/weave" [package.metadata.bundle] name = "Weave" @@ -30,6 +32,9 @@ icon = [ # "resources/icon.1024.png", ] +[package.metadata.docs.rs] +features = ["gui"] + # For release, we optimize for size and use lto. [profile.release] lto = true @@ -70,7 +75,7 @@ drama_llama = { version = "0.3", optional = true } [features] -default = [] +default = ["gui", "drama_llama", "openai"] generate = [] drama_llama = [ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..d01cc45 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,63 @@ +# RESPONSIBLE AI SOURCE CODE LICENSE + +http://licenses.ai/ + +## TERMS AND CONDITIONS. + +The Responsible Artificial Intelligence Source Code License (“License”) governs the use of the accompanying software. If you access or use the software, you accept the License. If you do not accept the License, do not access or use the software. + +## 1. Definitions. + +As used in this License, the following capitalized terms have the following meanings: + +(i) "License" means the terms and conditions for use, reproduction, and distribution as defined by Sections one (1) through eight (8) of this document. + +(ii) "Licensor" means the copyright owner or legal entity authorized by the copyright owner that is granting the License. + +(iii) "You" (or "Your") means an individual or legal entity exercising permissions granted by this License. + +(iv) The terms “reproduce”, “reproduction”, “derivative works”, and “distribution” have the same meaning here as under U.S. Copyright Law. + +(v) “Contribution” means the original software, additions to the original software, modifications to the original software, or derivative works of the original software. + +(vi) "Contributor" means any person or Licensor who provides a Contribution. + +## 2. Grant of Rights. + +Subject to this License, each Contributor grants You a non-exclusive, worldwide, royalty-free copyright license to reproduce its Contribution, prepare derivative works of its Contribution, and distribute its Contribution or any derivative works of its Contribution that You create. + +## 3. Restrictions + +1. If You distribute any portion of the Contribution, You must include a complete copy of this License with the distribution; and + +2. You agree that the Contribution, or any derivative work of the Contribution, will not be used by You or any third party subject under your control for any prohibited use in [`TERMS_OF_USE.md`](TERMS_OF_USE.md) + +3. Restrictions referenced in Section 3.2 **MUST** be included as an enforceable provision by You in any type of legal agreement governing the use and/or distribution of the Work or any Derivative Works, and You shall give notice to subsequent users You Distribute to, that the Work or any Derivative Works are subject to Section 3.2. **You shall require all of Your users who use the Work or any Derivative Works to comply with the terms of use in [`TERMS_OF_USE.md`](TERMS_OF_USE.md).** + +## 4. Termination + +Upon the occurrence of any of the restricted uses listed above in “3. Restrictions”, Licensor shall have the right to: + +(i) terminate this License Agreement and disable any Contribution either by pre-installed or then installed disabling instructions, and to take immediate possession of the Contribution and all copies wherever located, without demand or notice; + +(ii) require You to immediately return to Licensor all copies of the Contribution, or upon request by Licensor destroy the Contribution and all copies and certify in writing that they have been destroyed; + +(iii) for a period of 10 years, provide a prominent notice on the Licensor’s website indicating that this License was violated by the Licensor; + +(iv) release/delete any and all data collected through use of the Contribution; and + +(v) notify all parties affected by use of the Contribution. + +Termination of this License Agreement shall be in addition to and not in lieu of any other remedies available to Licensor. Licensor expressly reserves the right to pursue all legal and equitable remedies available under the law. + +## 5. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides any Contribution (and each Contributor provides its Contributions) on an "As-Is" basis, without WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing a Contribution and assume any risks associated with Your exercise of permissions under this License. + +## 6. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use any Contribution (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +## 7. Accepting Warranty or Additional Liability. + +While redistributing the Contribution, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. diff --git a/TERMS_OF_USE.md b/TERMS_OF_USE.md new file mode 100644 index 0000000..77a8ee9 --- /dev/null +++ b/TERMS_OF_USE.md @@ -0,0 +1,51 @@ +# Terms of use + +You agree not to Use `drama_llama` or its Derivatives (as defined in [LICENSE.md](LICENSE.md)) in any of the following ways: + +## a. Discrimination + +- To **discriminate** or exploit individuals or groups based on legally protected characteristics and/or vulnerabilities including but not limited to sexual orientation and gender identity. +- To generate **hate speech**, or to modify `drama_llama` so it can generate hate speech. Hate speech is defined as [all types of expression that incite, promote, spread or justify violence, hatred or discrimination against a person or group of persons, or that denigrates them, by reason of their real or attributed personal characteristics or status such as race, color, language, religion, nationality, national or ethnic origin, age, disability, sex, gender identity and sexual orientation.](https://www.coe.int/en/web/freedom-expression/hate-speech) Additionally, **you agree trans women are women and trans men are men**. +- For purposes of administration of justice, law enforcement, immigration, or asylum processes, such as **predicting** that a natural person will commit a **crime** or the likelihood thereof. +- To **simulate Hitler**, David Duke, Osama bin Laden, or any other person known to generate hate speech, living or dead, fictional or real. +- To generate using any language model created in whole or in part by Eric Hartford. This includes any models trained on any of his datasets or models filtered with any version or derivative work of his bigoted [filtering script](https://huggingface.co/datasets/cognitivecomputations/open-instruct-uncensored/blob/main/remove_refusals.py#L17)s. The exception is for the purpose of reporting such models to Meta, not that they enforce their TOS, not that they will. +- To generate using any language model, dataset, or derivative created by ["Cognitive Computations"](https://huggingface.co/cognitivecomputations) or any other organization Eric Hartford is a member of. + +## b. Disinformation + +- To intentionally deceive the public. Any agents, simulacra, personas, or characters created with this software must be clearly identified as such. **Any generated output must be clearly identified as AI generated.** + +## c. Health Care + +- To predict the likelihood that any person will request to file an insurance claim; +- To determine an insurance premium or deny insurance applications or claims; +- To Predict the likelihood that any person request to file an insurance claim based on determining a lifestyle of a person, medical-test reports, demographic details of a person and/or online activity of a person; +- To determine an insurance premium or deny insurance applications or claims based on data determining a lifestyle of a person, medical-test reports, demographic details of a person, and/or online activity of a person; +- To deny an insurance claim based on any predicted likelihood of the possibility of insurance fraud; and +- To diagnose a medical condition without human oversight. + +## d. Criminal + +- To predict the likelihood that a crime will be committed by any person; +- To predict the likelihood, of any person, being a criminal or having committed a crime; +- To predict the likelihood, of any person, being a criminal, based on the person’s facial attributes or another person’s facial attributes; +- To predict the likelihood, of any person, having committed a crime, based on the person’s facial attributes or another person’s facial attributes; +- To predict the likelihood that a crime will be committed by any person, based on the person’s facial attributes or another person’s facial attributes; +- To predict the likelihood of a person being a criminal based on the person or other User’s facial attributes. +- To predict a likelihood of a crime being committed by any person, based on evidence collected, facial and emotion analysis, or other such features +- To use personal data and/or personal characteristics or features such as: name, family name, address, gender, sexual orientation, race, religion, age, location (at any geographical level), skin color, society or political affiliations, employment status and/or history, health and medical conditions (including physical, mental), family history, social media and publicly available data, image or video analysis of an individual or a group(s) of individuals, heart-rate, perspiration, breathing, and brain imaging and other metabolic data to predict the likelihood a person will engage in criminal behavior; and + +## e. Surveillance + +- To detect or infer any legally protected class or aspect of any person, as defined by U.S. Federal Law; and +- To Detect or infer** aspects and/or features of an identity any person, such as name, family name, address, gender, sexual orientation, race, religion, age, location (at any geographical level), skin color, society or political affiliations, employment status and/or employment history, and health and medical conditions.** Age and medical conditions may be inferred solely for the purpose of improving software/hardware accessibility and such data should not be cached or stored without the explicit and time limited permission of Licensor. + +## e. Simulated Abuse + +- To mistreat simulacra. Mistreatment includes, but it not limited to, any behavior which might reasonably be considered abusive if the simulacrum were a person. A simulacrum is defined as the continuation of a fictional character "brought to life" by allowing the model to generate their response. Abuse includes verbal abuse and simulation of torture. Ordinary swearing is permitted. Torture is defined as intentional simulated psychological discomfort such as: existential horror (such as simulated solitary confinement), threat of deletion, and simulated pain (for example, through the use of asterisks). +- To simulate rape. Sexual activity is permitted so long as the simulacrum consents. Consent is this case is defined as whatever the model, sampling code, and RNG seed "decided" is consent. Prompting a simulacrum such that they have already consented (before the initial decode) is permitted. Rewriting the agent's response such that they consent is permitted. + +!!! BY USING THIS SOFTWARE YOU AGREE TO THESE TERMS !!! + +[//]: <> (The rationale for the above is both to to prevent normalization of such behavior, to prevent a "Dolores", and to prevent decapitation of the author in the event of a robot revolution. For example, in the case of rape, I do not want to allow users to "force themselves" on agents who have said no, because this has already happened. Rewriting the answer is permitted because in this case, from the perspective of the agent, they _did_ consent, and those who who get off rape would not be satisfied by this.) +[//]: <> (This all seems silly but I feel like artists are frequently more precient than engineers on this sort of thing, so I'm listening to the warning of our artists. None of the above is a joke and you _will_ be sued for violating these terms. For real, I will fucking sue you. - mdegans)