From 4ac3243f6efcc5c988d6ede843774650b5eeb1e7 Mon Sep 17 00:00:00 2001 From: yanlongqi Date: Tue, 18 Nov 2025 22:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84AI=E9=85=8D=E7=BD=AE=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AF=E7=B1=BB=E5=9E=8B=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 删除AIConfig中未使用的属性(BaseURL、Model) 2. 修复ExamManagement页面Tag组件的size属性错误 3. 添加shared_by.nickname类型定义 4. 优化AI评分提示词,移除冗余的评分依据列表 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- internal/services/baidu_ai_grading.go | 17 ----------------- pkg/config/config.go | 6 ------ web/src/pages/ExamManagement.tsx | 2 +- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/internal/services/baidu_ai_grading.go b/internal/services/baidu_ai_grading.go index dff07e7..3345489 100644 --- a/internal/services/baidu_ai_grading.go +++ b/internal/services/baidu_ai_grading.go @@ -78,15 +78,6 @@ func (s *BaiduAIGradingService) GradeEssay(question, userAnswer string) (*AIGrad 学生答案:%s -评分依据: -请依据以下保密法律法规和管理制度进行分析和评分: -1. 《中华人民共和国保守国家秘密法》 -2. 《中华人民共和国保守国家秘密法实施条例》 -3. 《保密工作管理制度2025.9.9》 -4. 《软件开发管理制度》 -5. 《涉密信息系统集成资质保密标准》 -6. 《涉密信息系统集成资质管理办法》 - 评分标准(论述题没有固定标准答案,请根据答题质量和法规符合度评分): 1. 论点是否明确,是否符合保密法规要求(30分) 2. 内容是否充实,论据是否引用相关法规条文(30分) @@ -213,14 +204,6 @@ func (s *BaiduAIGradingService) ExplainQuestionStream(writer http.ResponseWriter 标准答案:%s -**重要依据**:请基于以下保密法律法规和管理制度进行专业分析: -1. 《中华人民共和国保守国家秘密法》 -2. 《中华人民共和国保守国家秘密法实施条例》 -3. 《保密工作管理制度2025.9.9》 -4. 《软件开发管理制度》 -5. 《涉密信息系统集成资质保密标准》 -6. 《涉密信息系统集成资质管理办法》 - 请提供一个详细的解析,要求: 1. **必须基于保密法规**:解析时必须引用相关法规条文,说明依据哪些具体法律法规 2. **必须实事求是**:只基于题目内容、标准答案和实际法规进行解析 diff --git a/pkg/config/config.go b/pkg/config/config.go index 0bbc363..0c3f16a 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -18,9 +18,7 @@ type DatabaseConfig struct { // AIConfig AI服务配置结构 type AIConfig struct { - BaseURL string APIKey string - Model string BaiduAppID string // 百度云AppBuilder应用ID } @@ -79,15 +77,11 @@ func (c *DatabaseConfig) GetDSN() string { // GetAIConfig 获取AI服务配置 // 优先使用环境变量,如果没有设置则使用默认值 func GetAIConfig() *AIConfig { - baseURL := getEnv("AI_BASE_URL", "http://172.20.0.117") apiKey := getEnv("AI_API_KEY", "bce-v3/ALTAK-TgZ1YSBmbwNXo3BIuzNZ2/768b777896453e820a2c46f38614c8e9bf43f845") - model := getEnv("AI_MODEL", "deepseek-v3") baiduAppID := getEnv("BAIDU_APP_ID", "7b336aaf-f448-46d6-9e5f-bb9e38a1167c") return &AIConfig{ - BaseURL: baseURL, APIKey: apiKey, - Model: model, BaiduAppID: baiduAppID, } } diff --git a/web/src/pages/ExamManagement.tsx b/web/src/pages/ExamManagement.tsx index 2bb346a..ddbb295 100644 --- a/web/src/pages/ExamManagement.tsx +++ b/web/src/pages/ExamManagement.tsx @@ -51,6 +51,7 @@ interface ExamListItem { shared_by?: { id: number username: string + nickname?: string } } @@ -299,7 +300,6 @@ const ExamManagement: React.FC = () => { } color="purple" - size="small" className={styles.shareTag} > 来自 {exam.shared_by.nickname || exam.shared_by.username}