rj1
about | log | files | refs | license
commit e73041e799436062d5167f1a50bb71307f261e74
parent 144cd63944abf2433f3aa6a388d7f809bbb693c9
author: rj1 <[email protected]>
date:   Sun,  5 Feb 2023 03:55:31 -0600

allow inclusion of the "Bearer " prefix in the auth_token config setting

Diffstat:
Mchatgpt-irc.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/chatgpt-irc.py b/chatgpt-irc.py @@ -45,6 +45,9 @@ class ChatGPT: payload = json.dumps(payload) + if self.auth_token.startswith("Bearer "): + self.auth_token = self.auth_token[7:] + headers = { "Authorization": f"Bearer {self.auth_token}", "Content-Type": "application/json",