emit github token when starting

This commit is contained in:
2024-08-22 08:11:01 -05:00
parent 37201be1cd
commit 99630ffc19
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@ class BaseTelegramInferenceBot(ABC):
self.processing_status = {} self.processing_status = {}
self.system_prompt = self.load_system_prompt() self.system_prompt = self.load_system_prompt()
self.tools, self.functions = self.load_functions() self.tools, self.functions = self.load_functions()
print(f"Github Token: {os.environ.get("GITHUB_TOKEN")}")
@staticmethod @staticmethod
def load_system_prompt(): def load_system_prompt():
+1
View File
@@ -10,6 +10,7 @@ class GitHubTool(BaseTool):
def __init__(self): def __init__(self):
self.base_url = "https://api.github.com" self.base_url = "https://api.github.com"
self.token = os.environ.get("GITHUB_TOKEN") self.token = os.environ.get("GITHUB_TOKEN")
self.headers = { self.headers = {
"Authorization": f"token {self.token}", "Authorization": f"token {self.token}",
"Accept": "application/vnd.github.v3+json" "Accept": "application/vnd.github.v3+json"