Introduction¶
When developing agents in DeepSeek Harness (DSH), if you need to integrate Bazi chart generation or Chinese almanac lookup functionality, you can directly use community-provided plugins. The xby-bazi plugin handles the related calculation logic, allowing developers to call its APIs in conversations or scripts to retrieve data.
Plugin Overview¶
This is a model inference plugin maintained by xby-skill. xby-bazi is an AI-based Bazi calculator designed to provide accurate Bazi chart data for personality analysis and fate prediction.
Installation and Activation¶
Install the plugin using DSH’s command-line tool:
dsh plugin --profile web add github:xby_skill/xby-bazi
After installation, the plugin becomes effective in the specified profile (such as web).
Core Functions¶
The plugin provides the following four core capabilities:
-
set_xby_apikey
Sets the API key in chat. This operation supports automatic persistence, so the key remains valid after a process restart. -
getBaziDetail
Retrieves Bazi information based on gender and time.- Parameters: You must provide either
solarDatetime(Gregorian time) orlunarDatetime(lunar time); the two are mutually exclusive, and only one can be passed. Gender must also be provided. - Returns: Bazi chart data.
- Parameters: You must provide either
-
getSolarTimes
Retrieves the list of corresponding Gregorian times based on a Bazi chart.- Return format:
YYYY-MM-DD hh:mm:ss. Example:1998-07-31 14:00:00.
- Return format:
-
getChineseCalendar
Retrieves Chinese almanac information for a specified Gregorian time. If no time parameter is provided, it defaults to retrieving today’s almanac information.
Prerequisites¶
Before calling the above functions, complete the following configuration:
- Register an account on the Xiaobenyang official website.
- Obtain an API key.
- Use the
set_xby_apikeycommand to set the key in the current session.
Notes¶
- When using
getBaziDetail, pay attention to parameter validation and ensure that only one ofsolarDatetimeorlunarDatetimeis passed. - This plugin is licensed under the MIT License.