Skip to content

Commit

Permalink
formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
howarder3 committed Dec 14, 2022
1 parent eb54e51 commit 858b7e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions api/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
class ChatGPT:
def __init__(self):
self.prompt = Prompt()
self.model = os.getenv("OPENAI_MODEL", default="text-davinci-003")
self.temperature = float(os.getenv("OPENAI_TEMPERATURE", default=0))
self.frequency_penalty = float(os.getenv("OPENAI_FREQUENCY_PENALTY", default=0))
self.presence_penalty = float(os.getenv("OPENAI_PRESENCE_PENALTY", default=0.6))
self.max_tokens = int(os.getenv("OPENAI_MAX_TOKENS", default=240))
self.model = os.getenv("OPENAI_MODEL", default = "text-davinci-003")
self.temperature = float(os.getenv("OPENAI_TEMPERATURE", default = 0))
self.frequency_penalty = float(os.getenv("OPENAI_FREQUENCY_PENALTY", default = 0))
self.presence_penalty = float(os.getenv("OPENAI_PRESENCE_PENALTY", default = 0.6))
self.max_tokens = int(os.getenv("OPENAI_MAX_TOKENS", default = 240))

def get_response(self):
response = openai.Completion.create(
Expand Down
2 changes: 1 addition & 1 deletion api/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

line_bot_api = LineBotApi(os.getenv("LINE_CHANNEL_ACCESS_TOKEN"))
line_handler = WebhookHandler(os.getenv("LINE_CHANNEL_SECRET"))
working_status = os.getenv("DEFALUT_TALKING", default="true").lower() == "true"
working_status = os.getenv("DEFALUT_TALKING", default = "true").lower() == "true"

app = Flask(__name__)
chatgpt = ChatGPT()
Expand Down

1 comment on commit 858b7e2

@vercel
Copy link

@vercel vercel bot commented on 858b7e2 Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.