Initial Push.
This commit is contained in:
14
home/.local/usr/bin/chatgpt.js
Executable file
14
home/.local/usr/bin/chatgpt.js
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { ChatGPTAPIBrowser } from 'chatgpt'
|
||||
|
||||
async function example() {
|
||||
const api = new ChatGPTAPIBrowser({
|
||||
email: process.env.OPENAI_EMAIL,
|
||||
password: process.env.OPENAI_PASSWORD
|
||||
})
|
||||
|
||||
await api.initSession()
|
||||
const result = await api.sendMessage("Hello World")
|
||||
console.log(result.rseponse)
|
||||
}
|
||||
Reference in New Issue
Block a user