OctoAI Logo
Back to demos & webinarsRecipe generator app with Llama 2 and OctoAI SDK
ToolsOctoAI Python SDK
ModelLLama 2 13B Chat
Date PublishedJan 25, 2024
PublisherThierry Moreau

Recipe generator app with Llama 2 and OctoAI SDK

Learn how to use OctoAI to build a recipe generator using Llama 2 13B chat for language understanding and processing. See how LLMs can be incorporated into apps for logic, reasoning, and user engagement. You will be using the OctoAI Python SDK and Llama 2 endpoints.

Repo

A screenshot showing an example output from Recipe Generator app of a recipe for Lemon Egg Butter Cake with ingredients and instructions

Clone and expand upon our app

We built a new app, Recipe Generator, that utilizes the OctoAI SDK. OctoAI APIs are compatible with OpenAI APIs, so you could use OpenAI's SDK if you already have it. This app can create a delicious recipe based on the items in your pantry – or whatever the user inputs. It parses the data from the user, and outputs a friendly recipe with the list of ingredients and fun closing message. You can use this as-is or expand upon this simple example to test ideas for your use case.

Prerequisites

Before trying to setup or run this app you will need to do the following:

For more details on setting up Python, see below.

Setup Python virtual environment:

python

Install the pip requirements in your local Python virtual environment:

python

Run the app

You need to execute the main script in your terminal:

  • Run recipe_generator.py to chat with the LLM endpoint

python

Share what you build

We are excited to see what you build – feel free to show us in our Discord, and see what other community members are creating.

Your choice of models on our SaaS or in your environment

Run any model or checkpoint on our efficient, reliable, and customizable API endpoints. Sign up and start building in minutes.