chore: 代码格式化 - go fmt 自动调整
This commit is contained in:
@@ -30,14 +30,14 @@ func main() {
|
||||
SET password_hash = $1, updated_at = NOW()
|
||||
WHERE email = $2
|
||||
`, string(hash), "admin@govai.gov.cn")
|
||||
|
||||
|
||||
if err != nil {
|
||||
log.Fatal("更新密码失败:", err)
|
||||
}
|
||||
|
||||
rows, _ := result.RowsAffected()
|
||||
fmt.Printf("✅ 已重置 admin@govai.gov.cn 的密码为: %s (影响%d行)\n", password, rows)
|
||||
|
||||
|
||||
// 验证
|
||||
var email, role string
|
||||
err = db.QueryRow("SELECT email, role FROM users WHERE email = $1", "admin@govai.gov.cn").Scan(&email, &role)
|
||||
@@ -45,4 +45,4 @@ func main() {
|
||||
log.Fatal("查询用户失败:", err)
|
||||
}
|
||||
fmt.Printf("用户: %s, 角色: %s\n", email, role)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,4 +63,4 @@ func main() {
|
||||
}
|
||||
|
||||
fmt.Println("✅ 成功初始化模型提供商数据:阿里云百炼 (通义千问)")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@ type ChatRequest struct {
|
||||
}
|
||||
|
||||
type ChatResponse struct {
|
||||
Content string `json:"content"`
|
||||
Model string `json:"model"`
|
||||
PromptTokens int `json:"prompt_tokens"`
|
||||
CompletionTokens int `json:"completion_tokens"`
|
||||
TotalTokens int `json:"total_tokens"`
|
||||
ConversationID string `json:"conversation_id,omitempty"`
|
||||
Content string `json:"content"`
|
||||
Model string `json:"model"`
|
||||
PromptTokens int `json:"prompt_tokens"`
|
||||
CompletionTokens int `json:"completion_tokens"`
|
||||
TotalTokens int `json:"total_tokens"`
|
||||
ConversationID string `json:"conversation_id,omitempty"`
|
||||
}
|
||||
|
||||
type StreamDelta struct {
|
||||
|
||||
Reference in New Issue
Block a user