mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-07-06 14:56:43 +08:00
feat: Default skip telegraph account
It will print out the token in local terminal by default. If Store_Token = True, it will store token in "token_key.json" View my lite ver and try at <https://github.com/alterxyz/tg_bot_collections_lite>
This commit is contained in:
@ -17,19 +17,12 @@ markdown_symbol.link = "🔗" # If you want, Customizing the link symbol
|
||||
|
||||
COHERE_API_KEY = environ.get("COHERE_API_KEY")
|
||||
COHERE_MODEL = "command-r-plus"
|
||||
|
||||
TELEGRA_PH_TOKEN = environ.get("TELEGRA_PH_TOKEN")
|
||||
if TELEGRA_PH_TOKEN:
|
||||
ph = TelegraphAPI(TELEGRA_PH_TOKEN)
|
||||
else:
|
||||
TELEGRA_PH_TOKEN = create_ph_account(
|
||||
short_name="cohere", author_name="A Telegram Bot"
|
||||
)
|
||||
ph = TelegraphAPI(TELEGRA_PH_TOKEN)
|
||||
|
||||
if COHERE_API_KEY:
|
||||
co = cohere.Client(api_key=COHERE_API_KEY)
|
||||
|
||||
TELEGRA_PH_TOKEN = environ.get("TELEGRA_PH_TOKEN")
|
||||
ph = TelegraphAPI(TELEGRA_PH_TOKEN)
|
||||
|
||||
# Global history cache
|
||||
cohere_player_dict = ExpiringDict(max_len=1000, max_age_seconds=300)
|
||||
|
||||
|
Reference in New Issue
Block a user