Tencent Yuanbao Automated Access API Service Based on Selenium

Used to use Python scripts to control the input, upload, and send operations of Tencent AI Yuanbao web pages, detect the output of Yuanbao AI and return it to json, to create an AI API interface driven by Tencent Yuanbao

TxYuanbao-To-PyAPI is based on Python + Selenium + Flask is mainly used to automatically control and invoke the functions of [Tencent AI “Yuanbao”]. Its core role is:

🔧Functions and purposes

  • Simulate browser operations: Use Selenium to automatically log in and control the “Yuanbao” page to achieve a scripted operation process.
  • Expose HTTP interfaces: Create REST APIs with Flask, so you can call these interfaces locally or remotely to access the “ingot” feature without having to manually open a browser page.
  • Python Script Integration: You can easily access the chat, question and answer functions of “Yuanbao” through Python code for automated testing, batch dialogue and other scenarios.

Applicable scenarios

  • automated testing: Automate verification that the “Yuanbao” response meets expectations.
  • batch dialogue: Convenient for large-scale user dialogue simulation or data collection.
  • native integration: Embed the “ingot” function into your own scripts/services and use it as a back-end component.

Overview of technical structure

moduleuse
SeleniumAutomatically open the browser, log in to “Yuanbao” and complete the conversation
FlaskBuild an API interface to encapsulate operations into callable HTTP methods
Python scriptThese interfaces can be called as clients to implement business logic

Recommended reading source code logic

It is recommended that you view the following files or directories for your project:

  • app.py or main.py: Entry to the Flask API, defining routing, upload parameters, etc.
  • Selenium Operation Part: Responsible for simulating browser behavior (opening pages, logging in, filling in inputs, grabbing output).
  • README: Usually contains the project launch method, dependency description, and example calling methods.

summary: This is a “browser driver + API encapsulation” tool that allows you to remotely call Tencent “Yuanbao” through Python scripts. It is suitable for automated testing, integrated development, batch dialogue and other scenarios. If you want, I can also help you further analyze the code structure or guide you on how to run it

Github:https://github.com/TW-SkyHope/TxYuanbao-To-PyAPI
Oil tubing:

Scroll to Top