Reformat and remove unused import
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import bardapi
|
import bardapi
|
||||||
import requests
|
|
||||||
|
|
||||||
class BardAssistant:
|
class BardAssistant:
|
||||||
def __init__(self, conf: dict) -> None:
|
def __init__(self, conf: dict) -> None:
|
||||||
self._token = conf["token"]
|
self._token = conf["token"]
|
||||||
self._bard = bardapi.core.Bard(self._token)
|
self._bard = bardapi.core.Bard(self._token)
|
||||||
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'BardAssistant'
|
return 'BardAssistant'
|
||||||
|
|
||||||
@@ -22,6 +22,7 @@ class BardAssistant:
|
|||||||
response = self._bard.get_answer(msg)
|
response = self._bard.get_answer(msg)
|
||||||
return response['content']
|
return response['content']
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from configuration import Config
|
from configuration import Config
|
||||||
config = Config().BardAssistant
|
config = Config().BardAssistant
|
||||||
|
|||||||
Reference in New Issue
Block a user