Merge pull request #628 from hpsj/main

Parameter addition uuid
This commit is contained in:
xtekky 2023-06-04 00:27:45 +02:00 committed by GitHub
commit 13e79dfc02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@
@IDE PyCharm
"""
import json
import uuid
import random
import binascii
import requests
@ -30,7 +31,8 @@ class ChatCompletion:
"presence_penalty": 0,
"temperature": 1,
"top_p": 1,
"stream": True
"stream": True,
"uuid": str(uuid.uuid4())
})
signature = ChatCompletion.encrypt(data)
res = requests.post(url, headers=headers, data=json.dumps({"signature": signature}), proxies=proxies,stream=True)