Files
admin ea5499123e
CI / CD Pipeline / build (push) Failing after 3m57s
CI / CD Pipeline / deploy (push) Has been skipped
690519:1631 224 to 226 AI #01
2026-05-19 16:31:50 +07:00

51 lines
966 B
Markdown

# Quickstart: AI Tool Layer Architecture
## Testing the Tool Layer Manually
You can test the tool registry directly through the NestJS REPL or by hitting the `POST /ai/intent` endpoint once the gateway is connected.
### Example Request (Simulated)
```json
POST /ai/intent
{
"query": "Get the latest RFA for project A",
"context": {
"type": "project",
"publicId": "019505a1-7c3e-7000-8000-abc123def456"
}
}
```
### Expected Response
If user is authorized:
```json
{
"intent": "GET_RFA",
"confidence": 0.95,
"result": {
"ok": true,
"data": [
{
"publicId": "019505a1-8d2b-7000-8000-112233445566",
"rfaNumber": "RFA-001",
"statusCode": "PENDING",
...
}
]
}
}
```
If user is unauthorized:
```json
{
"intent": "GET_RFA",
"confidence": 0.95,
"result": {
"ok": false,
"reason": "FORBIDDEN",
"message": "ไม่มีสิทธิ์เข้าถึง RFA"
}
}
```