refactor: stat.
This commit is contained in:
+3
-2
@@ -188,7 +188,7 @@ func buildAnalysisPrompt(teachingPlanContent, heartRateContent, analysisType, st
|
|||||||
| **结束部分** | 社会性及情感目标游戏 | | | | | 4 |
|
| **结束部分** | 社会性及情感目标游戏 | | | | | 4 |
|
||||||
| | 整理放松 | | | | | 2 |
|
| | 整理放松 | | | | | 2 |
|
||||||
|
|
||||||
请以专业体育教师的视角,提供详细的数据分析和教学建议。`, teachingPlanContent, heartRateContent, stepContent)
|
请以专业体育教师的视角,提供详细的数据分析和教学建议。请直接输出报告内容,不要包含“好的”、“收到”、“作为一名...”等任何开场白或客套话。`, teachingPlanContent, heartRateContent, stepContent)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf(`请根据以下体育课堂的教案和心率监测数据,生成一份详细的课堂分析报告:
|
return fmt.Sprintf(`请根据以下体育课堂的教案和心率监测数据,生成一份详细的课堂分析报告:
|
||||||
@@ -236,7 +236,7 @@ func buildAnalysisPrompt(teachingPlanContent, heartRateContent, analysisType, st
|
|||||||
| **结束部分** | 社会性及情感目标游戏 | | | | | 4 |
|
| **结束部分** | 社会性及情感目标游戏 | | | | | 4 |
|
||||||
| | 整理放松 | | | | | 2 |
|
| | 整理放松 | | | | | 2 |
|
||||||
|
|
||||||
请以专业体育教师的视角,提供详细的数据分析和教学建议。`, teachingPlanContent, heartRateContent)
|
请以专业体育教师的视角,提供详细的数据分析和教学建议。请直接输出报告内容,不要包含“好的”、“收到”、“作为一名...”等任何开场白或客套话。`, teachingPlanContent, heartRateContent)
|
||||||
}
|
}
|
||||||
|
|
||||||
type aiAnalysisResult struct {
|
type aiAnalysisResult struct {
|
||||||
@@ -394,6 +394,7 @@ func (tc *TrainingController) AnalyzeByAI(c *gin.Context) {
|
|||||||
RegionID: regionID,
|
RegionID: regionID,
|
||||||
SourceType: teachingPlanSource,
|
SourceType: teachingPlanSource,
|
||||||
AnalysisType: analysisType,
|
AnalysisType: analysisType,
|
||||||
|
AnalysisResult: analysisResult.Content,
|
||||||
InputTokens: analysisResult.InputTokens,
|
InputTokens: analysisResult.InputTokens,
|
||||||
OutputTokens: analysisResult.OutputTokens,
|
OutputTokens: analysisResult.OutputTokens,
|
||||||
InputSizeBytes: analysisResult.InputSizeBytes,
|
InputSizeBytes: analysisResult.InputSizeBytes,
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ func (sc *StatisticsController) ListAIAnalysisRecords(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var records []models.AIAnalysisRecord
|
var records []models.AIAnalysisRecord
|
||||||
if err := query.Order("created_at DESC").Offset(offset).Limit(params.PageSize).Find(&records).Error; err != nil {
|
if err := query.Order("upload_time DESC").Offset(offset).Limit(params.PageSize).Find(&records).Error; err != nil {
|
||||||
writeError(c, http.StatusInternalServerError, "failed to query records")
|
writeError(c, http.StatusInternalServerError, "failed to query records")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ type AIAnalysisRecord struct {
|
|||||||
RegionID *uint32 `gorm:"index" json:"regionId"`
|
RegionID *uint32 `gorm:"index" json:"regionId"`
|
||||||
SourceType string `gorm:"size:32" json:"sourceType"`
|
SourceType string `gorm:"size:32" json:"sourceType"`
|
||||||
AnalysisType string `gorm:"size:32" json:"analysisType"`
|
AnalysisType string `gorm:"size:32" json:"analysisType"`
|
||||||
|
AnalysisResult string `gorm:"type:text" json:"analysisResult"`
|
||||||
InputTokens int `json:"inputTokens"`
|
InputTokens int `json:"inputTokens"`
|
||||||
OutputTokens int `json:"outputTokens"`
|
OutputTokens int `json:"outputTokens"`
|
||||||
InputSizeBytes int `json:"inputSizeBytes"`
|
InputSizeBytes int `json:"inputSizeBytes"`
|
||||||
|
|||||||
Reference in New Issue
Block a user