File size: 1,755 Bytes
6700a7f
 
 
 
 
 
 
 
 
 
bef5e76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
title: Demo Agentic Service Data Eyond
emoji: 🏆
colorFrom: yellow
colorTo: pink
sdk: docker
pinned: false
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference


How to run:
`uv run --no-sync uvicorn main:app --host 0.0.0.0 --port 7860`


Agent
Orchestrator : intent recognition, orchestrate, and plannings
Chatbot : have tools (retriever, and search), called by orchestrator


APIs                        
/api/v1/login -> login by email and password

/api/v1/documents/{user_id} -> list all documents
/api/v1/document/upload -> upload document
/api/v1/document/delete -> delete document
/api/v1/document/process -> extract document and ingest to vector index

/api/v1/chat/stream -> talk with agent chatbot, in streaming response
/api/v1/rooms/{user_id} -> list all room based on user id
/api/v1/room/{room_id} -> get room based on room id


Config
- Agent: system prompt, guardrails
- others config needed

DB
- using postgres as db
- we can use pg vector from this db also
- use redis for caching response, same question will not re-processed for 24 hour

Document
- service to manage document, upload, delete, log to db

Knowledge
- service to process document into vector, until ingestion to pg vector

Middleware
CORS:
- allow all
Rate limiting:
- upload document: 10 document per menit
Logging:
- create clear and strutured logging for better debuging

Models
- Data models

Observability
- Langfuse traceability

RAG
- retriever service to get relevant context from pg vector

storage
- storage functionality to communicate with storage provider

tools
- tools that can be use by agent

Users
- Users management, to get user indentity based on login information.

Utils
- Other functionality