datasette / datasette-enrichments

Tools for running enrichments against data stored in Datasette
https://enrichments.datasette.io
Apache License 2.0
16 stars 0 forks source link

Cost estimate mechanism #9

Open simonw opened 8 months ago

simonw commented 8 months ago

Enrichments that use a paid API (e.g. OpenAI embeddings) could offer a cost estimate, which works by running in the background and churning through all of the matching rows adding up the tokens that would be used via tiktoken or similar.

This will be a fiddle to implement due to the need to run it in the background and paginate through the whole set.