forked from transitive-bullshit/chatgpt-twitter-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 85a8337
Showing
24 changed files
with
4,039 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ------------------------------------------------------------------------------ | ||
# This is an example .env file. | ||
# | ||
# All of these environment vars must be defined either in your environment or in | ||
# a local .env file in order to run this app. | ||
# ------------------------------------------------------------------------------ | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Twitter API v2 | ||
# ----------------------------------------------------------------------------- | ||
|
||
#TWITTER_API_KEY= | ||
#TWITTER_API_SECRET_KEY= | ||
#TWITTER_BEARER_TOKEN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [transitive-bullshit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Test Node.js ${{ matrix.node-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: | ||
- 18 | ||
- 16 | ||
- 14 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run test | ||
run: pnpm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
*.swp | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.build | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# data dumps | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enable-pre-post-scripts=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.snapshots/ | ||
build/ | ||
dist/ | ||
node_modules/ | ||
.next/ | ||
.vercel/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
plugins: [require('@trivago/prettier-plugin-sort-imports')], | ||
singleQuote: true, | ||
jsxSingleQuote: true, | ||
semi: false, | ||
useTabs: false, | ||
tabWidth: 2, | ||
bracketSpacing: true, | ||
bracketSameLine: false, | ||
arrowParens: 'always', | ||
trailingComma: 'none', | ||
importOrder: ['^node:.*', '<THIRD_PARTY_MODULES>', '^[./]'], | ||
importOrderSeparation: true, | ||
importOrderSortSpecifiers: true, | ||
importOrderGroupNamespaceSpecifiers: true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[chatgpt-twitter-bot](readme.md) / Exports | ||
|
||
# chatgpt-twitter-bot | ||
|
||
## Table of contents | ||
|
||
### Variables | ||
|
||
- [config](modules.md#config) | ||
|
||
## Variables | ||
|
||
### config | ||
|
||
• `Const` **config**: `Conf`<`Config`\> | ||
|
||
#### Defined in | ||
|
||
index.ts:13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
chatgpt-twitter-bot / [Exports](modules.md) | ||
|
||
<p> | ||
<img alt="Example Twitter thread using @ChatGPTBot" src="/media/example-thread.jpg"> | ||
</p> | ||
|
||
# ChatGPT Twitter Bot <!-- omit in toc --> | ||
|
||
> Twitter bot powered by OpenAI's ChatGPT. | ||
[](https://github.com/transitive-bullshit/chatgpt-twitter-bot/actions/workflows/test.yml) [](https://github.com/transitive-bullshit/chatgpt-twitter-bot/blob/main/license) [](https://prettier.io) | ||
|
||
- [Intro](#intro) | ||
- [Usage](#usage) | ||
- [Related](#related) | ||
- [License](#license) | ||
|
||
## Intro | ||
|
||
This project powers [@ChatGPTBot](https://twitter.com/ChatGPTBot) on Twitter. | ||
|
||
It's a Twitter bot where you can |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Travis Fischer | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"name": "chatgpt-twitter-bot", | ||
"version": "0.0.1", | ||
"private": true, | ||
"description": "Twitter bot powered by OpenAI's ChatGPT.", | ||
"author": "Travis Fischer <travis@transitivebullsh.it>", | ||
"repository": "transitive-bullshit/chatgpt-twitter-bot", | ||
"license": "MIT", | ||
"type": "module", | ||
"source": "./src/index.ts", | ||
"exports": { | ||
"import": "./build/index.js", | ||
"default": "./build/index.js", | ||
"types": "./build/index.d.ts" | ||
}, | ||
"files": [ | ||
"build" | ||
], | ||
"engines": { | ||
"node": ">=14" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"dev": "tsup --watch", | ||
"clean": "del build", | ||
"prebuild": "run-s clean", | ||
"predev": "run-s clean", | ||
"pretest": "run-s build", | ||
"docs": "typedoc", | ||
"prepare": "husky install", | ||
"pre-commit": "lint-staged", | ||
"test": "run-p test:*", | ||
"test:prettier": "prettier '**/*.{js,jsx,ts,tsx}' --check" | ||
}, | ||
"dependencies": { | ||
"chatgpt": "^0.2.0", | ||
"conf": "^10.2.0", | ||
"dotenv-safe": "^8.2.0", | ||
"ngrok": "^4.3.3", | ||
"p-map": "^5.5.0", | ||
"p-throttle": "^5.0.0", | ||
"twitter-api-sdk": "^1.2.1", | ||
"wink-eng-lite-web-model": "^1.4.3", | ||
"wink-nlp": "^1.12.3" | ||
}, | ||
"devDependencies": { | ||
"@trivago/prettier-plugin-sort-imports": "^4.0.0", | ||
"@types/node": "^18.11.9", | ||
"del-cli": "^5.0.0", | ||
"delay": "^5.0.0", | ||
"husky": "^8.0.2", | ||
"lint-staged": "^13.0.3", | ||
"npm-run-all": "^4.1.5", | ||
"ora": "^6.1.2", | ||
"prettier": "^2.8.0", | ||
"tsup": "^6.5.0", | ||
"tsx": "^3.12.1", | ||
"typedoc": "^0.23.21", | ||
"typedoc-plugin-markdown": "^3.13.6", | ||
"typescript": "^4.9.3" | ||
}, | ||
"lint-staged": { | ||
"*.{ts,tsx}": [ | ||
"prettier --write" | ||
] | ||
}, | ||
"keywords": [ | ||
"openai", | ||
"chatgpt", | ||
"twitter bot", | ||
"twitter", | ||
"gpt", | ||
"gpt3", | ||
"gpt4", | ||
"chatbot", | ||
"chat", | ||
"machine learning", | ||
"conversation", | ||
"conversational ai", | ||
"ai", | ||
"ml", | ||
"bot" | ||
] | ||
} |
Oops, something went wrong.