{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "It is subjective to determine the \"best\" French cheese as it depends on personal preferences. Here are a few famous French cheeses that are highly regarded and beloved by many:\n", "\n", "1. Roquefort: A blue-veined cheese originating from the Massif Central region in France. It is made from sheep's milk and has a strong, pungent taste and a distinctive vegetal aftertaste.\n", "\n", "2. Camembert: A soft, creamy, and tangy cheese from Normandy. It is made from cow's milk and is known for its distinctive white mold rind.\n", "\n", "3. Comté: A firm, nutty, and slightly sweet cheese from the Franche-Comté region in eastern France. It is made from unpasteurized cow's milk and is often referred to as the \"King of French Cheeses.\"\n", "\n", "4. Brie de Meaux: A soft, creamy, and buttery cheese from the Île-de-France region. It is made from cow's milk and is known for its edible white rind and mild, velvety flavor.\n", "\n", "5. Munster: A smelly, soft, and runny cheese from the Alsace region, near the German border. It is made from cow's milk and has a pungent, sulfurous aroma and a strong, tangy flavor.\n", "\n", "Ultimately, the best French cheese for you will depend on your personal taste preferences and dietary restrictions. It's always a good idea to try a variety of French cheeses to find your favorite.\n" ] } ], "source": [ "from mistralai.client import MistralClient\n", "from mistralai.models.chat_completion import ChatMessage\n", "\n", "api_key = \"Yb2kAF0DR4Mva5AEmoYFV3kYRAKdXB7i\"\n", "model = \"mistral-tiny\"\n", "\n", "client = MistralClient(api_key=api_key)\n", "\n", "messages = [\n", " ChatMessage(role=\"user\", content=\"What is the best French cheese?\")\n", "]\n", "\n", "# No streaming\n", "chat_response = client.chat(\n", " model=model,\n", " messages=messages,\n", ")\n", "\n", "print(chat_response.choices[0].message.content)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 2 }