A Selenium-based Python module that automates interactions with the DeepSeek Chat web interface.
- Python 3.7+
- Microsoft Edge browser
NOTE: Selenium uses The Default profile of Microsoft Edge, which is located at "$Env:LOCALAPPDATA\Microsoft\Edge\User Data\Default" on Windows 11.
Install the required dependencies
pip install -r requirements.txtRun the built-in test
python deepseek_chatbot.pyNOTE: During the first run, you may need to manually log in to DeepSeek inside the broswer opened by Selenium.
Import deepseek_chatbot module to your script
from deepseek_chatbot import DeepSeekChatBotStart a new chatting session
bot = DeepSeekChatBot(session_to_attach=None)or provide a session name to continue an existing chat
# it's also acceptable to only provide the beginning of the session name
bot = DeepSeekChatBot(session_to_attach="Some existing session")Send a prompt
# the response will be in markdown format
response = bot.send_prompt("Hello, how are you?")
print(response)Finish chatting
bot.close()