Earlier this week, we used two non-public APIs to pull in the flavor of the day data for Culver’s and Kopp’s. Back in May, we looked at How to get AI to tell you the flavor of the day at Kopp’s and I figured that the next natural step would be to do the same for Culver’s. Much like the last time, we will use Ollama, Python, and Chroma DB. This time, we are also going to be using our Culver’s Flavor of the Day API, though. Let’s start by installi
... show moreEarlier this week, we used two non-public APIs to pull in the flavor of the day data for Culver’s and Kopp’s. Back in May, we looked at How to get AI to tell you the flavor of the day at Kopp’s and I figured that the next natural step would be to do the same for Culver’s. Much like the last time, we will use Ollama, Python, and Chroma DB. This time, we are also going to be using our Culver’s Flavor of the Day API, though. Let’s start by installing the necessary modules.
Using the Kopp’s demo as a guide, we can easily build a Culver’s variant.
So, what is happening above?
- The script starts by importing a few required modules
- It fetches the flavor and location data from the API
- It creates a “docs” collection in the Chroma DB database
- It verifies that the user is asking a question
- It passes the prompt into the embedding model and retrieves the most relevant documents
- It uses the main model to generate an actual final response
- It outputs the response.
The result looks like this:
Since the new dataset covers just today’s flavors but covers the flavors for multiple locations, what you can do with the model is slightly different.
So, what do you think? How do you think that you could use this?
jws.news/2024/lets-play-more-w…
#AI #ChromaDB #llama3 #LLM #Ollama #Python #RAG