Node-chatgpt-api

Latest version: v1.0.1

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

1.26.0

Features

- Add proxy option and 'Generate title' request by hyperzlib in https://github.com/waylaidwanderer/node-chatgpt-api/pull/146
- Updated readme and example settings
- Set default model to `gpt-3.5-turbo`
- Optimized token counting algorithm
- Fixed various issues with `gpt-3.5-turbo` jailbreak (prompt prefix, end token, tokenizer, and faux tokens)

New Contributors
* hyperzlib made their first contribution in https://github.com/waylaidwanderer/node-chatgpt-api/pull/146

**Full Changelog**: https://github.com/waylaidwanderer/node-chatgpt-api/compare/v1.25.0...v1.26.0

1.25.0

Features
- client(gpt-3.5-turbo): overhauled logic for building the messages payload, which seems more reliable, especially for keeping the AI in character. It also seems to improve coherency and context retention.
- Note: if you started to use `messagesPrefix` introduced in 1.24.0, well, I yeeted it due to the above. Just put your stuff in `promptPrefix` as usual.

Other
* build(deps): bump fastify from 4.13.0 to 4.14.0 by dependabot in https://github.com/waylaidwanderer/node-chatgpt-api/pull/151
* build(deps): bump boxen from 7.0.1 to 7.0.2 by dependabot in https://github.com/waylaidwanderer/node-chatgpt-api/pull/150


**Full Changelog**: https://github.com/waylaidwanderer/node-chatgpt-api/compare/v1.23.0...v1.25.0

1.23.0

Features
- BingAIClient: support choosing a conversation style by likev in https://github.com/waylaidwanderer/node-chatgpt-api/pull/141

Patches
- 1.22.5
- fix(client): make use of the name property for messages

**Full Changelog**: https://github.com/waylaidwanderer/node-chatgpt-api/compare/v1.22.0...v1.23.0

1.22.0

Features
- official ChatGPT API support by waylaidwanderer in https://github.com/waylaidwanderer/node-chatgpt-api/pull/137
- to use it, set `modelOptions.model` to `gpt-3.5-turbo`, and `ChatGPTClient` will handle the rest
- you can still set `userLabel`, `chatGptLabel` and `promptPrefix` (system instructions) as usual

Patches
- 1.21.3
- fix(client): automatically set maxPromptTokens based on maxContextTokens and maxResponseTokens
- 1.21.2
- fix(bing): update message options to match payload on website
- feat: implement ability to abort request in clients
- 1.21.1
- docs(readme): add link to web client
- docs(readme): minor tweaks Joel

**Full Changelog**: https://github.com/waylaidwanderer/node-chatgpt-api/compare/v1.21.0...v1.22.0

1.21.0

Fixes
**BREAKING CHANGES**:
- api: JSON-encode tokens when streaming to retain characters such as newlines properly

Non-breaking:
- client/browser-client: Don't attempt to parse ping events
- client: Set headers timeout to 3 minutes
- browser-client: Ignore any messages not from assistant role
- browser-client: Handle non-existent conversation IDs when fetching cache
- browser-client: Handle null lastEvent on close, fixes 98, 99
- api: Use setTimeout instead of nextTick to avoid ERR_STREAM_WRITE_AFTER_END
- api: Use my sse fork to avoid sending unnecessary retryAfter event
- api: Don't send [DONE] twice
- bing: Handle invalid session error, fixes 90

Misc.
- cli: Explicitly set bin files to LF, fixes 51
- docs: Reformat example settings a little bit
- docs: Replace examples already in demos folder with link
- docs: Add clarification on how maxPromptTokens works

New Contributors
* ryanwy made their first contribution in https://github.com/waylaidwanderer/node-chatgpt-api/pull/100
* gengjiawen made their first contribution in https://github.com/waylaidwanderer/node-chatgpt-api/pull/117

**Full Changelog**: https://github.com/waylaidwanderer/node-chatgpt-api/compare/v1.20.0...v1.21.0

1.20.0

Features
- **ChatGPTClient**: add the ability to limit token usage

Fixes
- **ChatGPTClient**: add raw response under details property

**Full Changelog**: https://github.com/waylaidwanderer/node-chatgpt-api/compare/v1.19.0...v1.20.0

Page 2 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.