Added Bing's Chatbot, extended API and example, updated README
This commit is contained in:
parent
308bf0730f
commit
c8361abe28
4 changed files with 110 additions and 17 deletions
|
@ -40,6 +40,9 @@ class Message:
|
|||
'''Convert to API format'''
|
||||
return {"role": self.role, "content": self.text}
|
||||
|
||||
def __str__(self):
|
||||
return f"Role: {self.role}, Text: {self.text}"
|
||||
|
||||
|
||||
class ChatGPT:
|
||||
'''ChatGPT API'''
|
||||
|
|
Reference in a new issue