mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-04-29 08:37:09 +08:00
feat: dify chatbot
This commit is contained in:
parent
4875082433
commit
ae8031bb2b
@ -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}
|
2. export TOGETHER_API_KEY=${the_key}
|
||||||
3. use `qwen_pro: ${message}` to ask
|
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
|
## HOW TO Install and Run
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ if DIFY_API_KEY:
|
|||||||
|
|
||||||
# Global history cache
|
# Global history cache
|
||||||
dify_player_dict = {}
|
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:
|
def dify_handler(message: Message, bot: TeleBot) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user