This is a simple Scala 3/ZIO Http REST application that uses a large language model (LLM) to generate fast food orders from a natural language description of the order. The LLM will translate the text into a JSON order object that contains the list of items and their quantity.
The application uses an Ollama local model. The default LLM to use is a Deepseek model (9GB), but you can use any Ollama model available.
Execute the following command to execute Ollama and Open Web UI:
make upThe web UI of Ollama should be available at http://localhost:3002.
If you want to change the default Ollama model, you can create a file named .env in the root directory of the
project with the LLM_MODEL variable with the correct name of the model. See
the .env.example file in the repo for an example.
This is a basic interaction diagram of the application:
flowchart LR
Customer(("👤 Customer"))
LLM["🤖 LLM<br/>(transforms text into a JSON order object)"]
API["Fast Food API"]
Kitchen["Kitchen Service"]
Customer --->|"Order text:<br/>''One hamburger<br/>and a coke please''"| API
API -->|"generateJson(orderText)"| LLM
LLM -.->|"JSON order object response"| API
API -->|"prepareMeal(jsonOrder)"| Kitchen
To start the application, execute the following command:
make runTo run the tests, you can type:
make testNOTE: If you don't know or don't want to install sbtn server, you can replace the command sbtn with sbt in the
Makefile.