convex-weflayr 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -12,14 +12,7 @@ adds the header for you and writes each call's usage into tables your app can
12
12
  query. So your app can act on cost: show a customer their usage, warn at 80% of
13
13
  a plan, stop at 100%.
14
14
 
15
- ```mermaid
16
- flowchart LR
17
- A["Convex action<br/>(your AI feature)"] -->|"1. model call + header<br/>feature, call, customer"| G["Weflayr gateway"]
18
- G -->|"2. answer + usage"| A
19
- A -->|"3. track() saves the call"| C[("convex-weflayr tables<br/>calls, daily totals, budgets")]
20
- C -->|"4. cost per customer,<br/>call, feature, day"| Q["Your queries and UI"]
21
- C -->|"5. assertWithinBudget()"| A
22
- ```
15
+ ![How a call flows: your Convex action calls the model through the Weflayr gateway, the component saves the call, and your code reads cost and checks budgets](https://raw.githubusercontent.com/sholajegede/convex-weflayr/main/docs/images/flow.png)
23
16
 
24
17
  ## What you get
25
18
 
@@ -69,23 +62,23 @@ Open the app and paste your key. Then:
69
62
  An agent run. Four steps share one run id, so the cost of the run is the sum of
70
63
  its steps:
71
64
 
72
- ![An agent run with the cost of each step](docs/images/agent-run.jpg)
65
+ ![An agent run with the cost of each step](https://raw.githubusercontent.com/sholajegede/convex-weflayr/main/docs/images/agent-run.jpg)
73
66
 
74
67
  A budget. After three calls the customer has used $0.000021 of a $0.00002
75
68
  budget, and the fourth call is stopped before the model runs:
76
69
 
77
- ![A customer stopped at their monthly budget](docs/images/budget-block.jpg)
70
+ ![A customer stopped at their monthly budget](https://raw.githubusercontent.com/sholajegede/convex-weflayr/main/docs/images/budget-block.jpg)
78
71
 
79
72
  Spend by customer and by call, and every saved call:
80
73
 
81
- ![Spend by customer](docs/images/customers.jpg)
74
+ ![Spend by customer](https://raw.githubusercontent.com/sholajegede/convex-weflayr/main/docs/images/customers.jpg)
82
75
 
83
- ![The call log](docs/images/calls.jpg)
76
+ ![The call log](https://raw.githubusercontent.com/sholajegede/convex-weflayr/main/docs/images/calls.jpg)
84
77
 
85
78
  The same calls in the Weflayr dashboard, grouped by the feature names the
86
79
  component sent:
87
80
 
88
- ![Cost per feature in Weflayr](docs/images/weflayr-dashboard.jpg)
81
+ ![Cost per feature in Weflayr](https://raw.githubusercontent.com/sholajegede/convex-weflayr/main/docs/images/weflayr-dashboard.jpg)
89
82
 
90
83
  About your key: it is saved in your browser's localStorage and sent with each
91
84
  call so the call can be made. It is never saved in the database. Each browser
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/sholajegede/convex-weflayr/issues"
11
11
  },
12
- "version": "0.1.0",
12
+ "version": "0.1.1",
13
13
  "license": "Apache-2.0",
14
14
  "keywords": [
15
15
  "convex",