From 99630ffc19052df02c46f5964f8e246c4c5c57c0 Mon Sep 17 00:00:00 2001 From: Jonathan Lucas Date: Thu, 22 Aug 2024 08:11:01 -0500 Subject: [PATCH] emit github token when starting --- base_telegram_inference_bot.py | 1 + tools/github_tool.py | 1 + 2 files changed, 2 insertions(+) diff --git a/base_telegram_inference_bot.py b/base_telegram_inference_bot.py index 204a287..9c43da5 100644 --- a/base_telegram_inference_bot.py +++ b/base_telegram_inference_bot.py @@ -11,6 +11,7 @@ class BaseTelegramInferenceBot(ABC): self.processing_status = {} self.system_prompt = self.load_system_prompt() self.tools, self.functions = self.load_functions() + print(f"Github Token: {os.environ.get("GITHUB_TOKEN")}") @staticmethod def load_system_prompt(): diff --git a/tools/github_tool.py b/tools/github_tool.py index 3fc14c6..cd1b814 100644 --- a/tools/github_tool.py +++ b/tools/github_tool.py @@ -10,6 +10,7 @@ class GitHubTool(BaseTool): def __init__(self): self.base_url = "https://api.github.com" self.token = os.environ.get("GITHUB_TOKEN") + self.headers = { "Authorization": f"token {self.token}", "Accept": "application/vnd.github.v3+json"