File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 99class ChatGPT :
1010 def __init__ (self ):
1111 self .prompt = Prompt ()
12- self .model = os .getenv ("OPENAI_MODEL" , default = "text-davinci-003" )
13- self .temperature = float (os .getenv ("OPENAI_TEMPERATURE" , default = 0 ))
14- self .frequency_penalty = float (os .getenv ("OPENAI_FREQUENCY_PENALTY" , default = 0 ))
15- self .presence_penalty = float (os .getenv ("OPENAI_PRESENCE_PENALTY" , default = 0.6 ))
16- self .max_tokens = int (os .getenv ("OPENAI_MAX_TOKENS" , default = 240 ))
12+ self .model = os .getenv ("OPENAI_MODEL" , default = "text-davinci-003" )
13+ self .temperature = float (os .getenv ("OPENAI_TEMPERATURE" , default = 0 ))
14+ self .frequency_penalty = float (os .getenv ("OPENAI_FREQUENCY_PENALTY" , default = 0 ))
15+ self .presence_penalty = float (os .getenv ("OPENAI_PRESENCE_PENALTY" , default = 0.6 ))
16+ self .max_tokens = int (os .getenv ("OPENAI_MAX_TOKENS" , default = 240 ))
1717
1818 def get_response (self ):
1919 response = openai .Completion .create (
Original file line number Diff line number Diff line change 88
99line_bot_api = LineBotApi (os .getenv ("LINE_CHANNEL_ACCESS_TOKEN" ))
1010line_handler = WebhookHandler (os .getenv ("LINE_CHANNEL_SECRET" ))
11- working_status = os .getenv ("DEFALUT_TALKING" , default = "true" ).lower () == "true"
11+ working_status = os .getenv ("DEFALUT_TALKING" , default = "true" ).lower () == "true"
1212
1313app = Flask (__name__ )
1414chatgpt = ChatGPT ()
You can’t perform that action at this time.
0 commit comments