Files
AIclinicalresearch/backend/test-pkb-migration.http
HaHafeng 98d862dbd4 feat(aia): Complete AIA V2.0 and sync all changes
AIA V2.0 Major Updates:
- Add StreamingService with OpenAI Compatible format (backend/common/streaming)
- Upgrade Chat component V2 with Ant Design X deep integration
- Implement 12 intelligent agents (5 phases: topic/design/review/data/writing)
- Create AgentHub with 100% prototype V11 restoration
- Create ChatWorkspace with fullscreen immersive experience
- Add ThinkingBlock for deep thinking display
- Add useAIStream Hook for stream handling
- Add ConversationList for conversation management

Backend (~1300 lines):
- common/streaming: OpenAI adapter and streaming service
- modules/aia: 12 agents config, conversation service, attachment service
- Unified API routes to /api/v1 (RVW, PKB, AIA modules)
- Update authentication and permission helpers

Frontend (~3500 lines):
- modules/aia: AgentHub + ChatWorkspace + AgentCard components
- shared/Chat: AIStreamChat, ThinkingBlock, useAIStream, useConversations
- Update all modules API endpoints to v1
- Modern design with theme colors (blue/yellow/teal/purple)

Documentation (~2500 lines):
- AIA module status and development guide
- Universal capabilities catalog (11 services)
- Quick reference card
- System overview updates
- All module documentation synchronization

Other Updates:
- DC Tool C: Python operations and frontend components
- IIT Manager: session memory and wechat service
- PKB/RVW/ASL: API route updates
- Docker configs and deployment scripts
- Database migrations and scripts
- Test files and documentation

Tested: AIA streaming verified, authentication working, core features functional
Status: AIA V2.0 completed (85%), all changes synchronized
2026-01-14 19:19:00 +08:00

172 lines
4.8 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.
###
# PKBЩ - API
# v12<EFBFBD>у?
###
@baseUrl = http://localhost:3000
@userId = user-mock-001
### ============================================
### <EFBFBD>3.1: ?
### ============================================
### 1. PKB v2?
GET {{baseUrl}}/api/v1/pkb/health
Accept: application/json
### ============================================
### <EFBFBD>3.2: RUD
### ============================================
### 2. <EFBFBD>v1?
GET {{baseUrl}}/api/v1/knowledge-bases
Accept: application/json
### 3. <EFBFBD>v2?
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases
Accept: application/json
### 4. v2?
POST {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases
Content-Type: application/json
{
"name": "2-{{$timestamp}}",
"description": "<EFBFBD>v2 API"
}
### 5. v1 - ?
POST {{baseUrl}}/api/v1/knowledge-bases
Content-Type: application/json
{
"name": "1-{{$timestamp}}",
"description": "<EFBFBD>v1 API"
}
### 6. <EFBFBD>v2?
# D
@kbId = f6ebe476-c50f-4222-83d2-c2525edc6054
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}
Accept: application/json
### 7. <EFBFBD>v1 - ?
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}
Accept: application/json
### 8. v2?
PUT {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}
Content-Type: application/json
{
"name": "2",
"description": "v2 API弿?
}
### 9. v2?
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/stats
Accept: application/json
### 10. v1 - ?
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}/stats
Accept: application/json
### ============================================
### <EFBFBD>3.3: RAG?
### ============================================
### 11. RAG<EFBFBD>v2?
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=?top_k=5
Accept: application/json
### 12. RAG<EFBFBD>v1 - ?
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}/search?query=?top_k=5
Accept: application/json
### ============================================
### <EFBFBD>3.4: ā
### ============================================
### 13. 2?
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/document-selection?max_files=7&max_tokens=750000
Accept: application/json
### 14. 1 - ?
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}/document-selection?max_files=7&max_tokens=750000
Accept: application/json
### ============================================
### <EFBFBD>3.5:
### ============================================
### 15. <EFBFBD>
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}
Accept: application/json
### 16. 2?
# ID
@docId = your-document-id
GET {{baseUrl}}/api/v1/pkb/knowledge/documents/{{docId}}
Accept: application/json
### ============================================
### <EFBFBD>3.6: <EFBFBD>?
### ============================================
### 17. <EFBFBD>āv2?
GET {{baseUrl}}/api/v1/pkb/batch-tasks/batch/templates
Accept: application/json
### 18. <EFBFBD>v2?
POST {{baseUrl}}/api/v1/pkb/batch-tasks/batch/execute
Content-Type: application/json
{
"kb_id": "{{kbId}}",
"document_ids": [],
"template_type": "preset",
"template_id": "clinical_research_method",
"model_type": "deepseek-v3",
"task_name": "<EFBFBD><EFBFBD>2"
}
### ============================================
### <EFBFBD>3.7:
### ============================================
### 19. v2?
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/00000000-0000-0000-0000-000000000000
Accept: application/json
### 20. v2?
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=&top_k=0
Accept: application/json
### 21. top_k2?
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=&top_k=1000
Accept: application/json
### ============================================
### <EFBFBD>3.8:
### ============================================
### 22. v2?
# @testKbId = D
DELETE {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{testKbId}}
###