Ferrxni commited on
Commit
927bd19
·
1 Parent(s): 1592266

first commit

Browse files
Files changed (2) hide show
  1. README.md +0 -0
  2. mistral.ipynb +72 -0
README.md ADDED
File without changes
mistral.ipynb ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "name": "stdout",
10
+ "output_type": "stream",
11
+ "text": [
12
+ "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",
13
+ "\n",
14
+ "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",
15
+ "\n",
16
+ "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",
17
+ "\n",
18
+ "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",
19
+ "\n",
20
+ "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",
21
+ "\n",
22
+ "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",
23
+ "\n",
24
+ "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"
25
+ ]
26
+ }
27
+ ],
28
+ "source": [
29
+ "from mistralai.client import MistralClient\n",
30
+ "from mistralai.models.chat_completion import ChatMessage\n",
31
+ "\n",
32
+ "api_key = \"Yb2kAF0DR4Mva5AEmoYFV3kYRAKdXB7i\"\n",
33
+ "model = \"mistral-tiny\"\n",
34
+ "\n",
35
+ "client = MistralClient(api_key=api_key)\n",
36
+ "\n",
37
+ "messages = [\n",
38
+ " ChatMessage(role=\"user\", content=\"What is the best French cheese?\")\n",
39
+ "]\n",
40
+ "\n",
41
+ "# No streaming\n",
42
+ "chat_response = client.chat(\n",
43
+ " model=model,\n",
44
+ " messages=messages,\n",
45
+ ")\n",
46
+ "\n",
47
+ "print(chat_response.choices[0].message.content)"
48
+ ]
49
+ }
50
+ ],
51
+ "metadata": {
52
+ "kernelspec": {
53
+ "display_name": "Python 3",
54
+ "language": "python",
55
+ "name": "python3"
56
+ },
57
+ "language_info": {
58
+ "codemirror_mode": {
59
+ "name": "ipython",
60
+ "version": 3
61
+ },
62
+ "file_extension": ".py",
63
+ "mimetype": "text/x-python",
64
+ "name": "python",
65
+ "nbconvert_exporter": "python",
66
+ "pygments_lexer": "ipython3",
67
+ "version": "3.11.5"
68
+ }
69
+ },
70
+ "nbformat": 4,
71
+ "nbformat_minor": 2
72
+ }