Files
AIclinicalresearch/redcap-docker-dev/scripts/logs-redcap.ps1
HaHafeng dfc472810b feat(iit-manager): Integrate Dify knowledge base for hybrid retrieval
Completed features:
- Created Dify dataset (Dify_test0102) with 2 processed documents
- Linked test0102 project with Dify dataset ID
- Extended intent detection to recognize query_protocol intent
- Implemented queryDifyKnowledge method (semantic search Top 5)
- Integrated hybrid retrieval (REDCap data + Dify documents)
- Fixed AI hallucination bugs (intent detection + API field path)
- Developed debugging scripts
- Completed end-to-end testing (5 scenarios passed)
- Generated comprehensive documentation (600+ lines)
- Updated development plans and module status

Technical highlights:
- Single project single knowledge base architecture
- Smart routing based on user intent
- Prevent AI hallucination by injecting real data/documents
- Session memory for multi-turn conversations
- Reused LLMFactory for DeepSeek-V3 integration

Bug fixes:
- Fixed intent detection missing keywords
- Fixed Dify API response field path error

Testing: All scenarios verified in WeChat production environment

Status: Fully tested and deployed
2026-01-04 15:44:11 +08:00

64 lines
1.8 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env pwsh
# REDCap Docker日志查看脚本
# 版本v1.0
# 日期2026-01-01
param(
[string]$Service = "", # 指定服务名redcap-web, redcap-db, phpmyadmin
[switch]$Follow, # 实时跟踪日志
[int]$Tail = 50 # 显示最近N行日志
)
Write-Host "📝 REDCap Docker日志" -ForegroundColor Cyan
Write-Host ""
# 切换到项目目录
$ScriptDir = Split-Path -Parent $PSCommandPath
$ProjectDir = Split-Path -Parent $ScriptDir
Set-Location $ProjectDir
# 构建docker-compose logs命令
$logCmd = "docker-compose logs"
if ($Follow) {
$logCmd += " -f"
} else {
$logCmd += " --tail=$Tail"
}
if ($Service) {
$logCmd += " $Service"
Write-Host "查看服务:$Service" -ForegroundColor Yellow
} else {
Write-Host "查看所有服务日志" -ForegroundColor Yellow
}
if ($Follow) {
Write-Host "实时跟踪模式按Ctrl+C退出" -ForegroundColor Gray
} else {
Write-Host "显示最近 $Tail 行日志" -ForegroundColor Gray
}
Write-Host ""
Write-Host "============================================" -ForegroundColor Gray
# 执行命令
Invoke-Expression $logCmd
Write-Host ""
Write-Host "💡 提示:" -ForegroundColor Cyan
Write-Host " • 查看特定服务:.\scripts\logs-redcap.ps1 -Service redcap-web" -ForegroundColor Gray
Write-Host " • 实时跟踪:.\scripts\logs-redcap.ps1 -Follow" -ForegroundColor Gray
Write-Host " • 显示更多行:.\scripts\logs-redcap.ps1 -Tail 100" -ForegroundColor Gray
Write-Host ""
Write-Host "可用服务名:" -ForegroundColor Cyan
Write-Host " • redcap-webREDCap Web服务" -ForegroundColor Gray
Write-Host " • redcap-dbMySQL数据库" -ForegroundColor Gray
Write-Host " • phpmyadmin数据库管理工具" -ForegroundColor Gray
Write-Host ""