Skip to content

HivemindTechnologies/fast-food-llm-orders

Repository files navigation

Fast Food LLM Application

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.

Installation

Execute the following command to execute Ollama and Open Web UI:

make up

The 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.

Architecture Idea

This is a basic interaction diagram of the application:

flowchart LR
    Customer(("👤 Customer"))

    LLM["🤖&nbsp;&nbsp;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
Loading

Usage

To start the application, execute the following command:

make run

To run the tests, you can type:

make test

NOTE: If you don't know or don't want to install sbtn server, you can replace the command sbtn with sbt in the Makefile.

About

Sample repo with a Scala API to process text orders into API calls for fast food restaurant using a local LLM with Ollama

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages