explain ollama serve command

This commit is contained in:
rasbt
2024-06-06 06:42:54 -05:00
parent ba1c1e74aa
commit d271f317e0

View File

@@ -148,7 +148,7 @@
"id": "0b5addcb-fc7d-455d-bee9-6cc7a0d684c7",
"metadata": {},
"source": [
"- Leave this terminal and `ollama` session running for the next steps (you can exit the `ollama` session later by entering the prompt /bye`)"
"- You can end this session using the input `/bye`"
]
},
{
@@ -164,7 +164,9 @@
"id": "89343a84-0ddc-42fc-bf50-298a342b93c0",
"metadata": {},
"source": [
"- Now, an alternative way to interact with the model is via its REST API in Python via the following function (the URL is a `ollama` default):"
"- Now, an alternative way to interact with the model is via its REST API in Python via the following function\n",
"- First, in your terminal, start a local ollama server via `ollama serve` (after executing the code in this notebook, you can later stop this session by simply closing the terminal)\n",
"- Next, run the following code cell to query the model"
]
},
{
@@ -177,17 +179,24 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Llamas are ruminant animals, which means they have a four-chambered stomach and are designed to eat plant-based foods. In the wild, llamas primarily feed on:\n",
"Llamas are ruminant animals, which means they have a four-chambered stomach and eat plants. Their diet typically consists of:\n",
"\n",
"1. Grasses: They love to graze on various types of grasses, including tall grasses, short grasses, and even weeds.\n",
"2. Leaves: Llamas enjoy munching on leaves from trees and shrubs, like willow, alder, and birch.\n",
"3. Fruits: They'll eat fruits like apples, berries, and corn, as long as they're not too ripe or rotten.\n",
"4. Hay: In captivity, llamas are often fed hay, such as timothy grass, alfalfa, or oat hay, which is a staple in their diet.\n",
"5. Grains: Some llamas may be given grains like oats, barley, or corn as treats or supplements.\n",
"1. Grasses: Llamas love to graze on grasses, including tall grasses, meadow grasses, and wheat.\n",
"2. Hay: High-quality hay is a staple in an llama's diet. They enjoy timothy hay, alfalfa hay, and other types of hay.\n",
"3. Grains: Whole grains like oats, barley, and corn are also part of their diet.\n",
"4. Fruits and vegetables: Llamas will eat fruits like apples, carrots, and sweet potatoes as a treat or to supplement their diet.\n",
"5. Minerals: They need access to loose minerals like salt, calcium, and phosphorus to stay healthy.\n",
"\n",
"In general, llamas are browsers and grazers, meaning they prefer to eat plants that grow above ground (like leaves and fruits) rather than those growing below ground (like roots). They have a unique digestive system that allows them to break down cellulose in plant cell walls, making them efficient at converting plant material into energy.\n",
"In the wild, llamas might also eat:\n",
"\n",
"It's worth noting that the specific diet of llamas can vary depending on factors like age, breed, climate, and availability of food sources. If you're considering keeping llamas as pets or using them for packing, it's essential to provide a balanced and nutritious diet that meets their nutritional needs. Consult with a veterinarian or an experienced llama breeder for guidance on creating the best diet plan for your llamas!\n"
"* Leaves from shrubs and trees\n",
"* Bark (in some cases)\n",
"* Seeds\n",
"* Fungi\n",
"\n",
"Domesticated llamas usually have a more controlled diet, as their owners provide them with specific foods and supplements to ensure they receive the nutrients they need. A balanced diet for an llama typically includes 15-20% hay, 10-15% grains, and 5-10% fruits and vegetables.\n",
"\n",
"Remember, always consult with a veterinarian or experienced llama breeder to determine the best diet for your individual llama!\n"
]
}
],
@@ -636,7 +645,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.11.4"
}
},
"nbformat": 4,