Files
AIclinicalresearch/backend/src/modules/rvw/__tests__/api.http
HaHafeng 57fdc6ef00 feat(aia): Integrate PromptService for 10 AI agents
Features:
- Migrate 10 agent prompts from hardcoded to database
- Add grayscale preview support (DRAFT/ACTIVE distribution)
- Implement 3-tier fallback (DB -> Cache -> Hardcoded)
- Add version management and rollback capability

Files changed:
- backend/scripts/migrate-aia-prompts.ts (new migration script)
- backend/src/common/prompt/prompt.fallbacks.ts (add AIA fallbacks)
- backend/src/modules/aia/services/agentService.ts (integrate PromptService)
- backend/src/modules/aia/services/conversationService.ts (pass userId)
- backend/src/modules/aia/types/index.ts (fix AgentStage type)

Documentation:
- docs/03-业务模块/AIA-AI智能问答/06-开发记录/2026-01-18-Prompt管理系统集成.md
- docs/02-通用能力层/00-通用能力层清单.md (add FileCard, Prompt management)
- docs/00-系统总体设计/00-系统当前状态与开发指南.md (update to v3.6)

Prompt codes:
- AIA_SCIENTIFIC_QUESTION, AIA_PICO_ANALYSIS, AIA_TOPIC_EVALUATION
- AIA_OUTCOME_DESIGN, AIA_CRF_DESIGN, AIA_SAMPLE_SIZE
- AIA_PROTOCOL_WRITING, AIA_METHODOLOGY_REVIEW
- AIA_PAPER_POLISH, AIA_PAPER_TRANSLATE

Tested: Migration script executed, all 10 prompts inserted successfully
2026-01-18 15:48:53 +08:00

141 lines
3.1 KiB
HTTP
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.
### RVW稿 - API
### Phase 1
@baseUrl = http://localhost:3001
@taskId = {{$uuid}}
### ========================================
### 1. 稿
### POST /api/v1/rvw/tasks
### ========================================
# 使Postman<EFBFBD>?
# curl -X POST http://localhost:3001/api/v1/rvw/tasks \
# -F "file=@test.docx" \
# -F "modelType=deepseek-v3"
### ========================================
### 2.
### GET /api/v1/rvw/tasks
### ========================================
###
GET {{baseUrl}}/api/v1/rvw/tasks
Content-Type: application/json
### <EFBFBD>?
GET {{baseUrl}}/api/v1/rvw/tasks?status=pending
Content-Type: application/json
### <EFBFBD>?
GET {{baseUrl}}/api/v1/rvw/tasks?status=completed
Content-Type: application/json
###
GET {{baseUrl}}/api/v1/rvw/tasks?page=1&limit=10
Content-Type: application/json
### ========================================
### 3.
### POST /api/v1/rvw/tasks/:taskId/run
### ========================================
###
POST {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/run
Content-Type: application/json
{
"agents": ["editorial"]
}
###
POST {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/run
Content-Type: application/json
{
"agents": ["methodology"]
}
### <EFBFBD>?
POST {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/run
Content-Type: application/json
{
"agents": ["editorial", "methodology"]
}
### ========================================
### 4.
### POST /api/v1/rvw/tasks/batch/run
### ========================================
POST {{baseUrl}}/api/v1/rvw/tasks/batch/run
Content-Type: application/json
{
"taskIds": ["task-id-1", "task-id-2", "task-id-3"],
"agents": ["editorial", "methodology"]
}
### ========================================
### 5.
### GET /api/v1/rvw/tasks/:taskId
### ========================================
GET {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}
Content-Type: application/json
### ========================================
### 6.
### GET /api/v1/rvw/tasks/:taskId/report
### ========================================
GET {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/report
Content-Type: application/json
### ========================================
### 7.
### DELETE /api/v1/rvw/tasks/:taskId
### ========================================
DELETE {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}
Content-Type: application/json
### ========================================
### API
### ========================================
### <EFBFBD>?
GET {{baseUrl}}/api/v1/review/tasks
Content-Type: application/json
### <EFBFBD>?
GET {{baseUrl}}/api/v1/review/tasks/{{taskId}}
Content-Type: application/json
### <EFBFBD>?
GET {{baseUrl}}/api/v1/review/tasks/{{taskId}}/report
Content-Type: application/json