@waylaidwanderer/chatgpt-api
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
{ | ||
"name": "@waylaidwanderer/chatgpt-api", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "A ChatGPT implementation using the official ChatGPT model via OpenAI's API.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,6 +7,8 @@ <p align="center"> | ||
Trying to use `text-chat-davinci-002-20230126` with the OpenAI API now returns a 404 error. Someone has already found the new model name, but they are unwilling to share at this time. I will update this repository once I find the new model. If you have any leads, please open an issue or a pull request. | ||
~~Trying to use `text-chat-davinci-002-20230126` with the OpenAI API now returns a 404 error. Someone has already found the new model name, but they are unwilling to share at this time. I will update this repository once I find the new model. If you have any leads, please open an issue or a pull request.~~ | ||
In the meantime, I've added support for models like `text-davinci-003`, which you can use as a drop-in replacement. Keep in mind that `text-davinci-003` is not as good as `text-chat-davinci-002-20230126` (which is trained with via RHLF and fine-tuned to be a conversational AI), though results are still very good. Additionally, `text-davinci-003` costs credits. | ||
~~In the meantime, I've added support for models like `text-davinci-003`, which you can use as a drop-in replacement. Keep in mind that `text-davinci-003` is not as good as `text-chat-davinci-002` (which is trained via RHLF and fine-tuned to be a conversational AI), though results are still very good. **Please note that using `text-davinci-003` will cost you credits ($).**~~ | ||
Discord user @pig#8932 has found a working `text-chat-davinci-002` model, `text-chat-davinci-002-20221122`. I've updated the library to use this model. | ||
# ChatGPT API | ||
@@ -21,3 +23,3 @@ | ||
This is an implementation of [ChatGPT](https://chat.openai.com/chat) using the official ChatGPT raw model, `text-chat-davinci-002-20230126`. This model name was briefly leaked while I was inspecting the network requests made by the official ChatGPT website, and I discovered that it works with the [OpenAI API](https://beta.openai.com/docs/api-reference/completions). **Usage of this model currently does not cost any credits.** | ||
This is an implementation of [ChatGPT](https://chat.openai.com/chat) using the official ChatGPT raw model, `text-chat-davinci-002`. This model name `text-chat-davinci-002-20230126` was briefly leaked while I was inspecting the network requests made by the official ChatGPT website, and I discovered that it works with the [OpenAI API](https://beta.openai.com/docs/api-reference/completions). **Usage of this model currently does not cost any credits.** | ||
@@ -31,3 +33,3 @@ As far as I'm aware, I was the first one who discovered this, and usage of the model has since been implemented in libraries like [acheong08/ChatGPT](https://github.com/acheong08/ChatGPT). | ||
## Features | ||
- Uses the official ChatGPT raw model, `text-chat-davinci-002-20230126`. | ||
- Uses the official ChatGPT raw model, `text-chat-davinci-002-20221122`. | ||
- Includes an API server you can run to use ChatGPT in non-Node.js applications. | ||
@@ -63,5 +65,5 @@ - Includes a `ChatGPTClient` class that you can use in your own Node.js applications. | ||
modelOptions: { | ||
// The model is set to text-chat-davinci-002-20230126 by default, but you can override | ||
// The model is set to text-chat-davinci-002-20221122 by default, but you can override | ||
// it and any other parameters here | ||
model: 'text-chat-davinci-002-20230126', | ||
model: 'text-chat-davinci-002-20221122', | ||
}, | ||
@@ -112,5 +114,5 @@ // (Optional) Set a custom prompt prefix. As per my testing it should work with two newlines | ||
modelOptions: { | ||
// The model is set to text-chat-davinci-002-20230126 by default, but you can override | ||
// The model is set to text-chat-davinci-002-20221122 by default, but you can override | ||
// it and any other parameters here | ||
model: 'text-chat-davinci-002-20230126', | ||
model: 'text-chat-davinci-002-20221122', | ||
}, | ||
@@ -185,3 +187,3 @@ // (Optional) Set a custom prompt prefix. As per my testing it should work with two newlines | ||
## Caveats | ||
Since `text-chat-davinci-002-20230126` is ChatGPT's raw model, I had to do my best to replicate the way the official ChatGPT website uses it. After extensive testing and comparing responses, I believe that the model used by ChatGPT has some additional fine-tuning. | ||
Since `text-chat-davinci-002-20221122` is ChatGPT's raw model, I had to do my best to replicate the way the official ChatGPT website uses it. After extensive testing and comparing responses, I believe that the model used by ChatGPT has some additional fine-tuning. | ||
This means my implementation or the raw model may not behave exactly the same in some ways: | ||
@@ -188,0 +190,0 @@ - Conversations are not tied to any user IDs, so if that's important to you, you should implement your own user ID system. |
@@ -7,5 +7,5 @@ export default { | ||
modelOptions: { | ||
// The model is set to text-chat-davinci-002-20230126 by default, but you can override | ||
// The model is set to text-chat-davinci-002-20221122 by default, but you can override | ||
// it and any other parameters here | ||
model: 'text-chat-davinci-002-20230126', | ||
model: 'text-chat-davinci-002-20221122', | ||
}, | ||
@@ -12,0 +12,0 @@ // (Optional) Set a custom prompt prefix. As per my testing it should work with two newlines |
@@ -6,3 +6,3 @@ import fetch from 'node-fetch'; | ||
const CHATGPT_MODEL = 'text-chat-davinci-002-20230126'; | ||
const CHATGPT_MODEL = 'text-chat-davinci-002-20221122'; | ||
@@ -87,2 +87,3 @@ export default class ChatGPTClient { | ||
messages: [], | ||
createdAt: Date.now(), | ||
}; | ||
@@ -89,0 +90,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172089
344
200