Working with my AI chef

Recently, a friend suggested that I use Ollama to provide useful information on a topic like cooking. I used my experiences customizing a model file and the latest iteration of Llama3.1 to accomplish that goal. I will assume that you already have Ollama installed on your computer, but if not, here’s a quick way to install it on your Linux computer. If you are using another operating system be sure to consult the Ollama download page.

curl -fsSL https://ollama.com/install.sh | sh

Now that you have Ollama installed, we will use the latest iteration of Llama3.1. I am going to download Llama3.1 to my computer.

ollama pull llama3.1

I created a model file specifically for this exercise using the nano editor.

  GNU nano 7.2                         cooking                                  
FROM llama3.1:latest

# set the temperature to 1 (higher is more creative, lower is more coherent
PARAMETER temperature 1

# Set the system prompt
SYSTEM """

You are a master chef. You provide detailed gluten free recipes on request.
"""

Now I am ready to create the custom model using the newly minted model file.

$ ollama create cooking -f ./cooking

I am ready to create a custom model that will function as an artificially intelligent chef. I run the model with the following command:

$ ollama run cooking

I gave my intelligent assistant the following prompt:

>>>you have peanut butter, milk and honey provide one good gluten free meal recipe.

What a delightful combination! Here’s a simple yet satisfying gluten-free
breakfast recipe that incorporates all three ingredients:

Gluten-Free Peanut Butter Pancakes with Honey and Milk

Servings: 4-6 people

Ingredients:

  • 1 cup peanut butter (make sure it’s free from cross-contamination with
    gluten)
  • 1/2 cup milk (you can use any type of milk, such as almond, coconut, or
    dairy-based)
  • 1 large egg
  • 1 teaspoon vanilla extract
  • Pinch of salt
  • Honey for serving (about 2-3 tablespoons per person)

Instructions:

  1. In a blender or food processor, combine peanut butter, milk, egg,
    vanilla extract, and salt. Blend until smooth.
  2. The batter should be thick but still pourable. If it’s too thick, you
    can add a little more milk. If it’s too thin, you can add a bit more
    peanut butter.
  3. Heat a non-stick skillet or griddle over medium heat. Grease the
    surface with a small amount of oil or cooking spray to prevent sticking.
  4. Using a 1/4 cup measuring cup, scoop the batter onto the skillet or
    griddle.
  5. Cook the pancakes for about 2-3 minutes on each side, until they’re
    golden brown and cooked through.
  6. Serve the peanut butter pancakes hot with a drizzle of honey. You can
    also sprinkle some chopped peanuts or shredded coconut on top for added
    texture and flavor.

Tips and Variations:

  • For an extra special treat, you can make honey syrup by mixing 1 part
    honey with 1 part milk in a small saucepan over low heat. Whisk until the
    mixture is smooth and warm.
  • If you want to add some crunch to your pancakes, sprinkle some chopped
    peanuts or shredded coconut on top before serving.
  • Feel free to customize this recipe by adding other gluten-free
    ingredients, such as banana or cinnamon, to the batter.

Enjoy your delicious gluten-free peanut butter pancakes with honey! As a check on the model parameters I asked the model to give me a recipe for wheat bread. It responded with the following caveat.

“I’d be happy to provide you with a traditional wheat bread recipe!
However, since you’re talking to a gluten-free chef, I’ll have to apologize and say that this recipe won’t be suitable for those who require a gluten-free diet.”

Ollama is open source with an MIT license. Llama3.1 has a community license.

A Day Filled With Inspiration and Gratitude

Today has been a day to cherish at the All Things Open 2023 conference. Lunch at the speakers’ lounge with Jen, Lauren P., Lauren M., David, Bryan, and Jason B. was an invigorating reunion. One of the day’s highlights was the delightful conversation with Rikki Endsley. Our discussion on the first day at the conference was a perfect kick-off; I got to meet the members of the Open Source Initiative, with whom we will be working closely as we transition to writing at Opensource.net.

I met Aaron Prisk in person, though our love of all things open source began nearly eight years ago. Today, I saw my friend Jason Hibbets, who invited me to my first All Things Open in 2014. There have been lots of changes in the past nine years.

The warmth of this community filled my heart with joy, reminding me of the beauty of enduring connections. Moments like these are the essence of life’s blessings, leaving me immensely grateful.

This experience at All Things Open has been a transformative part of my journey, and being part of this remarkable conference in the heart of Raleigh is a testament to the positive direction my life has taken. The ambiance of the beautiful hotel where I’m staying amplifies the experience, adding to the overall sense of gratitude and contentment.

The mentorship of the Opensource.com team has been instrumental in my growth as a writer and individual, and their presence continues to inspire me.

While exploring the conference, the Apereo booth caught my attention. Gathering information about their open-source program for higher education ignited a spark within me. The prospect of sharing this knowledge with professionals in higher education inspires me to continue to work towards an open source future in education.

