chatgpt-official
Advanced tools
Comparing version
@@ -18,3 +18,3 @@ import { encode } from "gpt-3-encoder"; | ||
max_tokens: options?.max_tokens || 512, | ||
top_p: options?.top_p || 0.1, | ||
top_p: options?.top_p || 0.9, | ||
frequency_penalty: options?.frequency_penalty || 0, | ||
@@ -95,3 +95,3 @@ presence_penalty: options?.presence_penalty || 0, | ||
let responseStr; | ||
if (this.options.revProxy !== null) { | ||
if (!this.options.revProxy) { | ||
const response = await this.openAi.createCompletion({ | ||
@@ -135,3 +135,3 @@ model: this.options.model, | ||
let responseStr = ""; | ||
if (this.options.revProxy !== null) { | ||
if (!this.options.revProxy) { | ||
const response = await this.openAi.createCompletion({ | ||
@@ -138,0 +138,0 @@ model: this.options.model, |
{ | ||
"name": "chatgpt-official", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "ChatGPT Client using official OpenAI API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -22,3 +22,3 @@ import { encode } from "gpt-3-encoder"; | ||
max_tokens: options?.max_tokens || 512, | ||
top_p: options?.top_p || 0.1, | ||
top_p: options?.top_p || 0.9, | ||
frequency_penalty: options?.frequency_penalty || 0, | ||
@@ -111,3 +111,3 @@ presence_penalty: options?.presence_penalty || 0, | ||
let responseStr: string; | ||
if (this.options.revProxy) { | ||
if (!this.options.revProxy) { | ||
const response = await this.openAi.createCompletion({ | ||
@@ -155,3 +155,3 @@ model: this.options.model, | ||
let responseStr: string = ""; | ||
if (this.options.revProxy) { | ||
if (!this.options.revProxy) { | ||
const response = await this.openAi.createCompletion( | ||
@@ -158,0 +158,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70970
-0.01%