|
14 | 14 | "cell_type": "code",
|
15 | 15 | "execution_count": 1,
|
16 | 16 | "metadata": {},
|
17 |
| - "outputs": [], |
18 |
| - "source": [ |
19 |
| - "import sys\n", |
20 |
| - "sys.path.append(\"../\")\n", |
21 |
| - "\n", |
22 |
| - "from blueflow import notebooks\n", |
23 |
| - "\n", |
24 |
| - "from blue_options import string\n", |
25 |
| - "from blue_objects import objects\n", |
26 |
| - "\n", |
27 |
| - "from openai_commands.host import signature\n", |
28 |
| - "from openai_commands.logger import logger\n", |
29 |
| - "\n", |
30 |
| - "logger.info(f\"{'.'.join(signature())},\\nbuilt on {string.pretty_date()}\")" |
31 |
| - ] |
32 |
| - }, |
33 |
| - { |
34 |
| - "cell_type": "code", |
35 |
| - "execution_count": 2, |
36 |
| - "metadata": {}, |
37 | 17 | "outputs": [
|
38 | 18 | {
|
39 | 19 | "name": "stderr",
|
40 | 20 | "output_type": "stream",
|
41 | 21 | "text": [
|
42 |
| - " 🛠️ :: abcli-7.2928.1-current, built on 22 March 2024, 19:14:19\n" |
| 22 | + "🛠️ openai_commands-3.209.1.blueflow-4.849.1.abcli-9.486.1.blue_objects-5.281.1.blue_options-4.200.1.torch-2.5.1.Python 3.9.6.Darwin 23.6.0..Jupyter-Notebook,\n", |
| 23 | + "built on 01 February 2025, 11:11:16\n" |
43 | 24 | ]
|
44 | 25 | }
|
45 | 26 | ],
|
46 | 27 | "source": [
|
| 28 | + "import sys\n", |
| 29 | + "sys.path.append(\"../\")\n", |
| 30 | + "\n", |
| 31 | + "from blueflow import notebooks\n", |
| 32 | + "\n", |
47 | 33 | "import json\n",
|
48 |
| - "from abcli import fullname, string\n", |
49 | 34 | "from openai import OpenAI\n",
|
| 35 | + "\n", |
| 36 | + "from blue_options import string\n", |
| 37 | + "from blue_objects import objects\n", |
| 38 | + "\n", |
| 39 | + "from openai_commands.host import signature\n", |
50 | 40 | "from openai_commands import env\n",
|
51 | 41 | "from openai_commands.logger import logger\n",
|
52 | 42 | "\n",
|
53 |
| - "logger.info(f\"{fullname()}, built on {string.pretty_date()}\")" |
| 43 | + "logger.info(f\"{'.'.join(signature())},\\nbuilt on {string.pretty_date()}\")" |
54 | 44 | ]
|
55 | 45 | },
|
56 | 46 | {
|
57 | 47 | "cell_type": "code",
|
58 |
| - "execution_count": 3, |
| 48 | + "execution_count": 2, |
59 | 49 | "metadata": {},
|
60 | 50 | "outputs": [],
|
61 | 51 | "source": [
|
| 52 | + "assert env.OPENAI_API_KEY\n", |
62 | 53 | "client = OpenAI(api_key=env.OPENAI_API_KEY)"
|
63 | 54 | ]
|
64 | 55 | },
|
65 | 56 | {
|
66 | 57 | "cell_type": "code",
|
67 |
| - "execution_count": 4, |
| 58 | + "execution_count": 3, |
68 | 59 | "metadata": {},
|
69 | 60 | "outputs": [],
|
70 | 61 | "source": [
|
|
73 | 64 | },
|
74 | 65 | {
|
75 | 66 | "cell_type": "code",
|
76 |
| - "execution_count": 5, |
| 67 | + "execution_count": 4, |
77 | 68 | "metadata": {},
|
78 | 69 | "outputs": [
|
79 | 70 | {
|
80 | 71 | "name": "stderr",
|
81 | 72 | "output_type": "stream",
|
82 | 73 | "text": [
|
83 |
| - " httpx :: HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n" |
| 74 | + "httpx HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n" |
84 | 75 | ]
|
85 | 76 | }
|
86 | 77 | ],
|
|
98 | 89 | },
|
99 | 90 | {
|
100 | 91 | "cell_type": "code",
|
101 |
| - "execution_count": 6, |
| 92 | + "execution_count": 5, |
102 | 93 | "metadata": {},
|
103 | 94 | "outputs": [
|
104 | 95 | {
|
105 | 96 | "name": "stderr",
|
106 | 97 | "output_type": "stream",
|
107 | 98 | "text": [
|
108 |
| - " 🛠️ :: [\n", |
| 99 | + "🛠️ [\n", |
109 | 100 | " {\n",
|
110 | 101 | " \"finish_reason\": \"stop\",\n",
|
111 | 102 | " \"index\": 0,\n",
|
| 103 | + " \"logprobs\": null,\n", |
112 | 104 | " \"message\": {\n",
|
113 |
| - " \"content\": \"Mathematics is a field of study that deals with the properties and relationships of numbers, quantities, shapes, and patterns. It involves the use of logic and reasoning to solve problems and understand the fundamental concepts of the universe. Mathematics is a universal language that is used across various disciplines such as science, engineering, economics, and computer science. It is divided into various branches such as algebra, geometry, calculus, statistics, and number theory, each with its own set of rules and principles. Mathematics plays a crucial role in our everyday lives, from simple calculations to complex scientific theories. It allows us to make sense of the world around us and make informed decisions based on data and evidence.\",\n", |
| 105 | + " \"content\": \"Mathematics is the study of numbers, quantity, structure, space, and change. It involves abstract concepts such as algorithms, logic, and infinity, as well as practical applications in almost every aspect of our lives. Mathematics uses symbols, formulas, and equations to describe relationships and patterns, and it is used to model and analyze the world around us. It is considered the universal language of science and is used in a wide range of fields including physics, engineering, economics, and computer science. Mathematics is also used to solve problems, make predictions, and generate new knowledge.\",\n", |
| 106 | + " \"refusal\": null,\n", |
114 | 107 | " \"role\": \"assistant\",\n",
|
| 108 | + " \"audio\": null,\n", |
115 | 109 | " \"function_call\": null,\n",
|
116 | 110 | " \"tool_calls\": null\n",
|
117 |
| - " },\n", |
118 |
| - " \"logprobs\": null\n", |
| 111 | + " }\n", |
119 | 112 | " }\n",
|
120 | 113 | "]\n"
|
121 | 114 | ]
|
|
127 | 120 | },
|
128 | 121 | {
|
129 | 122 | "cell_type": "code",
|
130 |
| - "execution_count": 7, |
| 123 | + "execution_count": 6, |
131 | 124 | "metadata": {},
|
132 | 125 | "outputs": [
|
133 | 126 | {
|
134 | 127 | "name": "stderr",
|
135 | 128 | "output_type": "stream",
|
136 | 129 | "text": [
|
137 |
| - " 🛠️ :: Mathematics is a field of study that deals with the properties and relationships of numbers, quantities, shapes, and patterns. It involves the use of logic and reasoning to solve problems and understand the fundamental concepts of the universe. Mathematics is a universal language that is used across various disciplines such as science, engineering, economics, and computer science. It is divided into various branches such as algebra, geometry, calculus, statistics, and number theory, each with its own set of rules and principles. Mathematics plays a crucial role in our everyday lives, from simple calculations to complex scientific theories. It allows us to make sense of the world around us and make informed decisions based on data and evidence.\n" |
| 130 | + "🛠️ Mathematics is the study of numbers, quantity, structure, space, and change. It involves abstract concepts such as algorithms, logic, and infinity, as well as practical applications in almost every aspect of our lives. Mathematics uses symbols, formulas, and equations to describe relationships and patterns, and it is used to model and analyze the world around us. It is considered the universal language of science and is used in a wide range of fields including physics, engineering, economics, and computer science. Mathematics is also used to solve problems, make predictions, and generate new knowledge.\n" |
138 | 131 | ]
|
139 | 132 | }
|
140 | 133 | ],
|
|
145 | 138 | },
|
146 | 139 | {
|
147 | 140 | "cell_type": "code",
|
148 |
| - "execution_count": 8, |
| 141 | + "execution_count": 7, |
149 | 142 | "metadata": {},
|
150 | 143 | "outputs": [],
|
151 | 144 | "source": [
|
|
155 | 148 | ],
|
156 | 149 | "metadata": {
|
157 | 150 | "kernelspec": {
|
158 |
| - "display_name": "Python 3 (ipykernel)", |
| 151 | + "display_name": ".venv", |
159 | 152 | "language": "python",
|
160 | 153 | "name": "python3"
|
161 | 154 | },
|
|
169 | 162 | "name": "python",
|
170 | 163 | "nbconvert_exporter": "python",
|
171 | 164 | "pygments_lexer": "ipython3",
|
172 |
| - "version": "3.9.18" |
| 165 | + "version": "3.9.6" |
173 | 166 | },
|
174 | 167 | "toc": {
|
175 | 168 | "base_numbering": 1,
|
|
0 commit comments