|
@@ -69,7 +69,7 @@ Enable JSON mode by setting the `format` parameter to `json`. This will structur
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/generate -d '{
|
|
curl http://localhost:11434/api/generate -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"prompt": "Why is the sky blue?"
|
|
"prompt": "Why is the sky blue?"
|
|
}'
|
|
}'
|
|
```
|
|
```
|
|
@@ -80,7 +80,7 @@ A stream of JSON objects is returned:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T08:52:19.385406455-07:00",
|
|
"created_at": "2023-08-04T08:52:19.385406455-07:00",
|
|
"response": "The",
|
|
"response": "The",
|
|
"done": false
|
|
"done": false
|
|
@@ -102,7 +102,7 @@ To calculate how fast the response is generated in tokens per second (token/s),
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"response": "",
|
|
"response": "",
|
|
"done": true,
|
|
"done": true,
|
|
@@ -124,7 +124,7 @@ A response can be received in one reply when streaming is off.
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/generate -d '{
|
|
curl http://localhost:11434/api/generate -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"prompt": "Why is the sky blue?",
|
|
"prompt": "Why is the sky blue?",
|
|
"stream": false
|
|
"stream": false
|
|
}'
|
|
}'
|
|
@@ -136,7 +136,7 @@ If `stream` is set to `false`, the response will be a single JSON object:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"response": "The sky is blue because it is the color of the sky.",
|
|
"response": "The sky is blue because it is the color of the sky.",
|
|
"done": true,
|
|
"done": true,
|
|
@@ -194,7 +194,7 @@ curl http://localhost:11434/api/generate -d '{
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/generate -d '{
|
|
curl http://localhost:11434/api/generate -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"prompt": "What color is the sky at different times of the day? Respond using JSON",
|
|
"prompt": "What color is the sky at different times of the day? Respond using JSON",
|
|
"format": "json",
|
|
"format": "json",
|
|
"stream": false
|
|
"stream": false
|
|
@@ -205,7 +205,7 @@ curl http://localhost:11434/api/generate -d '{
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-11-09T21:07:55.186497Z",
|
|
"created_at": "2023-11-09T21:07:55.186497Z",
|
|
"response": "{\n\"morning\": {\n\"color\": \"blue\"\n},\n\"noon\": {\n\"color\": \"blue-gray\"\n},\n\"afternoon\": {\n\"color\": \"warm gray\"\n},\n\"evening\": {\n\"color\": \"orange\"\n}\n}\n",
|
|
"response": "{\n\"morning\": {\n\"color\": \"blue\"\n},\n\"noon\": {\n\"color\": \"blue-gray\"\n},\n\"afternoon\": {\n\"color\": \"warm gray\"\n},\n\"evening\": {\n\"color\": \"orange\"\n}\n}\n",
|
|
"done": true,
|
|
"done": true,
|
|
@@ -327,7 +327,7 @@ If you want to set custom options for the model at runtime rather than in the Mo
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/generate -d '{
|
|
curl http://localhost:11434/api/generate -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"prompt": "Why is the sky blue?",
|
|
"prompt": "Why is the sky blue?",
|
|
"stream": false,
|
|
"stream": false,
|
|
"options": {
|
|
"options": {
|
|
@@ -368,7 +368,7 @@ curl http://localhost:11434/api/generate -d '{
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"response": "The sky is blue because it is the color of the sky.",
|
|
"response": "The sky is blue because it is the color of the sky.",
|
|
"done": true,
|
|
"done": true,
|
|
@@ -390,7 +390,7 @@ If an empty prompt is provided, the model will be loaded into memory.
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/generate -d '{
|
|
curl http://localhost:11434/api/generate -d '{
|
|
- "model": "llama3.1"
|
|
|
|
|
|
+ "model": "llama3.2"
|
|
}'
|
|
}'
|
|
```
|
|
```
|
|
|
|
|
|
@@ -400,7 +400,7 @@ A single JSON object is returned:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-12-18T19:52:07.071755Z",
|
|
"created_at": "2023-12-18T19:52:07.071755Z",
|
|
"response": "",
|
|
"response": "",
|
|
"done": true
|
|
"done": true
|
|
@@ -415,7 +415,7 @@ If an empty prompt is provided and the `keep_alive` parameter is set to `0`, a m
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/generate -d '{
|
|
curl http://localhost:11434/api/generate -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"keep_alive": 0
|
|
"keep_alive": 0
|
|
}'
|
|
}'
|
|
```
|
|
```
|
|
@@ -426,7 +426,7 @@ A single JSON object is returned:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2024-09-12T03:54:03.516566Z",
|
|
"created_at": "2024-09-12T03:54:03.516566Z",
|
|
"response": "",
|
|
"response": "",
|
|
"done": true,
|
|
"done": true,
|
|
@@ -472,7 +472,7 @@ Send a chat message with a streaming response.
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/chat -d '{
|
|
curl http://localhost:11434/api/chat -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"messages": [
|
|
"messages": [
|
|
{
|
|
{
|
|
"role": "user",
|
|
"role": "user",
|
|
@@ -488,7 +488,7 @@ A stream of JSON objects is returned:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T08:52:19.385406455-07:00",
|
|
"created_at": "2023-08-04T08:52:19.385406455-07:00",
|
|
"message": {
|
|
"message": {
|
|
"role": "assistant",
|
|
"role": "assistant",
|
|
@@ -503,7 +503,7 @@ Final response:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"done": true,
|
|
"done": true,
|
|
"total_duration": 4883583458,
|
|
"total_duration": 4883583458,
|
|
@@ -521,7 +521,7 @@ Final response:
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/chat -d '{
|
|
curl http://localhost:11434/api/chat -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"messages": [
|
|
"messages": [
|
|
{
|
|
{
|
|
"role": "user",
|
|
"role": "user",
|
|
@@ -536,7 +536,7 @@ curl http://localhost:11434/api/chat -d '{
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-12-12T14:13:43.416799Z",
|
|
"created_at": "2023-12-12T14:13:43.416799Z",
|
|
"message": {
|
|
"message": {
|
|
"role": "assistant",
|
|
"role": "assistant",
|
|
@@ -560,7 +560,7 @@ Send a chat message with a conversation history. You can use this same approach
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/chat -d '{
|
|
curl http://localhost:11434/api/chat -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"messages": [
|
|
"messages": [
|
|
{
|
|
{
|
|
"role": "user",
|
|
"role": "user",
|
|
@@ -584,7 +584,7 @@ A stream of JSON objects is returned:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T08:52:19.385406455-07:00",
|
|
"created_at": "2023-08-04T08:52:19.385406455-07:00",
|
|
"message": {
|
|
"message": {
|
|
"role": "assistant",
|
|
"role": "assistant",
|
|
@@ -598,7 +598,7 @@ Final response:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"created_at": "2023-08-04T19:22:45.499127Z",
|
|
"done": true,
|
|
"done": true,
|
|
"total_duration": 8113331500,
|
|
"total_duration": 8113331500,
|
|
@@ -656,7 +656,7 @@ curl http://localhost:11434/api/chat -d '{
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/chat -d '{
|
|
curl http://localhost:11434/api/chat -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"messages": [
|
|
"messages": [
|
|
{
|
|
{
|
|
"role": "user",
|
|
"role": "user",
|
|
@@ -674,7 +674,7 @@ curl http://localhost:11434/api/chat -d '{
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2023-12-12T14:13:43.416799Z",
|
|
"created_at": "2023-12-12T14:13:43.416799Z",
|
|
"message": {
|
|
"message": {
|
|
"role": "assistant",
|
|
"role": "assistant",
|
|
@@ -696,7 +696,7 @@ curl http://localhost:11434/api/chat -d '{
|
|
|
|
|
|
```
|
|
```
|
|
curl http://localhost:11434/api/chat -d '{
|
|
curl http://localhost:11434/api/chat -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"messages": [
|
|
"messages": [
|
|
{
|
|
{
|
|
"role": "user",
|
|
"role": "user",
|
|
@@ -735,7 +735,7 @@ curl http://localhost:11434/api/chat -d '{
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at": "2024-07-22T20:33:28.123648Z",
|
|
"created_at": "2024-07-22T20:33:28.123648Z",
|
|
"message": {
|
|
"message": {
|
|
"role": "assistant",
|
|
"role": "assistant",
|
|
@@ -771,7 +771,7 @@ If the messages array is empty, the model will be loaded into memory.
|
|
|
|
|
|
```
|
|
```
|
|
curl http://localhost:11434/api/chat -d '{
|
|
curl http://localhost:11434/api/chat -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"messages": []
|
|
"messages": []
|
|
}'
|
|
}'
|
|
```
|
|
```
|
|
@@ -779,7 +779,7 @@ curl http://localhost:11434/api/chat -d '{
|
|
##### Response
|
|
##### Response
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at":"2024-09-12T21:17:29.110811Z",
|
|
"created_at":"2024-09-12T21:17:29.110811Z",
|
|
"message": {
|
|
"message": {
|
|
"role": "assistant",
|
|
"role": "assistant",
|
|
@@ -798,7 +798,7 @@ If the messages array is empty and the `keep_alive` parameter is set to `0`, a m
|
|
|
|
|
|
```
|
|
```
|
|
curl http://localhost:11434/api/chat -d '{
|
|
curl http://localhost:11434/api/chat -d '{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"messages": [],
|
|
"messages": [],
|
|
"keep_alive": 0
|
|
"keep_alive": 0
|
|
}'
|
|
}'
|
|
@@ -810,7 +810,7 @@ A single JSON object is returned:
|
|
|
|
|
|
```json
|
|
```json
|
|
{
|
|
{
|
|
- "model": "llama3.1",
|
|
|
|
|
|
+ "model": "llama3.2",
|
|
"created_at":"2024-09-12T21:33:17.547535Z",
|
|
"created_at":"2024-09-12T21:33:17.547535Z",
|
|
"message": {
|
|
"message": {
|
|
"role": "assistant",
|
|
"role": "assistant",
|
|
@@ -989,7 +989,7 @@ Show information about a model including details, modelfile, template, parameter
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/show -d '{
|
|
curl http://localhost:11434/api/show -d '{
|
|
- "name": "llama3.1"
|
|
|
|
|
|
+ "name": "llama3.2"
|
|
}'
|
|
}'
|
|
```
|
|
```
|
|
|
|
|
|
@@ -1050,7 +1050,7 @@ Copy a model. Creates a model with another name from an existing model.
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/copy -d '{
|
|
curl http://localhost:11434/api/copy -d '{
|
|
- "source": "llama3.1",
|
|
|
|
|
|
+ "source": "llama3.2",
|
|
"destination": "llama3-backup"
|
|
"destination": "llama3-backup"
|
|
}'
|
|
}'
|
|
```
|
|
```
|
|
@@ -1105,7 +1105,7 @@ Download a model from the ollama library. Cancelled pulls are resumed from where
|
|
|
|
|
|
```shell
|
|
```shell
|
|
curl http://localhost:11434/api/pull -d '{
|
|
curl http://localhost:11434/api/pull -d '{
|
|
- "name": "llama3.1"
|
|
|
|
|
|
+ "name": "llama3.2"
|
|
}'
|
|
}'
|
|
```
|
|
```
|
|
|
|
|