together 1.1.2__tar.gz → 1.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. {together-1.1.2 → together-1.1.3}/PKG-INFO +44 -29
  2. {together-1.1.2 → together-1.1.3}/README.md +42 -27
  3. {together-1.1.2 → together-1.1.3}/pyproject.toml +10 -3
  4. {together-1.1.2 → together-1.1.3}/src/together/types/chat_completions.py +1 -0
  5. {together-1.1.2 → together-1.1.3}/LICENSE +0 -0
  6. {together-1.1.2 → together-1.1.3}/src/together/__init__.py +0 -0
  7. {together-1.1.2 → together-1.1.3}/src/together/abstract/__init__.py +0 -0
  8. {together-1.1.2 → together-1.1.3}/src/together/abstract/api_requestor.py +0 -0
  9. {together-1.1.2 → together-1.1.3}/src/together/cli/__init__.py +0 -0
  10. {together-1.1.2 → together-1.1.3}/src/together/cli/api/__init__.py +0 -0
  11. {together-1.1.2 → together-1.1.3}/src/together/cli/api/chat.py +0 -0
  12. {together-1.1.2 → together-1.1.3}/src/together/cli/api/completions.py +0 -0
  13. {together-1.1.2 → together-1.1.3}/src/together/cli/api/files.py +0 -0
  14. {together-1.1.2 → together-1.1.3}/src/together/cli/api/finetune.py +0 -0
  15. {together-1.1.2 → together-1.1.3}/src/together/cli/api/images.py +0 -0
  16. {together-1.1.2 → together-1.1.3}/src/together/cli/api/models.py +0 -0
  17. {together-1.1.2 → together-1.1.3}/src/together/cli/cli.py +0 -0
  18. {together-1.1.2 → together-1.1.3}/src/together/client.py +0 -0
  19. {together-1.1.2 → together-1.1.3}/src/together/constants.py +0 -0
  20. {together-1.1.2 → together-1.1.3}/src/together/error.py +0 -0
  21. {together-1.1.2 → together-1.1.3}/src/together/filemanager.py +0 -0
  22. {together-1.1.2 → together-1.1.3}/src/together/legacy/__init__.py +0 -0
  23. {together-1.1.2 → together-1.1.3}/src/together/legacy/base.py +0 -0
  24. {together-1.1.2 → together-1.1.3}/src/together/legacy/complete.py +0 -0
  25. {together-1.1.2 → together-1.1.3}/src/together/legacy/embeddings.py +0 -0
  26. {together-1.1.2 → together-1.1.3}/src/together/legacy/files.py +0 -0
  27. {together-1.1.2 → together-1.1.3}/src/together/legacy/finetune.py +0 -0
  28. {together-1.1.2 → together-1.1.3}/src/together/legacy/images.py +0 -0
  29. {together-1.1.2 → together-1.1.3}/src/together/legacy/models.py +0 -0
  30. {together-1.1.2 → together-1.1.3}/src/together/resources/__init__.py +0 -0
  31. {together-1.1.2 → together-1.1.3}/src/together/resources/chat/__init__.py +0 -0
  32. {together-1.1.2 → together-1.1.3}/src/together/resources/chat/completions.py +0 -0
  33. {together-1.1.2 → together-1.1.3}/src/together/resources/completions.py +0 -0
  34. {together-1.1.2 → together-1.1.3}/src/together/resources/embeddings.py +0 -0
  35. {together-1.1.2 → together-1.1.3}/src/together/resources/files.py +0 -0
  36. {together-1.1.2 → together-1.1.3}/src/together/resources/finetune.py +0 -0
  37. {together-1.1.2 → together-1.1.3}/src/together/resources/images.py +0 -0
  38. {together-1.1.2 → together-1.1.3}/src/together/resources/models.py +0 -0
  39. {together-1.1.2 → together-1.1.3}/src/together/together_response.py +0 -0
  40. {together-1.1.2 → together-1.1.3}/src/together/types/__init__.py +0 -0
  41. {together-1.1.2 → together-1.1.3}/src/together/types/abstract.py +0 -0
  42. {together-1.1.2 → together-1.1.3}/src/together/types/common.py +0 -0
  43. {together-1.1.2 → together-1.1.3}/src/together/types/completions.py +0 -0
  44. {together-1.1.2 → together-1.1.3}/src/together/types/embeddings.py +0 -0
  45. {together-1.1.2 → together-1.1.3}/src/together/types/error.py +0 -0
  46. {together-1.1.2 → together-1.1.3}/src/together/types/files.py +0 -0
  47. {together-1.1.2 → together-1.1.3}/src/together/types/finetune.py +0 -0
  48. {together-1.1.2 → together-1.1.3}/src/together/types/images.py +0 -0
  49. {together-1.1.2 → together-1.1.3}/src/together/types/models.py +0 -0
  50. {together-1.1.2 → together-1.1.3}/src/together/utils/__init__.py +0 -0
  51. {together-1.1.2 → together-1.1.3}/src/together/utils/_log.py +0 -0
  52. {together-1.1.2 → together-1.1.3}/src/together/utils/api_helpers.py +0 -0
  53. {together-1.1.2 → together-1.1.3}/src/together/utils/files.py +0 -0
  54. {together-1.1.2 → together-1.1.3}/src/together/utils/tools.py +0 -0
  55. {together-1.1.2 → together-1.1.3}/src/together/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: together
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: Python client for Together's Cloud Platform!
5
5
  Home-page: https://github.com/togethercomputer/together-python
