mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 13:47:15 +08:00
feat: chatGPT bot
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,5 @@
|
||||
# encoding:utf-8
|
||||
|
||||
import json
|
||||
import requests
|
||||
from bot.bot import Bot
|
||||
|
||||
@@ -17,8 +16,8 @@ class BaiduUnitBot(Bot):
|
||||
return response.json()['result']['context']['SYS_PRESUMED_HIST'][1]
|
||||
|
||||
def get_token(self):
|
||||
access_key = '${YOUR_ACCESS_KEY}'
|
||||
secret_key = '${YOUR_SECRET_KEY}'
|
||||
access_key = 'wdNwpvzh4fBr8xzTuPePOWhU'
|
||||
secret_key = 'EUtLXyrogfTQV8nnjncnqNEfeyoHDUqS'
|
||||
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=' + access_key + '&client_secret=' + secret_key
|
||||
response = requests.get(host)
|
||||
if response:
|
||||
|
||||
Reference in New Issue
Block a user