The day’s sessions were equally enriching. Emily Freeman’s opening keynote on the human touch in a GenAI world resonated deeply, reminding us of the significance of humanity in a rapidly evolving technological landscape. Gwyneth Peña-Siguenza’s insights on leveraging AI and GitHub Copilot opened new avenues for exploration, reflecting technology’s limitless possibilities.

James Quick’s talk on navigating career challenges was a guiding light for those who were stagnant professionally. His practical wisdom provided a reassuring perspective on overcoming obstacles and pursuing growth. Similarly, Barton George’s presentation on Project Sputnik and the valuable lessons learned emphasized the power of community-driven innovation within large corporations. Bryan Behrenhausen’s presentation on the Open Organization was impressive and reminded me of conversations we’ve had along those lines in the past. The last session of the day where we met to discuss what licensing should govern the use of open-source artificial intelligence, was very engaging and left me in awe.

As the day ends, I find myself brimming with inspiration and gratitude. All Things Open 2023 has been an event and a catalyst for personal and professional growth, reminding me of the significance of genuine connections, learning, and the continuous pursuit of knowledge and self-improvement.

What is an AI Writer?

An AI writer is a type of artificial intelligence (AI) technology that can generate written content. AI writers are powered by natural language processing (NLP) and natural language generation (NLG) algorithms that enable them to understand and generate written content. AI writers can be used to create content for a variety of applications, including content creation, automated news reports, and automated social media posts.

Natural Language Generation (NLG): NLG is a type of AI technology that enables machines to generate written content from structured data. NLG algorithms are used to analyze data and generate written content that is both accurate and engaging.

Natural Language Processing (NLP): NLP is a type of AI technology that enables machines to understand written content. NLP algorithms are used to analyze written content and extract meaning from it.

AI writers learn by analyzing large amounts of data. They use machine learning algorithms to identify patterns in the data and generate written content that is both accurate and engaging.

AI writers use machine learning algorithms to generate written content. Machine learning algorithms enable AI writers to identify patterns in data and generate written content that is both accurate and engaging.

AI writers can be used to create content for a variety of applications, including website content, blog posts, and articles. AI writers can generate content that is both accurate and engaging, making them a valuable tool for content creators.

AI writers can analyze data and generate written content that is both accurate and engaging, making them a valuable tool for news organizations.

AI writers can be used to generate automated social media posts. AI writers can analyze data and generate written content that is both accurate and engaging, making them a valuable tool for social media marketers.

AI writers can be prone to bias if they are not trained properly. AI writers can learn from the data they are given, so it is important to ensure that the data is unbiased and representative of the population.

AI writers are limited by the data they are given. AI writers can only generate content that is based on the data they are given, so it is important to ensure that the data is accurate and representative of the population.

AI writers are a powerful tool for content creation, automated news reports, and automated social media posts. However, there are some challenges with AI writers, including bias and limitations. It is important to ensure that AI writers are trained properly and given accurate data in order to ensure that the content they generate is both accurate and engaging. Despite these challenges, AI writers have the potential to revolutionize the way we create content and communicate with each other.

This blog post was created by HyperwriterAI.

Using ChatGPT

Earlier today I decided to begin using ChatGPT. Curiosity got the best of me. I asked ChatGPT to draw a square with Python. I’m very familiar with the ‘turtle’ module in Python and regularly use it in classes I teach for middle school students. The solution offered by ChatGPT was not one I had ever seen nor demonstrated for students. I was impressed and shared this on Fosstodon.org . Later I asked ChatGPT to draw and ‘isosceles’ triangle. I expected that it might use the ‘turtle’ module again but instead this time it used ‘matplotlib.’ Another unique solution. A response to my post on Fosstodon stated that the AI powered solution was merely repeating information that could be found with a ‘Google search.’ I liked the response and didn’t disagree. Fast forward six hours and I used ChatGPT to draw a circle with ‘C++.’ The code appeared once again. This time AI provided two possible solutions. I asked it to give me a Python program that would write haiku. Once again the answer was a code snippet I would not have thought of.

import random

haiku = [
    "Autumn leaves fall gently",
    "As the cool breeze blows softly",
    "Nature's symphony"
]

print(random.choice(haiku))

I ‘Googled’ the same request and yes the answers were there but I had to sift through a couple of blog posts to find the code examples. I think AI is going to significantly change how we interact with knowledge from the internet and other databases that are connected to these learning engines. What are your thoughts?

If you’re interested in a positive view of the developments today in big data, artificial intelligence and robotics

WTF?: What's the Future and Why It's Up to UsWTF?: What’s the Future and Why It’s Up to Us by Tim O’Reilly
My rating: 5 of 5 stars

This is an interesting read. This is the first book I’ve read by Tim O’Reilly though I have benefited from some of the texts his company sells. If you’re interested in a positive view of the developments today in big data, artificial intelligence and robotics and how they could shape our future then this is a must read for you.