-
Notifications
You must be signed in to change notification settings - Fork 46
AIT-149: Add pricing information to docs #3106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7fd33d3
WIP - add pricing information to overview
rainbowFi 20d5dbe
WIP - pricing notes
rainbowFi 2fb5f0c
Add worked example for AI chatbot use case
rainbowFi bbc1876
Update nav
rainbowFi b426051
Apply suggestions from code review
rainbowFi 5852272
Update based on comments from JamieB's example PR
rainbowFi 2c91ce2
Fixup following Paddy review
rainbowFi d9e3583
Update doc links to reflect new repo structure
rainbowFi 91ef836
Fixup: text tweak from review
rainbowFi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| title: AI support chatbot pricing example | ||
| meta_description: "Calculate AI Transport pricing for conversations with an AI chatbot. Example shows how using the message-per-response pattern and modifying the append rollup window can generate cost savings." | ||
| meta_keywords: "chatbot, support chat, token streaming, token cost, AI Transport pricing, Ably AI Transport pricing, stream cost, Pub/Sub pricing, realtime data delivery, Ably Pub/Sub pricing" | ||
| intro: "This example uses consumption-based pricing for an AI support chatbot use case, where a single agent is publishing tokens to user over AI Transport." | ||
| --- | ||
|
|
||
| ### Assumptions | ||
|
|
||
| The scale and features used in this calculation. | ||
|
|
||
| | Scale | Features | | ||
| |-------|----------| | ||
| | 4 user prompts to get to resolution | ✓ Message-per-response | | ||
| | 300 token events per LLM response | | | ||
| | 75 appends per second from agent | | | ||
| | 3 minute average chat duration | | | ||
| | 1 million chats | | | ||
|
|
||
| ### Cost summary | ||
|
|
||
| The high level cost breakdown for this scenario is given in the table below. Messages are billed for both inbound (published to Ably) and outbound (delivered to subscribers). Enabling the "Message updates, deletes and appends" [channel rule](/docs/ai-transport/token-streaming/message-per-response#enable) will automatically enable message persistence. | ||
|
|
||
| | Item | Calculation | Cost | | ||
| |------|-------------|------| | ||
| | Messages | 1212M × $2.50/M | $3030 | | ||
| | Connection minutes | 6M × $1.00/M | $6 | | ||
| | Channel minutes | 3M × $1.00/M | $3 | | ||
| | Package fee | | [See plans](/pricing) | | ||
| | **Total** | | **~$3039/M chats** | | ||
|
|
||
| ### Message usage breakdown | ||
|
|
||
| Several factors influence the total message usage. The message-per-response pattern includes [automatic rollup of append events](/docs/ai-transport/token-streaming/token-rate-limits#per-response) to reduce consumption costs and avoid rate limits. | ||
|
|
||
| - Agent stream time: 300 token events ÷ 75 appends per second = 4 seconds of streaming per response | ||
| - Messages published after rollup: 4 seconds x 25 messages/s = **100 messages per response** | ||
|
|
||
| | Type | Calculation | Inbound | Outbound | Total messages | Cost | | ||
| |------|-------------|---------|----------|----------------|------| | ||
| | User prompts | 1M chats × 4 prompts | 4M | 4M | 8M | $20 | | ||
| | Agent responses | 1M chats x 4 responses x 100 messages per response | 400M | 400M | 800M | $2000 | | ||
| | Persisted messages | Every inbound message is persisted | 404M | 0 | 404M | $1010 | | ||
paddybyers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | **Total** | | **808M** | **404M** | **1212M** | **$3030** | | ||
paddybyers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <Aside data-type='further-reading'> | ||
| Useful links for exploring this topic in more detail. | ||
| - [Talk with sales](https://ably.com/contact) to get a personalized quote. | ||
| - [Learn how HubSpot uses Ably to enable 128,000 businesses with live chat that just works](https://ably.com/case-studies/hubspot) | ||
| - [See how doxy.me turned realtime from a liability into a strategic asset](https://ably.com/case-studies/doxyme) | ||
| </Aside> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.