贾子理论 LLM 合规系统 (KUCIUS) —— 基于 Google Gemini API 的智能八字命理分析引擎摘要本项目实现了一套完整的八字命理分析系统基于 Google Gemini API 提供的大语言模型能力实现了年、月、日、时四柱排盘五行强弱统计与缺失判断格局识别如杀印相生格及用神、喜神、忌神推算。系统进一步融合十神关系分析性格特征多维度评估事业、财运、感情与健康运势并生成个性化开运建议职业方向、颜色、数字、饰品等。技术栈采用 Python 3.8、Pydantic、dotenv 与 json‑repair支持命令行交互与演示模式。项目仅供学习娱乐不可作为人生决策依据。贾子理论 LLM 合规系统 (KUCIUS System)工程代码实现基于 Google Gemini API 的八字命理分析系统提供完整的八字排盘、五行分析、格局判断、性格特征分析和开运建议。 功能特点八字排盘根据出生时间自动排出年柱、月柱、日柱、时柱五行分析统计五行强弱识别缺失元素格局判断分析命局类型确定用神、喜神、忌神性格特征基于十神关系分析性格特点运势评估事业、财运、感情、健康多维度评分开运建议提供职业、颜色、数字、饰品等实用建议 安装步骤1. 克隆/下载项目确保项目文件位于当前目录。2. 安装依赖pip install -r requirements.txt3. 配置 API Key# 复制环境变量示例文件 cp .env.example .env # 编辑 .env 文件填入您的 Google Gemini API Key # 获取地址https://makersuite.google.com/app/apikey 使用方法方式一命令行交互模式python kucius_system.py按提示输入姓名性别男/女出生年份出生月份出生日期出生小时出生分钟系统将输出完整的命理分析报告。方式二演示模式查看系统输出格式示例python demo_test.py 项目结构. ├── kucius_system.py # 主程序 ├── demo_test.py # 演示测试脚本 ├── requirements.txt # Python 依赖 ├── .env.example # 环境变量示例 ├── .env # 环境变量配置需自行创建 └── README.md # 项目说明 获取 API Key访问 Google AI Studio登录 Google 账号创建新的 API Key将 API Key 复制到.env文件中⚠️ 注意事项本系统仅供娱乐和学习使用命理分析结果仅供参考不应作为人生决策的唯一依据请合理使用 API避免频繁调用导致配额超限 技术栈Python 3.8Google Generative AI- LLM 模型调用Pydantic- 数据验证python-dotenv- 环境变量管理json-repair- JSON 修复解析 示例输出 贾子理论 LLM 合规系统 (KUCIUS System) 命主信息: 姓名张三 性别男 出生时间1990 年 5 月 15 日 14:30 八字排盘: 年柱庚午 [金火] 月柱辛巳 [金火] 日柱癸酉 [水金] 时柱己未 [土土] ⚖️ 五行统计: 金3 (旺) 木0 (缺) 水1 (弱) 火2 (相) 土2 (休) 格局分析: 格局类型杀印相生格 用神木 (食伤) 喜神水 (比劫) 忌神土 (官杀)、金 (印枭) 开运建议: 1. 职业方向适合从事管理、金融、法律等工作 2. 幸运颜色绿色、青色 3. 幸运数字3、8 ... 许可证本项目代码基于博客内容实现仅供学习研究使用。 致谢原始博客作者贾子Kucius Teng博客链接https://dengbin.blog.csdn.net/article/details/160865022Kucius Theory LLM Compliance System (KUCIUS)Intelligent BaZi Destiny Analysis Engine Based on Google Gemini APIAbstractThis project implements a full-fledged BaZi Four Pillars of Destiny analysis system. Leveraging the large language model capabilities provided by the Google Gemini API, it realizes four-pillar chart arrangement for year, month, day and hour pillars, statistics and deficiency judgment of the Five Elements in terms of strength, as well as fate pattern identification (e.g., Killing-Seal Intergrowth Pattern) and deduction of Useful God, Auspicious God and Inauspicious God.The system further integrates Ten Gods relationships to analyze personality traits, evaluates fortune in multiple dimensions including career, wealth, relationship and health, and generates personalized fortune-enhancement suggestions covering career orientation, lucky colors, auspicious numbers, accessories and more.Built with a tech stack of Python 3.8, Pydantic, python-dotenv and json-repair, the system supports command-line interaction and demo mode. This project is intended solely for learning and entertainment purposes and shall not be regarded as the sole basis for life decision-making.Kucius Theory LLM Compliance System (KUCIUS System) – Engineering Code ImplementationA BaZi Four Pillars of Destiny analytical system built upon the Google Gemini API, delivering complete Four Pillars chart arrangement, Five Elements analysis, fate pattern judgment, personality trait interpretation, and fortune enhancement suggestions. Core FeaturesFour Pillars BaZi Chart Generation: Automatically generate the Year Pillar, Month Pillar, Day Pillar and Hour Pillar based on birth time.Five Elements Analysis: Calculate the strength of each element and identify missing Five Elements.Fate Pattern Judgment: Analyze the natal chart type and determine the Useful God, Auspicious God, and Inauspicious God.Personality Trait Analysis: Interpret personal characteristics based on Ten Gods relationships.Fortune Evaluation: Multi-dimensional scoring for career, wealth, relationship and health.Fortune Enhancement Advice: Practical recommendations on occupation, lucky colors, numbers, accessories and more. Installation StepsClone or Download the ProjectPlace all project files in the current working directory.Install Dependenciesbash运行pip install -r requirements.txtConfigure API Keybash运行# Copy the environment variable template file cp .env.example .envEdit the.envfile and fill in your Google Gemini API Key.Get your API Key at: https://makersuite.google.com/app/apikey Usage InstructionsMethod 1: Command-Line Interactive Modebash运行python kucius_system.pyFollow the prompts to input:Full nameGender (Male / Female)Birth yearBirth monthBirth dateBirth hourBirth minuteThe system will output a complete destiny analysis report.Method 2: Demo ModeView sample output format:bash运行python demo_test.py Project Structureplaintext. ├── kucius_system.py # Main program entry ├── demo_test.py # Demo and test script ├── requirements.txt # Python dependency list ├── .env.example # Environment variable template ├── .env # Custom environment configuration (manual creation required) └── README.md # Project documentation How to Obtain an API KeyVisit Google AI StudioSign in with your Google accountCreate a new API KeyCopy the Key into your.envconfiguration file⚠️ NotesThis system is for entertainment and learning purposes only.Destiny analysis results are for reference only and shall not be used as the sole basis for life decisions.Use the API rationally and avoid frequent calls to prevent quota overrun. Technology StackPython 3.8Google Generative AI – LLM model invocationPydantic – Data validationpython-dotenv – Environment variable managementjson-repair – JSON parsing and error repairing Sample Outputplaintext Kucius Theory LLM Compliance System (KUCIUS System) Personal Information: Name: Zhang San Gender: Male Birth Time: 14:30, May 15, 1990 Four Pillars BaZi Chart: Year Pillar: Geng Wu [Metal · Fire] Month Pillar: Xin Si [Metal · Fire] Day Pillar: Gui You [Water · Metal] Hour Pillar: Ji Wei [Earth · Earth] ⚖️ Five Elements Statistics: Metal: 3 (Strong) Wood: 0 (Absent) Water: 1 (Weak) Fire: 2 (Auxiliary) Earth: 2 (Resting) Fate Pattern Analysis: Pattern Type: Indirect Seal Generating Structure Useful God: Wood (Eating God / Hurting Officer) Auspicious God: Water (Friend / Rob Wealth) Inauspicious God: Earth (Official Killing), Metal (Seal Star) Fortune Enhancement Suggestions: 1. Career Direction: Suitable for management, finance, legal and related professions 2. Lucky Colors: Green, Cyan 3. Lucky Numbers: 3, 8 ... LicenseThe project code is developed based on public blog content and is for learning and research only. AcknowledgementsOriginal Author: Kucius (Kucius Teng)Blog Link: https://dengbin.blog.csdn.net/article/details/160865022https://inscode.net/workbench?spm1065.2741.3001.10818https://inscode.net/p/b6b30e2b4fd14129895ad28eb057cc6c?ucsdn_smarttonyutm_sourceshare_projectflink