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
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
###
|
||||
# PKB妯″潡杩佺Щ - API娴嬭瘯鑴氭湰
|
||||
# 测试v1和v2路由的功能完整性和一致性
|
||||
# 娴嬭瘯v1鍜寁2璺<EFBFBD>敱鐨勫姛鑳藉畬鏁存€у拰涓€鑷存€?
|
||||
###
|
||||
|
||||
@baseUrl = http://localhost:3000
|
||||
@userId = user-mock-001
|
||||
|
||||
### ============================================
|
||||
### 阶段3.1: 健康检查
|
||||
### 闃舵<EFBFBD>3.1: 鍋ュ悍妫€鏌?
|
||||
### ============================================
|
||||
|
||||
### 1. PKB v2健康检查
|
||||
GET {{baseUrl}}/api/v2/pkb/health
|
||||
### 1. PKB v2鍋ュ悍妫€鏌?
|
||||
GET {{baseUrl}}/api/v1/pkb/health
|
||||
Accept: application/json
|
||||
|
||||
### ============================================
|
||||
### 闃舵<E99783>3.2: 鐭ヨ瘑搴揅RUD娴嬭瘯
|
||||
### ============================================
|
||||
|
||||
### 2. 获取知识库列表(v1)
|
||||
### 2. 鑾峰彇鐭ヨ瘑搴撳垪琛<EFBFBD>紙v1锛?
|
||||
GET {{baseUrl}}/api/v1/knowledge-bases
|
||||
Accept: application/json
|
||||
|
||||
### 3. 获取知识库列表(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases
|
||||
### 3. 鑾峰彇鐭ヨ瘑搴撳垪琛<EFBFBD>紙v2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases
|
||||
Accept: application/json
|
||||
|
||||
### 4. 创建知识库(v2)
|
||||
POST {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases
|
||||
### 4. 鍒涘缓鐭ヨ瘑搴擄紙v2锛?
|
||||
POST {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
@@ -35,7 +35,7 @@ Content-Type: application/json
|
||||
"description": "杩欐槸涓€涓<E282AC>€氳繃v2 API鍒涘缓鐨勬祴璇曠煡璇嗗簱"
|
||||
}
|
||||
|
||||
### 5. 创建知识库(v1 - 对比)
|
||||
### 5. 鍒涘缓鐭ヨ瘑搴擄紙v1 - 瀵规瘮锛?
|
||||
POST {{baseUrl}}/api/v1/knowledge-bases
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -44,54 +44,54 @@ Content-Type: application/json
|
||||
"description": "杩欐槸涓€涓<E282AC>€氳繃v1 API鍒涘缓鐨勬祴璇曠煡璇嗗簱"
|
||||
}
|
||||
|
||||
### 6. 获取知识库详情(v2)
|
||||
### 6. 鑾峰彇鐭ヨ瘑搴撹<EFBFBD>鎯咃紙v2锛?
|
||||
# 鏇挎崲涓哄疄闄呯殑鐭ヨ瘑搴揑D
|
||||
@kbId = f6ebe476-c50f-4222-83d2-c2525edc6054
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}
|
||||
Accept: application/json
|
||||
|
||||
### 7. 获取知识库详情(v1 - 对比)
|
||||
### 7. 鑾峰彇鐭ヨ瘑搴撹<EFBFBD>鎯咃紙v1 - 瀵规瘮锛?
|
||||
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}
|
||||
Accept: application/json
|
||||
|
||||
### 8. 更新知识库(v2)
|
||||
PUT {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}
|
||||
### 8. 鏇存柊鐭ヨ瘑搴擄紙v2锛?
|
||||
PUT {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"name": "鏇存柊鍚庣殑鐭ヨ瘑搴撳悕绉皏2",
|
||||
"description": "通过v2 API更新的描述"
|
||||
"description": "閫氳繃v2 API鏇存柊鐨勬弿杩?
|
||||
}
|
||||
|
||||
### 9. 获取知识库统计(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}/stats
|
||||
### 9. 鑾峰彇鐭ヨ瘑搴撶粺璁★紙v2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/stats
|
||||
Accept: application/json
|
||||
|
||||
### 10. 获取知识库统计(v1 - 对比)
|
||||
### 10. 鑾峰彇鐭ヨ瘑搴撶粺璁★紙v1 - 瀵规瘮锛?
|
||||
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}/stats
|
||||
Accept: application/json
|
||||
|
||||
### ============================================
|
||||
### 阶段3.3: RAG检索测试
|
||||
### 闃舵<EFBFBD>3.3: RAG妫€绱㈡祴璇?
|
||||
### ============================================
|
||||
|
||||
### 11. RAG检索(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=阿尔兹海默症的治疗方法&top_k=5
|
||||
### 11. RAG妫€绱<EFBFBD>紙v2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=闃垮皵鍏规捣榛樼棁鐨勬不鐤楁柟娉?top_k=5
|
||||
Accept: application/json
|
||||
|
||||
### 12. RAG检索(v1 - 对比)
|
||||
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}/search?query=阿尔兹海默症的治疗方法&top_k=5
|
||||
### 12. RAG妫€绱<EFBFBD>紙v1 - 瀵规瘮锛?
|
||||
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}/search?query=闃垮皵鍏规捣榛樼棁鐨勬不鐤楁柟娉?top_k=5
|
||||
Accept: application/json
|
||||
|
||||
### ============================================
|
||||
### 闃舵<E99783>3.4: 鏂囨。閫夋嫨锛堝叏鏂囬槄璇绘ā寮忥級
|
||||
### ============================================
|
||||
|
||||
### 13. 获取文档选择(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}/document-selection?max_files=7&max_tokens=750000
|
||||
### 13. 鑾峰彇鏂囨。閫夋嫨锛坴2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/document-selection?max_files=7&max_tokens=750000
|
||||
Accept: application/json
|
||||
|
||||
### 14. 获取文档选择(v1 - 对比)
|
||||
### 14. 鑾峰彇鏂囨。閫夋嫨锛坴1 - 瀵规瘮锛?
|
||||
GET {{baseUrl}}/api/v1/knowledge-bases/{{kbId}}/document-selection?max_files=7&max_tokens=750000
|
||||
Accept: application/json
|
||||
|
||||
@@ -100,25 +100,25 @@ Accept: application/json
|
||||
### ============================================
|
||||
|
||||
### 15. 鑾峰彇鏂囨。鍒楄〃锛堥€氳繃鐭ヨ瘑搴撹<E690B4>鎯咃級
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}
|
||||
Accept: application/json
|
||||
|
||||
### 16. 获取单个文档详情(v2)
|
||||
### 16. 鑾峰彇鍗曚釜鏂囨。璇︽儏锛坴2锛?
|
||||
# 鏇挎崲涓哄疄闄呯殑鏂囨。ID
|
||||
@docId = your-document-id
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/documents/{{docId}}
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/documents/{{docId}}
|
||||
Accept: application/json
|
||||
|
||||
### ============================================
|
||||
### 阶段3.6: 批处理功能测试
|
||||
### 闃舵<EFBFBD>3.6: 鎵瑰<EFBFBD>鐞嗗姛鑳芥祴璇?
|
||||
### ============================================
|
||||
|
||||
### 17. 获取批处理模板(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/batch-tasks/batch/templates
|
||||
### 17. 鑾峰彇鎵瑰<EFBFBD>鐞嗘ā鏉匡紙v2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/batch-tasks/batch/templates
|
||||
Accept: application/json
|
||||
|
||||
### 18. 创建批处理任务(v2)
|
||||
POST {{baseUrl}}/api/v2/pkb/batch-tasks/batch/execute
|
||||
### 18. 鍒涘缓鎵瑰<EFBFBD>鐞嗕换鍔★紙v2锛?
|
||||
POST {{baseUrl}}/api/v1/pkb/batch-tasks/batch/execute
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
@@ -134,25 +134,25 @@ Content-Type: application/json
|
||||
### 闃舵<E99783>3.7: 杈圭晫鏉′欢娴嬭瘯
|
||||
### ============================================
|
||||
|
||||
### 19. 测试不存在的知识库(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/00000000-0000-0000-0000-000000000000
|
||||
### 19. 娴嬭瘯涓嶅瓨鍦ㄧ殑鐭ヨ瘑搴擄紙v2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/00000000-0000-0000-0000-000000000000
|
||||
Accept: application/json
|
||||
|
||||
### 20. 测试无效的查询参数(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=&top_k=0
|
||||
### 20. 娴嬭瘯鏃犳晥鐨勬煡璇㈠弬鏁帮紙v2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=&top_k=0
|
||||
Accept: application/json
|
||||
|
||||
### 21. 测试超大top_k参数(v2)
|
||||
GET {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=测试&top_k=1000
|
||||
### 21. 娴嬭瘯瓒呭ぇtop_k鍙傛暟锛坴2锛?
|
||||
GET {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{kbId}}/search?query=娴嬭瘯&top_k=1000
|
||||
Accept: application/json
|
||||
|
||||
### ============================================
|
||||
### 闃舵<E99783>3.8: 娓呯悊娴嬭瘯鏁版嵁锛堝彲閫夛級
|
||||
### ============================================
|
||||
|
||||
### 22. 删除测试知识库(v2)
|
||||
### 22. 鍒犻櫎娴嬭瘯鐭ヨ瘑搴擄紙v2锛?
|
||||
# @testKbId = 浠庡垱寤哄搷搴斾腑鑾峰彇鐨処D
|
||||
DELETE {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{testKbId}}
|
||||
DELETE {{baseUrl}}/api/v1/pkb/knowledge/knowledge-bases/{{testKbId}}
|
||||
|
||||
###
|
||||
|
||||
@@ -168,3 +168,4 @@ DELETE {{baseUrl}}/api/v2/pkb/knowledge/knowledge-bases/{{testKbId}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user