-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
76 lines (55 loc) · 1.19 KB
/
Copy pathapi.http
File metadata and controls
76 lines (55 loc) · 1.19 KB
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
### finagent API
### Run finagent in serve mode first: ./bin/finagent --serve --config config.yaml
@base = http://localhost:8082
@token = changeme
### Health — no auth required
GET {{base}}/api/health
###
### Chat — no token → 401
POST {{base}}/api/chat
Content-Type: application/json
{
"text": "hello"
}
###
### Chat — wrong token → 401
POST {{base}}/api/chat
Authorization: Bearer wrongtoken
Content-Type: application/json
{
"text": "hello"
}
###
### Chat — valid token → 200
POST {{base}}/api/chat
Authorization: Bearer {{token}}
Content-Type: application/json
{
"text": "hello"
}
###
### Chat — list accounts
POST {{base}}/api/chat
Authorization: Bearer {{token}}
Content-Type: application/json
{
"text": "what accounts do I have?"
}
###
### Chat — spending this month
POST {{base}}/api/chat
Authorization: Bearer {{token}}
Content-Type: application/json
{
"text": "what did I spend this month?"
}
###
### Chat — continued session (copy session_id from a previous response)
POST {{base}}/api/chat
Authorization: Bearer {{token}}
Content-Type: application/json
{
"text": "break it down by category",
"session_id": "replace-with-session-id-from-above"
}
###