diff --git a/recipes/llama_api_providers/Azure_API_example/azure_api_example.ipynb b/recipes/llama_api_providers/Azure_API_example/azure_api_example.ipynb index 103cf8dab8f1580471b1fcdda5207f341ab529d0..2b8b36178cf5535c8e7ccfb2b7859dabe1c94ff8 100644 --- a/recipes/llama_api_providers/Azure_API_example/azure_api_example.ipynb +++ b/recipes/llama_api_providers/Azure_API_example/azure_api_example.ipynb @@ -96,7 +96,7 @@ "Streaming allows the generated tokens to be sent as data-only server-sent events whenever they become available. \n", "This is extremely important for interactive applications such as chatbots, so the user is always engaged. \n", "\n", - "To use streaming, simply set `\"stream\":\"True\"` as part of the request payload. \n", + "To use streaming, simply set `\"stream\":True` as part of the request payload. \n", "In the streaming mode, the REST API response will be different from non-streaming mode.\n", "\n", "Here is an example: " @@ -108,7 +108,7 @@ "metadata": {}, "outputs": [], "source": [ - "!curl -X POST -L https://your-endpoint.inference.ai.azure.com/v1/chat/completions -H 'Content-Type: application/json' -H 'Authorization: your-auth-key' -d '{\"messages\":[{\"content\":\"You are a helpful assistant.\",\"role\":\"system\"},{\"content\":\"Who wrote the book Innovators dilemma?\",\"role\":\"user\"}], \"max_tokens\": 500, \"stream\": \"True\"}'" + "!curl -X POST -L https://your-endpoint.inference.ai.azure.com/v1/chat/completions -H 'Content-Type: application/json' -H 'Authorization: your-auth-key' -d '{\"messages\":[{\"content\":\"You are a helpful assistant.\",\"role\":\"system\"},{\"content\":\"Who wrote the book Innovators dilemma?\",\"role\":\"user\"}], \"max_tokens\": 500, \"stream\": True}'" ] }, { @@ -170,7 +170,7 @@ " {\"role\":\"user\", \"content\":\"Who wrote the book Innovators dilemma?\"}], \n", " \"max_tokens\": 500,\n", " \"temperature\": 0.9,\n", - " \"stream\": \"True\",\n", + " \"stream\": True,\n", "}\n", "\n", "body = str.encode(json.dumps(data))\n", @@ -230,7 +230,7 @@ " {\"role\":\"user\", \"content\":\"Who wrote the book Innovators dilemma?\"}],\n", " \"max_tokens\": 500,\n", " \"temperature\": 0.9,\n", - " \"stream\": \"True\"\n", + " \"stream\": True\n", "}\n", "\n", "\n",