agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.

MIT License

Downloads
28K
Stars
16.3K
Committers
136

Bot releases are hidden (Show)

agentic - Switch to official chat completions API ๐Ÿ”ฅ

Published by transitive-bullshit over 1 year ago

The official OpenAI chat completions API has been released, and it is now the default for this package! ๐Ÿ”ฅ

Method Free? Robust? Quality?
ChatGPTAPI โŒ No โœ… Yes โœ…๏ธ Real ChatGPT models
ChatGPTUnofficialProxyAPI โœ… Yes โ˜‘๏ธ Maybe โœ… Real ChatGPT

Note: We strongly recommend using ChatGPTAPI since it uses the officially supported API from OpenAI. We may remove support for ChatGPTUnofficialProxyAPI in a future release.

  1. ChatGPTAPI - Uses the gpt-3.5-turbo-0301 model with the official OpenAI chat completions API (official, robust approach, but it's not free)
  2. ChatGPTUnofficialProxyAPI - Uses an unofficial proxy server to access ChatGPT's backend API in a way that circumvents Cloudflare (uses the real ChatGPT and is pretty lightweight, but relies on a third-party server and is rate-limited)
  • ๐ŸŸ 5c6a027
  • ๐Ÿšˆ 6577209
  • ๐Ÿ”ซ 1b326db
  • Merge pull request #412 from transitive-bullshit/feature/official-chat-completions-api 47b615d
  • ๐Ÿฆ‹ 067a758
  • ๐Ÿ› fc429ec
  • fix: bugfix 8ea449f
  • feat: add support for official OpenAI chat completions API 271ed9d

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.3...v5.0.0

agentic - Fix ChatGPTAPI tokenizer bug

Published by transitive-bullshit over 1 year ago

  • ๐ŸŒ‘ 8e26eb4
  • fix: tokenizer special tokens e3ee727

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.2...v4.8.3

agentic - Update tiktoken dep

Published by transitive-bullshit over 1 year ago

  • ๐Ÿ˜ณ a6d3c1c
  • Merge pull request #403 from NoodleOfDeath/main 942f414
  • fix: update tiktoken dep 1bc24d2

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.1...v4.8.2

agentic - Add conversationId / parentMessageId validity checking

Published by transitive-bullshit over 1 year ago

  • feat: check for invalid conversationId and parentMessageId 539aa6d

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.8.0...v4.8.1

agentic - Switch tokenizers; Add Node.js access token generation; Minor fixes

Published by transitive-bullshit over 1 year ago

  • โš’ f2a66f8
  • Merge pull request #387 from gencay/patch-1 16b29b6
  • Merge pull request #397 from dannysantino/whatsapp-bot 7212916
  • Merge pull request #391 from tehfonsi/main 202b041
  • Update readme.md be8a89d
  • ๐Ÿค› d706918
  • ๐Ÿ e6784d6
  • Merge pull request #393 from AllanOricil/update-readme 920344f
  • Merge pull request #390 from transitive-bullshit/feature/rust-wasm-tokenizer aaa482b
  • Merge pull request #398 from acheong08/patch-1 a5d891a
  • Rate limit increased 0409ecd
  • docs: add new whatsapp chatbot to README.md 77484e0
  • Merge pull request #396 from IsiteYves/fixing-typos edd364e
  • Update readme.md 5be8159
  • Fix typo in README.md 0d8dea1
  • add node js lib in the Access Token section 4f33703
  • docs: add ai poem generator to projects 0eeab41
  • Write the underlying exception details to streamed response a3e05c2
  • feat: switch to rust wasm port of tiktoken tokenizer a51ecdb
  • docs: tweak wording 1fdf218
  • ๐Ÿฒ 6abb431

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.7.2...v4.8.0

agentic - Fix ChatGPTUnofficialProxyAPI enable custom fetch

Published by transitive-bullshit over 1 year ago

  • Merge pull request #372 from fjc0k/main 8943cd3
  • Merge pull request #373 from billylo1/main 96c2afe
  • Update readme.md e346e85
  • Merge pull request #1 from billylo1/billylo1-patch-1 dd25790
  • add DomainGPT as an interesting use case for chatgpt-api 52a5abc
  • fix(ChatGPTUnofficialProxyAPI): pass fetch f0ce925
  • ๐Ÿœ 70e4797
  • โšฐ efa1ed8

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.7.1...v4.7.2

agentic - Bug fix for CLI

Published by transitive-bullshit over 1 year ago

agentic - Add chatgpt CLI ๐Ÿ”ฅ

Published by transitive-bullshit over 1 year ago

This release adds CLI functionality to chatgpt โ€“ย Huge props to @zeke for the great idea and initial PR ๐Ÿ”ฅ

To run the CLI, you'll need an OpenAI API key:

export OPENAI_API_KEY="sk-TODO"
npx chatgpt "your prompt here"

By default, the response is streamed to stdout, the results are stored in a local config file, and every invocation starts a new conversation. You can use -c to continue the previous conversation and --no-stream to disable streaming.

Under the hood, the CLI uses ChatGPTAPI with text-davinci-003 to mimic ChatGPT.

Usage:
  $ chatgpt <prompt>

Commands:
  <prompt>  Ask ChatGPT a question
  rm-cache  Clears the local message cache
  ls-cache  Prints the local message cache path

For more info, run any command with the `--help` flag:
  $ chatgpt --help
  $ chatgpt rm-cache --help
  $ chatgpt ls-cache --help

Options:
  -c, --continue          Continue last conversation (default: false)
  -d, --debug             Enables debug logging (default: false)
  -s, --stream            Streams the response (default: true)
  -s, --store             Enables the local message cache (default: true)
  -t, --timeout           Timeout in milliseconds
  -k, --apiKey            OpenAI API key
  -n, --conversationName  Unique name for the conversation
  -h, --help              Display this message
  -v, --version           Display version number

  • chore: update ts docs 42d163b
  • ๐Ÿฅ’ 607fccf
  • ๐Ÿ”ป df0d6ef
  • ๐Ÿ› 535d220
  • ๐ŸŒฟ 7c3a894
  • feat: improve CLI and add to readme d9c307c
  • fix: fix cli build => ts 1224e0c
  • Merge pull request #363 from zeke/add-cli 5f7609c by @zeke ๐Ÿ”ฅ
  • Merge pull request #359 from linjungz/main b1f10a6
  • add a CLI 30f3abd
  • Update readme.md 2b1fafa

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.6.0...v4.7.0

agentic - Replace gpt-3-encoder with gpt3-tokenizer

Published by transitive-bullshit over 1 year ago

There should be no public changes with this release. It's just changing internals for hopefully better compatibility.

  • feat: switch from gpt-3-encoder to gpt3-tokenizer d8eeb1a
  • ๐Ÿšธ fc9869a
  • ๐Ÿšฌ 2460e5a
  • ๐Ÿ’ 218bdf8
  • ๐Ÿ‘ค bc3a6ac

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.5.1...v4.6.0

agentic - Update auto-gen docs

Published by transitive-bullshit over 1 year ago

  • chore: update ts docs 3193229
  • ๐Ÿ”ˆ 6cf60ee

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.5.0...v4.5.1

agentic - Add ChatGPTUnofficialProxyAPI to use the real ChatGPT again ๐Ÿ’ช

Published by transitive-bullshit over 1 year ago

We now provide three ways of accessing the unofficial ChatGPT API, all of which have tradeoffs:

Method Free? Robust? Quality?
ChatGPTAPI โŒ No โœ… Yes โ˜‘๏ธ Mimics ChatGPT
ChatGPTUnofficialProxyAPI โœ… Yes โ˜‘๏ธ Maybe โœ… Real ChatGPT
ChatGPAPIBrowser (v3) โœ… Yes โŒ No โœ… Real ChatGPT

Note: I recommend that you use either ChatGPTAPI or ChatGPTUnofficialProxyAPI.

  1. ChatGPTAPI - Uses text-davinci-003 to mimic ChatGPT via the official OpenAI completions API (most robust approach, but it's not free and doesn't use a model fine-tuned for chat)
  2. ChatGPTUnofficialProxyAPI - Uses an unofficial proxy server to access ChatGPT's backend API in a way that circumvents Cloudflare (uses the real ChatGPT and is pretty lightweight, but relies on a third-party server and is rate-limited)
  3. ChatGPTAPIBrowser - (v3.5.1 of this package) Uses Puppeteer to access the official ChatGPT webapp (uses the real ChatGPT, but very flaky, heavyweight, and error prone)

  • Merge pull request #364 from transitive-bullshit/feature/unofficial-proxy-api ef0e341
  • ๐Ÿ 28ae98d
  • ๐Ÿš 6110f23
  • ๐Ÿค› e1ad9ea
  • ๐Ÿ”‘ 29ac584
  • ๐Ÿ˜ฐ c5c1937
  • ๐Ÿ›’ a5272b7
  • ๐Ÿ—ก b925587
  • ๐Ÿ’ž ac53265
  • ๐Ÿ“˜ 26c48d1
  • feat: add ChatGPTUnofficialProxyAPI 6d81552
  • Merge pull request #354 from waynejohny/patch-1 f2f2096
  • Update readme.md 60c43c1

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.4.1...v4.5.0

agentic - Remove extra console messages

Published by transitive-bullshit over 1 year ago

  • Merge pull request #346 from hvqzao/main 7f530fd
  • Log to console only in debug mode 6f17b59
  • chore: update ts docs a6105f5

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.4.0...v4.4.1

agentic - Add ability to override global fetch

Published by transitive-bullshit over 1 year ago

  • feat: add ability to override global "fetch" 1bffd5e

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.3.3...v4.4.0

agentic - Remove reverse proxy URL from demo

Published by transitive-bullshit over 1 year ago

  • feat: remove reverse proxy URL from demo d621fb7
  • ๐Ÿ“ฃ 8af7e83

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.3.2...v4.3.3

agentic - Improve apiReverseProxyUrl error message detail

Published by transitive-bullshit over 1 year ago

  • ๐ŸŽŸ d0fba02
  • Merge pull request #328 from hujanais/main 57ecbb3
  • added WhatsApp Bot #5 (RaspberryPi + ngrok + Twilio) 539011e

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.3.1...v4.3.2

agentic - Add support for apiReverseProxyUrl

Published by transitive-bullshit over 1 year ago

agentic - Switch back to text-davinci-003 after OpenAI disabled the previous model

Published by transitive-bullshit over 1 year ago

agentic - Add fix for fetchSSE promise rejection

Published by transitive-bullshit over 1 year ago

  • fix: add catch for fetchSSE promise rejection 78bd4ff

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.1.2...v4.1.3

agentic - Minor fixes and doc updates

Published by transitive-bullshit over 1 year ago

  • chore: update ts docs ed59af3
  • Merge pull request #307 from mvtavares/add_isomorphic_fetch_readme aefae23
  • Merge pull request #306 from pacholoamit/readme 88a7e22
  • Update readme.md e8748fe
  • Merge pull request #305 from MarkusGalant/patch-1 34abda1
  • Merge pull request #299 from Cadienvan/patch-1 7c8bc53
  • chore: including isomorphic-fetch 1aaf4d3
  • Add project to readme 727b46a
  • Add Slack Bot #4 project to readme.md 6167365
  • Merge pull request #301 from sebas00/sebas00-patch-1 ba0970d
  • Update readme.md 2e9f3c2
  • Add clippyJS bot to readme 8287ffa
  • chore: fixing param stop being array instead of string 47e26cc
  • chore: moving from im_end to completion params 329e076
  • Merge pull request #293 from NessunKim/patch-1 d8072bb
  • docs: add NessunKim/slack-chatgpt to README 41eeeb5

https://github.com/transitive-bullshit/chatgpt-api/compare/v4.1.1...v4.1.2

agentic - Update to official chatgpt model from 2022

Published by transitive-bullshit over 1 year ago

Package Rankings
Top 16.33% on Npmjs.org
Related Projects