6
6
  License: Apache-2.0
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Requires-Dist: aiohttp (>=3.9.3,<4.0.0)
19
19
  Requires-Dist: click (>=8.1.7,<9.0.0)
20
- Requires-Dist: eval-type-backport (>=0.1.3,<0.2.0)
20
+ Requires-Dist: eval-type-backport (>=0.1.3,<0.3.0)
21
21
  Requires-Dist: filelock (>=3.13.1,<4.0.0)
22
22
  Requires-Dist: numpy (>=1.23.5) ; python_version < "3.12"
23
23
  Requires-Dist: numpy (>=1.26.0) ; python_version >= "3.12"
@@ -32,32 +32,46 @@ Project-URL: Bug Tracker, https://github.com/togethercomputer/together-python/is
32
32
  Project-URL: Repository, https://github.com/togethercomputer/together-python
33
33
  Description-Content-Type: text/markdown
34
34
 
35
- The [Together Python Library](https://pypi.org/project/together/) is the official Python client for Together's API platform, providing a convenient way for interacting with the REST APIs and enables easy integrations with Python 3.8+ applications with easy to use synchronous and asynchronous clients.
35
+ <div align="center">
36
+ <a href="https://www.together.ai/">
37
+ <img alt="together.ai" height="100px" src="https://assets-global.website-files.com/64f6f2c0e3f4c5a91c1e823a/654693d569494912cfc0c0d4_favicon.svg">
38
+ </a>
39
+ </div>
36
40
 
37
- # Installation
41
+ # Together Python API library
42
+
43
+ [![PyPI version](https://img.shields.io/pypi/v/together.svg)](https://pypi.org/project/together/)
44
+ [![Discord](https://dcbadge.vercel.app/api/server/9Rk6sSeWEG?style=flat&compact=true)](https://discord.com/invite/9Rk6sSeWEG)
45
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/togethercompute.svg?style=social&label=Follow%20%40togethercompute)](https://twitter.com/togethercompute)
46
+
47
+ The [Together Python API Library](https://pypi.org/project/together/) is the official Python client for Together's API platform, providing a convenient way for interacting with the REST APIs and enables easy integrations with Python 3.8+ applications with easy to use synchronous and asynchronous clients.
48
+
49
+
50
+
51
+ ## Installation
38
52
 
39
53
  > 🚧
40
- > The library was rewritten in v1.0.0 released in April of 2024. There were significant changes made.
54
+ > The Library was rewritten in v1.0.0 released in April of 2024. There were significant changes made.
41
55
 
42
- To install Together Python Library from PyPi, simply run:
56
+ To install Together Python Library from PyPI, simply run:
43
57
 
44
58
  ```shell Shell
45
59
  pip install --upgrade together
46
60
  ```
47
61
 
48
- ## Setting up API Key
62
+ ### Setting up API Key
49
63
 
50
64
  > 🚧 You will need to create an account with [Together.ai](https://api.together.xyz/) to obtain a Together API Key.
51
65
 
52
66
  Once logged in to the Together Playground, you can find available API keys in [this settings page](https://api.together.xyz/settings/api-keys).
53
67
 
54
- ### Setting environment variable
68
+ #### Setting environment variable
55
69
 
56
70
  ```shell
57
71
  export TOGETHER_API_KEY=xxxxx
58
72
  ```
59
73
 
60
- ### Using the client
74
+ #### Using the client
61
75
 
62
76
  ```python
63
77
  from together import Together
@@ -65,11 +79,11 @@ from together import Together
65
79
  client = Together(api_key="xxxxx")
66
80
  ```
67
81
 
68
- This library contains both a python library and a CLI. We'll demonstrate how to use both below.
82
+ This repo contains both a Python Library and a CLI. We'll demonstrate how to use both below.
69
83
 
70
- # Usage – Python Client
84
+ ## Usage – Python Client
71
85
 
72
- ## Chat Completions
86
+ ### Chat Completions
73
87
 
74
88
  ```python
75
89
  import os
@@ -84,7 +98,7 @@ response = client.chat.completions.create(
84
98
  print(response.choices[0].message.content)
85
99
  ```
86
100
 
87
- ### Streaming
101
+ #### Streaming
88
102
 
89
103
  ```python
90
104
  import os
@@ -101,7 +115,7 @@ for chunk in stream:
101
115
  print(chunk.choices[0].delta.content or "", end="", flush=True)
102
116
  ```
103
117
 
104
- ### Async usage
118
+ #### Async usage
105
119
 
106
120
  ```python
107
121
  import os, asyncio
@@ -130,7 +144,7 @@ async def async_chat_completion(messages):
130
144
  asyncio.run(async_chat_completion(messages))
131
145
  ```
132
146
 
133
- ## Completions
147
+ ### Completions
134
148
 
135
149
  Completions are for code and language models shown [here](https://docs.together.ai/docs/inference-models). Below, a code model example is shown.
136
150
 
@@ -143,11 +157,12 @@ client = Together(api_key=os.environ.get("TOGETHER_API_KEY"))
143
157
  response = client.completions.create(
144
158
  model="codellama/CodeLlama-34b-Python-hf",
145
159
  prompt="Write a Next.js component with TailwindCSS for a header component.",
160
+ max_tokens=200,
146
161
  )
147
162
  print(response.choices[0].text)
148
163
  ```
149
164
 
150
- ### Streaming
165
+ #### Streaming
151
166
 
152
167
  ```python
153
168
  import os
@@ -164,7 +179,7 @@ for chunk in stream:
164
179
  print(chunk.choices[0].delta.content or "", end="", flush=True)
165
180
  ```
166
181
 
167
- ### Async usage
182
+ #### Async usage
168
183
 
169
184
  ```python
170
185
  import os, asyncio
@@ -193,7 +208,7 @@ async def async_chat_completion(prompts):
193
208
  asyncio.run(async_chat_completion(prompts))
194
209
  ```
195
210
 
196
- ## Image generation
211
+ ### Image generation
197
212
 
198
213
  ```python
199
214
  import os
@@ -210,7 +225,7 @@ response = client.images.generate(
210
225
  print(response.data[0].b64_json)
211
226
  ```
212
227
 
213
- ## Embeddings
228
+ ### Embeddings
214
229
 
215
230
  ```python
216
231
  from typing import List
@@ -229,7 +244,7 @@ embeddings = get_embeddings(input_texts, model='togethercomputer/m2-bert-80M-8k-
229
244
  print(embeddings)
230
245
  ```
231
246
 
232
- ## Files
247
+ ### Files
233
248
 
234
249
  The files API is used for fine-tuning and allows developers to upload data to fine-tune on. It also has several methods to list all files, retrive files, and delete files. Please refer to our fine-tuning docs [here](https://docs.together.ai/docs/fine-tuning-python).
235
250
 
@@ -246,7 +261,7 @@ client.files.retrieve_content(id="file-d0d318cb-b7d9-493a-bd70-1cfe089d3815") #
246
261
  client.files.delete(id="file-d0d318cb-b7d9-493a-bd70-1cfe089d3815") # deletes a file
247
262
  ```
248
263
 
249
- ## Fine-tunes
264
+ ### Fine-tunes
250
265
 
251
266
  The finetune API is used for fine-tuning and allows developers to create finetuning jobs. It also has several methods to list all jobs, retrive statuses and get checkpoints. Please refer to our fine-tuning docs [here](https://docs.together.ai/docs/fine-tuning-python).
252
267
 
@@ -273,7 +288,7 @@ client.fine_tuning.list_events(id="ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b") #
273
288
  client.fine_tuning.download(id="ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b") # downloads compressed fine-tuned model or checkpoint to local disk
274
289
  ```
275
290
 
276
- ## Models
291
+ ### Models
277
292
 
278
293
  This lists all the models that Together supports.
279
294
 
@@ -289,9 +304,9 @@ for model in models:
289
304
  print(model)
290
305
  ```
291
306
 
292
- # Usage – CLI
307
+ ## Usage – CLI
293
308
 
294
- ## Chat Completions
309
+ ### Chat Completions
295
310
 
296
311
  ```bash
297
312
  together chat.completions \
@@ -302,7 +317,7 @@ together chat.completions \
302
317
 
303
318
  The Chat Completions CLI enables streaming tokens to stdout by default. To disable streaming, use `--no-stream`.
304
319
 
305
- ## Completions
320
+ ### Completions
306
321
 
307
322
  ```bash
308
323
  together completions \
@@ -314,7 +329,7 @@ together completions \
314
329
 
315
330
  The Completions CLI enables streaming tokens to stdout by default. To disable streaming, use `--no-stream`.
316
331
 
317
- ## Image Generations
332
+ ### Image Generations
318
333
 
319
334
  ```bash
320
335
  together images generate \
@@ -325,7 +340,7 @@ together images generate \
325
340
 
326
341
  The image is opened in the default image viewer by default. To disable this, use `--no-show`.
327
342
 
328
- ## Files
343
+ ### Files
329
344
 
330
345
  ```bash
331
346
  # Help
@@ -350,7 +365,7 @@ together files retrieve-content file-6f50f9d1-5b95-416c-9040-0799b2b4b894
350
365
  together files delete file-6f50f9d1-5b95-416c-9040-0799b2b4b894
351
366
  ```
352
367
 
353
- ## Fine-tuning
368
+ ### Fine-tuning
354
369
 
355
370
  ```bash
356
371
  # Help
@@ -377,7 +392,7 @@ together fine-tuning cancel ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b
377
392
  together fine-tuning download ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b
378
393
  ```
379
394
 
380
- ## Models
395
+ ### Models
381
396
 
382
397
  ```bash
383
398
  # Help
@@ -1,29 +1,43 @@
1
- The [Together Python Library](https://pypi.org/project/together/) is the official Python client for Together's API platform, providing a convenient way for interacting with the REST APIs and enables easy integrations with Python 3.8+ applications with easy to use synchronous and asynchronous clients.
1
+ <div align="center">
2
+ <a href="https://www.together.ai/">
3
+ <img alt="together.ai" height="100px" src="https://assets-global.website-files.com/64f6f2c0e3f4c5a91c1e823a/654693d569494912cfc0c0d4_favicon.svg">
4
+ </a>
5
+ </div>
2
6
 
3
- # Installation
7
+ # Together Python API library
8
+
9
+ [![PyPI version](https://img.shields.io/pypi/v/together.svg)](https://pypi.org/project/together/)
10
+ [![Discord](https://dcbadge.vercel.app/api/server/9Rk6sSeWEG?style=flat&compact=true)](https://discord.com/invite/9Rk6sSeWEG)
11
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/togethercompute.svg?style=social&label=Follow%20%40togethercompute)](https://twitter.com/togethercompute)
12
+
13
+ The [Together Python API Library](https://pypi.org/project/together/) is the official Python client for Together's API platform, providing a convenient way for interacting with the REST APIs and enables easy integrations with Python 3.8+ applications with easy to use synchronous and asynchronous clients.
14
+
15
+
16
+
17
+ ## Installation
4
18
 
5
19
  > 🚧
6
- > The library was rewritten in v1.0.0 released in April of 2024. There were significant changes made.
20
+ > The Library was rewritten in v1.0.0 released in April of 2024. There were significant changes made.
7
21
 
8
- To install Together Python Library from PyPi, simply run:
22
+ To install Together Python Library from PyPI, simply run:
9
23
 
10
24
  ```shell Shell
11
25
  pip install --upgrade together
12
26
  ```
13
27
 
14
- ## Setting up API Key
28
+ ### Setting up API Key
15
29
 
16
30
  > 🚧 You will need to create an account with [Together.ai](https://api.together.xyz/) to obtain a Together API Key.
17
31
 
18
32
  Once logged in to the Together Playground, you can find available API keys in [this settings page](https://api.together.xyz/settings/api-keys).
19
33
 
20
- ### Setting environment variable
34
+ #### Setting environment variable
21
35
 
22
36
  ```shell
23
37
  export TOGETHER_API_KEY=xxxxx
24
38
  ```
25
39
 
26
- ### Using the client
40
+ #### Using the client
27
41
 
28
42
  ```python
29
43
  from together import Together
@@ -31,11 +45,11 @@ from together import Together
31
45
  client = Together(api_key="xxxxx")
32
46
  ```
33
47
 
34
- This library contains both a python library and a CLI. We'll demonstrate how to use both below.
48
+ This repo contains both a Python Library and a CLI. We'll demonstrate how to use both below.
35
49
 
36
- # Usage – Python Client
50
+ ## Usage – Python Client
37
51
 
38
- ## Chat Completions
52
+ ### Chat Completions
39
53
 
40
54
  ```python
41
55
  import os
@@ -50,7 +64,7 @@ response = client.chat.completions.create(
50
64
  print(response.choices[0].message.content)
51
65
  ```
52
66
 
53
- ### Streaming
67
+ #### Streaming
54
68
 
55
69
  ```python
56
70
  import os
@@ -67,7 +81,7 @@ for chunk in stream:
67
81
  print(chunk.choices[0].delta.content or "", end="", flush=True)
68
82
  ```
69
83
 
70
- ### Async usage
84
+ #### Async usage
71
85
 
72
86
  ```python
73
87
  import os, asyncio
@@ -96,7 +110,7 @@ async def async_chat_completion(messages):
96
110
  asyncio.run(async_chat_completion(messages))
97
111
  ```
98
112
 
99
- ## Completions
113
+ ### Completions
100
114
 
101
115
  Completions are for code and language models shown [here](https://docs.together.ai/docs/inference-models). Below, a code model example is shown.
102
116
 
@@ -109,11 +123,12 @@ client = Together(api_key=os.environ.get("TOGETHER_API_KEY"))
109
123
  response = client.completions.create(
110
124
  model="codellama/CodeLlama-34b-Python-hf",
111
125
  prompt="Write a Next.js component with TailwindCSS for a header component.",
126
+ max_tokens=200,
112
127
  )
113
128
  print(response.choices[0].text)
114
129
  ```
115
130
 
116
- ### Streaming
131
+ #### Streaming
117
132
 
118
133
  ```python
119
134
  import os
@@ -130,7 +145,7 @@ for chunk in stream:
130
145
  print(chunk.choices[0].delta.content or "", end="", flush=True)
131
146
  ```
132
147
 
133
- ### Async usage
148
+ #### Async usage
134
149
 
135
150
  ```python
136
151
  import os, asyncio
@@ -159,7 +174,7 @@ async def async_chat_completion(prompts):
159
174
  asyncio.run(async_chat_completion(prompts))
160
175
  ```
161
176
 
162
- ## Image generation
177
+ ### Image generation
163
178
 
164
179
  ```python
165
180
  import os
@@ -176,7 +191,7 @@ response = client.images.generate(
176
191
  print(response.data[0].b64_json)
177
192
  ```
178
193
 
179
- ## Embeddings
194
+ ### Embeddings
180
195
 
181
196
  ```python
182
197
  from typing import List
@@ -195,7 +210,7 @@ embeddings = get_embeddings(input_texts, model='togethercomputer/m2-bert-80M-8k-
195
210
  print(embeddings)
196
211
  ```
197
212
 
198
- ## Files
213
+ ### Files
199
214
 
200
215
  The files API is used for fine-tuning and allows developers to upload data to fine-tune on. It also has several methods to list all files, retrive files, and delete files. Please refer to our fine-tuning docs [here](https://docs.together.ai/docs/fine-tuning-python).
201
216
 
@@ -212,7 +227,7 @@ client.files.retrieve_content(id="file-d0d318cb-b7d9-493a-bd70-1cfe089d3815") #
212
227
  client.files.delete(id="file-d0d318cb-b7d9-493a-bd70-1cfe089d3815") # deletes a file
213
228
  ```
214
229
 
215
- ## Fine-tunes
230
+ ### Fine-tunes
216
231
 
217
232
  The finetune API is used for fine-tuning and allows developers to create finetuning jobs. It also has several methods to list all jobs, retrive statuses and get checkpoints. Please refer to our fine-tuning docs [here](https://docs.together.ai/docs/fine-tuning-python).
218
233
 
@@ -239,7 +254,7 @@ client.fine_tuning.list_events(id="ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b") #
239
254
  client.fine_tuning.download(id="ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b") # downloads compressed fine-tuned model or checkpoint to local disk
240
255
  ```
241
256
 
242
- ## Models
257
+ ### Models
243
258
 
244
259
  This lists all the models that Together supports.
245
260
 
@@ -255,9 +270,9 @@ for model in models:
255
270
  print(model)
256
271
  ```
257
272
 
258
- # Usage – CLI
273
+ ## Usage – CLI
259
274
 
260
- ## Chat Completions
275
+ ### Chat Completions
261
276
 
262
277
  ```bash
263
278
  together chat.completions \
@@ -268,7 +283,7 @@ together chat.completions \
268
283
 
269
284
  The Chat Completions CLI enables streaming tokens to stdout by default. To disable streaming, use `--no-stream`.
270
285
 
271
- ## Completions
286
+ ### Completions
272
287
 
273
288
  ```bash
274
289
  together completions \
@@ -280,7 +295,7 @@ together completions \
280
295
 
281
296
  The Completions CLI enables streaming tokens to stdout by default. To disable streaming, use `--no-stream`.
282
297
 
283
- ## Image Generations
298
+ ### Image Generations
284
299
 
285
300
  ```bash
286
301
  together images generate \
@@ -291,7 +306,7 @@ together images generate \
291
306
 
292
307
  The image is opened in the default image viewer by default. To disable this, use `--no-show`.
293
308
 
294
- ## Files
309
+ ### Files
295
310
 
296
311
  ```bash
297
312
  # Help
@@ -316,7 +331,7 @@ together files retrieve-content file-6f50f9d1-5b95-416c-9040-0799b2b4b894
316
331
  together files delete file-6f50f9d1-5b95-416c-9040-0799b2b4b894
317
332
  ```
318
333
 
319
- ## Fine-tuning
334
+ ### Fine-tuning
320
335
 
321
336
  ```bash
322
337
  # Help
@@ -343,7 +358,7 @@ together fine-tuning cancel ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b
343
358
  together fine-tuning download ft-c66a5c18-1d6d-43c9-94bd-32d756425b4b
344
359
  ```
345
360
 
346
- ## Models
361
+ ### Models
347
362
 
348
363
  ```bash
349
364
  # Help
@@ -12,7 +12,7 @@ build-backend = "poetry.masonry.api"
12
12
 
13
13
  [tool.poetry]
14
14
  name = "together"
15
- version = "1.1.2"
15
+ version = "1.1.3"
16
16
  authors = [
17
17
  "Together AI <support@together.ai>"
18
18
  ]
@@ -36,7 +36,7 @@ tabulate = "^0.9.0"
36
36
  pydantic = "^2.6.3"
37
37
  aiohttp = "^3.9.3"
38
38
  filelock = "^3.13.1"
39
- eval-type-backport = "^0.1.3"
39
+ eval-type-backport = ">=0.1.3,<0.3.0"
40
40
  click = "^8.1.7"
41
41
  pillow = "^10.3.0"
42
42
  pyarrow = ">=10.0.1"
@@ -50,7 +50,7 @@ optional = true
50
50
 
51
51
  [tool.poetry.group.quality.dependencies]
52
52
  black = ">=23.1,<25.0"
53
- ruff = "^0.3.2"
53
+ ruff = ">=0.3.2,<0.5.0"
54
54
  types-tqdm = "^4.65.0.0"
55
55
  types-tabulate = "^0.9.0.3"
56
56
  pre-commit = "3.5.0"
@@ -66,6 +66,13 @@ pytest = ">=7.4.2,<9.0.0"
66
66
  pytest-watch = "^4.2.0"
67
67
  tox = "^4.14.1"
68
68
 
69
+ [tool.poetry.group.examples]
70
+ optional = true
71
+
72
+ [tool.poetry.group.examples.dependencies]
73
+ datasets = "^2.18.0"
74
+ transformers = "^4.39.3"
75
+
69
76
 
70
77
  [tool.poetry.urls]
71
78
  "Homepage" = "https://github.com/togethercomputer/together-python"
@@ -20,6 +20,7 @@ class MessageRole(str, Enum):
20
20
  ASSISTANT = "assistant"
21
21
  SYSTEM = "system"
22
22
  USER = "user"
23
+ TOOL = "tool"
23
24
 
24
25
 
25
26
  class ResponseFormatType(str, Enum):
File without changes
File without changes