A primary goal of Omnivore is to help you capture the cost of making Open AI requests and evaluate the value of the responses over many sessions.
To achieve this in Omnivore we save each model request to Airtable as a Log that you can review. You can rate the Logs and leave comments in Airtable. This practice will help you self reflect, and you can build your judgment on the balance between value and cost.
Letās step through a typical session with Omnivore and see how the costs stack up. You can see the prices for Open AIās services here. Weāre using GPT4o, Whisper, TTS (SD) and DALLE-3 (HD). The following amounts are in USD.
Letās start with an old newspaper clipping of a recipe, uploaded to Omnivore. This triggered the addRecipeViaPhoto function in Omnivore, which calls the GPT4o chat completion API. Since GPT4o has vision capabilities, we can rely on it to parse the details of the recipe. A key detail is that weāve asked it to return a version of the recipe that we can upload straight to Airtable.
I'm pretty happy with the parse and the image here. Weāve lost the tip at the end of the recipe, but it correctly has all the details I need. I also like the image; it looks good and is consistent with the other images on the site.
Additionally, I called DALL-E 3 to generate an illustration to go with the recipe. DALL-E is prompted to pick the key ingredient in the recipe, as the illustration subject. I opted for the āHDā quality and the smallest size possible 1024 x 1024, which is a flat rate of 8 cents as of May 24. Here's the full image.
These two functions together cost $0.012715 and $0.08 or $0.092715.
Before I proceed with adding this recipe to the meal plan, Iām going to ask a question about butter. I forgot to buy butter; can I use something else?
That cost $0.00793, still less than 1 cent.
This process is fairly quick, but thereās latency not unlike using Siri. In the near future, GPT-4o will start supporting audio input and output, which should reduce the latency of this experience and cost, as we wonāt have the double handling of converting speech to text and then text to speech. However, the audio quality was excellent, and I love the UX of getting a quick response compared to navigating a Google results page.
Weāre now at a total of $0.100645 or 10 cents.
Letās turn this recipe into an actionable plan for our chef. Weāre going to update our shopping list and also create a run sheet, which is a version of the recipe optimized for the kitchen bench.
The "mergeRecipe" function is pretty bold; it takes the current state of the recipe list and creates, updates, or deletes shopping list items based on the provided recipe. It also gives the list items smart categories, based on the existing listās categories. This is all powered by the chat completion API and a detailed system prompt. Itās a risky function, a deliberate moment in the app to see non-trivial reasoning. In this instance, I've paid $0.01216 to use "mergeRecipe" for the shopping list or 1,362 tokens.
Weāve successfully added all the ingredients we need to the shopping list with the correct phrasing and decent categories. However, there was 1 whole lemon on this shopping list prior, and it has been changed to half a lemon, which satisfies the requirements of the recipe but has removed a whole lemon we may need for something else. Ideally, we would have 1.5 or even 2 lemons on the shopping list.
Letās remedy this by adding another lemon for $0.0011 using the text completion API. This is much cheaper, as the context provided for this call is quite limited at only 158 tokens.
The meal plan is ready to review since we could do both actions asynchronously. The good news is that the meal plan is perfectly usable, consistent with the recipe, and now in a layout I prefer, having detailed my preferences in the system prompt for the text completion API. I have an easy-to-read table, and some key info has been highlighted. I much prefer this format when cooking. This run sheet costs $0.01648 or 2,136 tokens.
All up, these 3 actions cost another $0.02974, bringing the total to $0.130385.
So during cooking weāre anticipating that the chef may ask one or two questions during the process. The first question regards the step of wilting the spinach. What does wilted spinach look like? Well, letās ask GPT4o.
Wilted spinach appears significantly reduced in volume, dark green, and softened. The leaves are limp due to the moisture loss during the wilting process.
For half of 1 cent, or $0.005, we get a brief and direct answer, pretty quickly and without having to navigate away to Google.
Our cooking session is done for $0.135, just over 10 cents. Obviously this is a very small sample size. You may find that youāll have to repeat certain functions multiple times to get an acceptable output which would inflate the cost. You may find you have longer questions or longer responses and that would add more cost too. Iām looking forward to collecting more data from myself and testers.
This is a meal planning app, so letās assume $0.135 is the minimum cost of preparing a meal using the app. If we extrapolate to 2 meals a day, 7 days a week, for 1 month or 4.3 weeks thatās 60.2 meals. Thatās $8.12 USD a month ā almost a Spotify subscription. Perhaps that strikes you as expensive or cheap ā Iād be curious to know. Iām looking forward to working with users to evaluate the responses they get as valuable, to help clarify the return on the cost.
We need more logs! More real world usage of the app in both my own kitchen and others to help evaluate the cost and the return on value. If youāre testing Omnivore, Iād love to hear your own experiences and continue collating results and reflections.