Sign up
Log in
Sign up
Log in
On-demand webinar
Learn from our technical deep dive into using function calling to develop AI agents.
Watch now
Back to demos & webinars
Tools

OctoAI Python SDK

Model

LLama 2 13B Chat

Date Published

Jan 25, 2024

Publisher

Thierry Moreau

Back to demos & webinars

Recipe generator app with Llama 2 and OctoAI SDK

Tools

OctoAI Python SDK

Model

LLama 2 13B Chat

Date Published

Jan 25, 2024

Publisher

Thierry Moreau

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

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:

python3 -m venv .venv
source .venv/bin/activate

Install the pip requirements in your local Python virtual environment:

python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt

Run the app

You need to execute the main script in your terminal:

  • Run recipe_generator.py to chat with the LLM endpoint

python3 recipe_generator.py

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.

Sign Up Today