feat: dify chatbot

This commit is contained in:
Alter-xyz 2024-05-17 23:14:36 -04:00
parent 4875082433
commit ae8031bb2b
2 changed files with 8 additions and 1 deletions

View File

@ -61,6 +61,13 @@ Note, if you are using third party service, you need to `export OPENAI_API_BASE=
2. export TOGETHER_API_KEY=${the_key}
3. use `qwen_pro: ${message}` to ask
## Bot -> dify
1. visit https://cloud.dify.ai/ get selected Chatbot's API Secret key
2. export DIFY_API_KEY=${the_key}
3. use `dify: ${message}` to ask
Note, currently its support dify Chatbot with instructions(System prompt) and different MODEL with its parameters.
## HOW TO Install and Run

View File

@ -23,7 +23,7 @@ if DIFY_API_KEY:
# Global history cache
dify_player_dict = {}
dify_player_c = {}
dify_player_c = {} # History cache is supported by dify cloud conversation_id.
def dify_handler(message: Message, bot: TeleBot) -> None: