Proxmox Virtual Environment (VE) 8.2.4 – how to use an API to use more tooling and applications with your first local ‚Meta Llama 3‘ Large Language Model (LLM) project without the need for a GPU


Generate a response for a given prompt with a provided model this is a streaming endpoint so there will be a series of responses the final response object will include statistics and additional data from the request

root@pve-ai-llm-01:~# ollama run llama3
>>> Why is the sky blue?
A classic question!
The sky appears blue because of a phenomenon called scattering, which occurs when sunlight interacts with tiny molecules of gases in the Earth’s
atmosphere. Here’s what happens:
1. **Sunlight enters the atmosphere**: When the sun emits light, it travels through space and reaches our atmosphere as a broad spectrum of colors,
including all the colors of the rainbow.
2. **Atmospheric gases scatter shorter wavelengths**: The tiny molecules of gases like nitrogen (N2) and oxygen (O2) in the atmosphere are much smaller
than the wavelength of visible light. When sunlight hits these molecules, they scatter the shorter wavelengths of light, such as blue and violet, more
efficiently than the longer wavelengths.
3. **Scattered light reaches our eyes**: The scattered blue light is then dispersed throughout the atmosphere, reaching our eyes from all directions.
This is why the sky typically appears blue during the daytime when the sun is overhead.
In contrast, longer wavelengths of light, like red and orange, are not scattered as much by the atmospheric gases. Instead, they continue to travel in a
more direct path to our eyes, which is why we often see these colors more prominently at sunrise and sunset, when the sun’s rays have to travel through
more of the Earth’s atmosphere.
**Other factors that influence sky color**
1. **Dust and water vapor**: Tiny particles like dust, smoke, and water droplets in the air can scatter light in different ways, changing the apparent
color of the sky.
2. **Clouds**: Clouds can reflect and scatter light, making the sky appear whiter or grayer.
3. **Atmospheric conditions**: Weather patterns, pollution, and other environmental factors can also affect the color of the sky.
So, to summarize: the blue color of the sky is primarily due to the scattering of sunlight by tiny atmospheric molecules, with some additional influences
from dust, water vapor, clouds, and other environmental factors.
>>> Send a message (/? for help)
root@pve-ai-llm-01:~# curl http://localhost:11434/api/generate -d ‚{
„model“: „llama3“,
„prompt“: „Why is the sky blue?“
}‘
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:20.5254174Z“,“response“:“What“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:20.764044017Z“,“response“:“ a“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:21.002926913Z“,“response“:“ great“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:21.241939833Z“,“response“:“ question“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:21.481840486Z“,“response“:“!\n\n“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:21.720590718Z“,“response“:“The“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:21.96073151Z“,“response“:“ sky“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:22.200494742Z“,“response“:“ appears“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:22.440236323Z“,“response“:“ blue“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:22.679333581Z“,“response“:“ because“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:22.917857102Z“,“response“:“ of“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:23.157980489Z“,“response“:“ a“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:23.398140226Z“,“response“:“ phenomenon“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:23.638201242Z“,“response“:“ called“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:23.87855537Z“,“response“:“ Ray“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:24.118423247Z“,“response“:“leigh“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:24.357496227Z“,“response“:“ scattering“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:24.598590693Z“,“response“:“,“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:24.840595008Z“,“response“:“ named“,“done“:false}
{„model“:“llama3″,“created_at“:“2024-07-01T13:08:25.082202725Z“,“response“:“ after“,“done“:false}

Leave a Reply

You must be logged in to post a comment.