Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bettergpt

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bettergpt - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

5

package.json
{
"name": "bettergpt",
"version": "1.0.3",
"version": "1.0.4",
"scripts": {

@@ -9,3 +9,4 @@ "dev": "nodemon index.ts"

"eventsource-parser": "^1.0.0"
}
},
"keywords": ["openai", "chatgpt", "chat", "gpt", "gpt-3", "gpt3", "gpt-4", "gpt4", "chatbot", "machine learning", "ai", "conversation", "bot"]
}

39

README.md

@@ -10,6 +10,41 @@ # About

# Usage
### Official API
# Example
```js
const { GPT } = require("bettergpt")
async function example() {
let gpt = new GPT('your_api_key');
gpt.useProxy('https://ai.fakeopen.com/api/conversation');
let response = await gpt.sendMessage('hey!');
console.log(response)
}
example()
```
### History
```ts
import GPT, { Message } from './bettergpt';
function example() {
let gpt = new GPT('your_api_key');
gpt.useProxy('https://ai.fakeopen.com/api/conversation');
gpt.addMessage({
role: 'system',
text: `You can only response with JSON format from now, {
message: "your message",
}`,
})
gpt.onProgress = (message: Message) => {
console.log(message.text);
}
let result = await gpt.sendMessage("hey!");
console.log(result);
}
example();
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc