DEV Community

El Bruno for Microsoft Azure

Posted on • Originally published at elbruno.com on

4

#SemanticKernel and GPT-4o: Image analysis labs in C#

Hi!

Introduction to GPT-4o

GPT-4o, developed by OpenAI, represents a significant leap forward in AI technology. Dubbed “omni” for its all-encompassing capabilities, GPT-4o is a multimodal model that can process and generate text, audio, and images.

It’s designed to facilitate more natural human-computer interactions, responding to audio inputs in as little as 232 milliseconds. This model is not only faster but also 50% cheaper to use in the API, making it a cost-effective solution for developers and businesses alike.

Sample GitHub Repository

I decided to test some of the new features, and created this repository with some samples using Semantic Kernel and the new GPT-4o model.

https://github.com/elbruno/gpt4ol-sk-csharp/

Repository Content

The repo describes the basic steps to set up and utilize the GPT-4o model with .NET. The repository includes sample code, and links to further reading materials.

The initial demo shows how to use GPT-4o to analyze the following image:

rpi shell console showing the rapsberry pi information with the tool neofetch

With the following output:


The image appears to be a screenshot of a terminal window running on a Raspberry Pi device. The user has executed the `neofetch` command with `sudo`, and the terminal displayed system information. Additionally, the `ollama list` command was executed, showing a list of local models.

Here's the breakdown of the terminal output:

### System Information (Neofetch Output)
- **OS:** Debian GNU/Linux 12 (bookworm) aarch64
- **Host:** Raspberry Pi 5 Model B Rev 1.0
- **Kernel:** 6.6.20+rpt-rpi-2712
- **Uptime:** 3 mins
- **Packages:** 694 (dpkg)
- **Shell:** bash 5.2.15
- **CPU:** 4 cores @ 2.400GHz
- **Memory:** 640MiB / 8052MiB

### Models List (Ollama List Command Output)
- **llama3:latest**
- **ID:** 71a106a91016
- **Size:** 4.7 GB
- **Modified:** 4 days ago
- **phi3:latest**
- **ID:** a2c89ceaed85
- **Size:** 2.3 GB
- **Modified:** 3 days ago

Enter fullscreen mode Exit fullscreen mode

I’ll keep updating the samples with more scenarios.

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.


Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay