together 1.2.10__py3-none-any.whl → 1.2.11__py3-none-any.whl
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.
- together/legacy/complete.py +4 -4
- together/legacy/embeddings.py +1 -1
- together/legacy/images.py +1 -1
- together/resources/chat/completions.py +4 -0
- together/resources/completions.py +5 -1
- together/resources/embeddings.py +5 -1
- together/resources/images.py +6 -0
- together/resources/rerank.py +4 -0
- {together-1.2.10.dist-info → together-1.2.11.dist-info}/METADATA +1 -1
- {together-1.2.10.dist-info → together-1.2.11.dist-info}/RECORD +13 -13
- {together-1.2.10.dist-info → together-1.2.11.dist-info}/LICENSE +0 -0
- {together-1.2.10.dist-info → together-1.2.11.dist-info}/WHEEL +0 -0
- {together-1.2.10.dist-info → together-1.2.11.dist-info}/entry_points.txt +0 -0
together/legacy/complete.py
CHANGED
|
@@ -14,7 +14,7 @@ class Complete:
|
|
|
14
14
|
def create(
|
|
15
15
|
cls,
|
|
16
16
|
prompt: str,
|
|
17
|
-
**kwargs,
|
|
17
|
+
**kwargs: Any,
|
|
18
18
|
) -> Dict[str, Any]:
|
|
19
19
|
"""Legacy completion function."""
|
|
20
20
|
|
|
@@ -36,7 +36,7 @@ class Complete:
|
|
|
36
36
|
def create_streaming(
|
|
37
37
|
cls,
|
|
38
38
|
prompt: str,
|
|
39
|
-
**kwargs,
|
|
39
|
+
**kwargs: Any,
|
|
40
40
|
) -> Iterator[Dict[str, Any]]:
|
|
41
41
|
"""Legacy streaming completion function."""
|
|
42
42
|
|
|
@@ -59,7 +59,7 @@ class Completion:
|
|
|
59
59
|
def create(
|
|
60
60
|
cls,
|
|
61
61
|
prompt: str,
|
|
62
|
-
**kwargs,
|
|
62
|
+
**kwargs: Any,
|
|
63
63
|
) -> CompletionResponse | Iterator[CompletionChunk]:
|
|
64
64
|
"""Completion function."""
|
|
65
65
|
|
|
@@ -79,7 +79,7 @@ class AsyncComplete:
|
|
|
79
79
|
async def create(
|
|
80
80
|
cls,
|
|
81
81
|
prompt: str,
|
|
82
|
-
**kwargs,
|
|
82
|
+
**kwargs: Any,
|
|
83
83
|
) -> CompletionResponse | AsyncGenerator[CompletionChunk, None]:
|
|
84
84
|
"""Async completion function."""
|
|
85
85
|
|
together/legacy/embeddings.py
CHANGED
together/legacy/images.py
CHANGED
|
@@ -40,6 +40,7 @@ class ChatCompletions:
|
|
|
40
40
|
response_format: Dict[str, str | Dict[str, Any]] | None = None,
|
|
41
41
|
tools: Dict[str, str | Dict[str, Any]] | None = None,
|
|
42
42
|
tool_choice: str | Dict[str, str | Dict[str, str]] | None = None,
|
|
43
|
+
**kwargs: Any,
|
|
43
44
|
) -> ChatCompletionResponse | Iterator[ChatCompletionChunk]:
|
|
44
45
|
"""
|
|
45
46
|
Method to generate completions based on a given prompt using a specified model.
|
|
@@ -131,6 +132,7 @@ class ChatCompletions:
|
|
|
131
132
|
response_format=response_format,
|
|
132
133
|
tools=tools,
|
|
133
134
|
tool_choice=tool_choice,
|
|
135
|
+
**kwargs,
|
|
134
136
|
).model_dump(exclude_none=True)
|
|
135
137
|
|
|
136
138
|
response, _, _ = requestor.request(
|
|
@@ -177,6 +179,7 @@ class AsyncChatCompletions:
|
|
|
177
179
|
response_format: Dict[str, Any] | None = None,
|
|
178
180
|
tools: Dict[str, str | Dict[str, str | Dict[str, Any]]] | None = None,
|
|
179
181
|
tool_choice: str | Dict[str, str | Dict[str, str]] | None = None,
|
|
182
|
+
**kwargs: Any,
|
|
180
183
|
) -> AsyncGenerator[ChatCompletionChunk, None] | ChatCompletionResponse:
|
|
181
184
|
"""
|
|
182
185
|
Async method to generate completions based on a given prompt using a specified model.
|
|
@@ -268,6 +271,7 @@ class AsyncChatCompletions:
|
|
|
268
271
|
response_format=response_format,
|
|
269
272
|
tools=tools,
|
|
270
273
|
tool_choice=tool_choice,
|
|
274
|
+
**kwargs,
|
|
271
275
|
).model_dump(exclude_none=True)
|
|
272
276
|
|
|
273
277
|
response, _, _ = await requestor.arequest(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import AsyncGenerator, Dict, Iterator, List
|
|
3
|
+
from typing import AsyncGenerator, Dict, Iterator, List, Any
|
|
4
4
|
|
|
5
5
|
from together.abstract import api_requestor
|
|
6
6
|
from together.together_response import TogetherResponse
|
|
@@ -37,6 +37,7 @@ class Completions:
|
|
|
37
37
|
echo: bool | None = None,
|
|
38
38
|
n: int | None = None,
|
|
39
39
|
safety_model: str | None = None,
|
|
40
|
+
**kwargs: Any,
|
|
40
41
|
) -> CompletionResponse | Iterator[CompletionChunk]:
|
|
41
42
|
"""
|
|
42
43
|
Method to generate completions based on a given prompt using a specified model.
|
|
@@ -113,6 +114,7 @@ class Completions:
|
|
|
113
114
|
echo=echo,
|
|
114
115
|
n=n,
|
|
115
116
|
safety_model=safety_model,
|
|
117
|
+
**kwargs,
|
|
116
118
|
).model_dump(exclude_none=True)
|
|
117
119
|
|
|
118
120
|
response, _, _ = requestor.request(
|
|
@@ -156,6 +158,7 @@ class AsyncCompletions:
|
|
|
156
158
|
echo: bool | None = None,
|
|
157
159
|
n: int | None = None,
|
|
158
160
|
safety_model: str | None = None,
|
|
161
|
+
**kwargs: Any,
|
|
159
162
|
) -> AsyncGenerator[CompletionChunk, None] | CompletionResponse:
|
|
160
163
|
"""
|
|
161
164
|
Async method to generate completions based on a given prompt using a specified model.
|
|
@@ -232,6 +235,7 @@ class AsyncCompletions:
|
|
|
232
235
|
echo=echo,
|
|
233
236
|
n=n,
|
|
234
237
|
safety_model=safety_model,
|
|
238
|
+
**kwargs,
|
|
235
239
|
).model_dump(exclude_none=True)
|
|
236
240
|
|
|
237
241
|
response, _, _ = await requestor.arequest(
|
together/resources/embeddings.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import List
|
|
3
|
+
from typing import List, Any
|
|
4
4
|
|
|
5
5
|
from together.abstract import api_requestor
|
|
6
6
|
from together.together_response import TogetherResponse
|
|
@@ -21,6 +21,7 @@ class Embeddings:
|
|
|
21
21
|
*,
|
|
22
22
|
input: str | List[str],
|
|
23
23
|
model: str,
|
|
24
|
+
**kwargs: Any,
|
|
24
25
|
) -> EmbeddingResponse:
|
|
25
26
|
"""
|
|
26
27
|
Method to generate completions based on a given prompt using a specified model.
|
|
@@ -40,6 +41,7 @@ class Embeddings:
|
|
|
40
41
|
parameter_payload = EmbeddingRequest(
|
|
41
42
|
input=input,
|
|
42
43
|
model=model,
|
|
44
|
+
**kwargs,
|
|
43
45
|
).model_dump(exclude_none=True)
|
|
44
46
|
|
|
45
47
|
response, _, _ = requestor.request(
|
|
@@ -65,6 +67,7 @@ class AsyncEmbeddings:
|
|
|
65
67
|
*,
|
|
66
68
|
input: str | List[str],
|
|
67
69
|
model: str,
|
|
70
|
+
**kwargs: Any,
|
|
68
71
|
) -> EmbeddingResponse:
|
|
69
72
|
"""
|
|
70
73
|
Async method to generate completions based on a given prompt using a specified model.
|
|
@@ -84,6 +87,7 @@ class AsyncEmbeddings:
|
|
|
84
87
|
parameter_payload = EmbeddingRequest(
|
|
85
88
|
input=input,
|
|
86
89
|
model=model,
|
|
90
|
+
**kwargs,
|
|
87
91
|
).model_dump(exclude_none=True)
|
|
88
92
|
|
|
89
93
|
response, _, _ = await requestor.arequest(
|
together/resources/images.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
3
5
|
from together.abstract import api_requestor
|
|
4
6
|
from together.together_response import TogetherResponse
|
|
5
7
|
from together.types import (
|
|
@@ -25,6 +27,7 @@ class Images:
|
|
|
25
27
|
height: int | None = 1024,
|
|
26
28
|
width: int | None = 1024,
|
|
27
29
|
negative_prompt: str | None = None,
|
|
30
|
+
**kwargs: Any,
|
|
28
31
|
) -> ImageResponse:
|
|
29
32
|
"""
|
|
30
33
|
Method to generate images based on a given prompt using a specified model.
|
|
@@ -67,6 +70,7 @@ class Images:
|
|
|
67
70
|
height=height,
|
|
68
71
|
width=width,
|
|
69
72
|
negative_prompt=negative_prompt,
|
|
73
|
+
**kwargs,
|
|
70
74
|
).model_dump(exclude_none=True)
|
|
71
75
|
|
|
72
76
|
response, _, _ = requestor.request(
|
|
@@ -98,6 +102,7 @@ class AsyncImages:
|
|
|
98
102
|
height: int | None = 1024,
|
|
99
103
|
width: int | None = 1024,
|
|
100
104
|
negative_prompt: str | None = None,
|
|
105
|
+
**kwargs: Any,
|
|
101
106
|
) -> ImageResponse:
|
|
102
107
|
"""
|
|
103
108
|
Async method to generate images based on a given prompt using a specified model.
|
|
@@ -140,6 +145,7 @@ class AsyncImages:
|
|
|
140
145
|
height=height,
|
|
141
146
|
width=width,
|
|
142
147
|
negative_prompt=negative_prompt,
|
|
148
|
+
**kwargs,
|
|
143
149
|
).model_dump(exclude_none=True)
|
|
144
150
|
|
|
145
151
|
response, _, _ = await requestor.arequest(
|
together/resources/rerank.py
CHANGED
|
@@ -25,6 +25,7 @@ class Rerank:
|
|
|
25
25
|
top_n: int | None = None,
|
|
26
26
|
return_documents: bool = False,
|
|
27
27
|
rank_fields: List[str] | None = None,
|
|
28
|
+
**kwargs: Any,
|
|
28
29
|
) -> RerankResponse:
|
|
29
30
|
"""
|
|
30
31
|
Method to generate completions based on a given prompt using a specified model.
|
|
@@ -52,6 +53,7 @@ class Rerank:
|
|
|
52
53
|
top_n=top_n,
|
|
53
54
|
return_documents=return_documents,
|
|
54
55
|
rank_fields=rank_fields,
|
|
56
|
+
**kwargs,
|
|
55
57
|
).model_dump(exclude_none=True)
|
|
56
58
|
|
|
57
59
|
response, _, _ = requestor.request(
|
|
@@ -81,6 +83,7 @@ class AsyncRerank:
|
|
|
81
83
|
top_n: int | None = None,
|
|
82
84
|
return_documents: bool = False,
|
|
83
85
|
rank_fields: List[str] | None = None,
|
|
86
|
+
**kwargs: Any,
|
|
84
87
|
) -> RerankResponse:
|
|
85
88
|
"""
|
|
86
89
|
Async method to generate completions based on a given prompt using a specified model.
|
|
@@ -108,6 +111,7 @@ class AsyncRerank:
|
|
|
108
111
|
top_n=top_n,
|
|
109
112
|
return_documents=return_documents,
|
|
110
113
|
rank_fields=rank_fields,
|
|
114
|
+
**kwargs,
|
|
111
115
|
).model_dump(exclude_none=True)
|
|
112
116
|
|
|
113
117
|
response, _, _ = await requestor.arequest(
|
|
@@ -16,22 +16,22 @@ together/error.py,sha256=emjhTSsLwiZvW0v1EmYemjacCMtcFIKAXWWK_2IdP18,5419
|
|
|
16
16
|
together/filemanager.py,sha256=QHhBn73oVFdgUpSYXYLmJzHJ9c5wYEMJC0ur6ZgDeYo,11269
|
|
17
17
|
together/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
together/legacy/base.py,sha256=ehrX1SCfRbK5OA83wL1q7-tfF-yuZOUxzjxYfFtdvvQ,727
|
|
19
|
-
together/legacy/complete.py,sha256=
|
|
20
|
-
together/legacy/embeddings.py,sha256=
|
|
19
|
+
together/legacy/complete.py,sha256=NRJX-vjnkg4HrgDo9LS3jFfhwfXpeGxcl24dcrLPK3A,2439
|
|
20
|
+
together/legacy/embeddings.py,sha256=nyTERjyPLTm7Sc987a9FJt1adnW7gIa7xs2CwXLE9EI,635
|
|
21
21
|
together/legacy/files.py,sha256=qmAqMiNTPWb6WvLV5Tsv6kxGRfQ31q7OkHZNFwkw8v0,4082
|
|
22
22
|
together/legacy/finetune.py,sha256=k-lERbZLEZlW1QQ9A9zhhwl5KIPjf_jT0R0LSiLbD2Y,5063
|
|
23
|
-
together/legacy/images.py,sha256=
|
|
23
|
+
together/legacy/images.py,sha256=bJJRs-6C7-NexPyaeyHiYlHOU51yls5-QAiqtO4xrZU,626
|
|
24
24
|
together/legacy/models.py,sha256=85ZN9Ids_FjdYNDRv5k7sgrtVWPKPHqkDplORtVUGHg,1087
|
|
25
25
|
together/resources/__init__.py,sha256=7BLdBCNUbgi5mz30EFfdkdIYiGfFCkiUbdNzMY1-igY,792
|
|
26
26
|
together/resources/chat/__init__.py,sha256=RsTptdP8MeGjcdIjze896-J27cRvCbUoMft0X2BVlQ8,617
|
|
27
|
-
together/resources/chat/completions.py,sha256=
|
|
28
|
-
together/resources/completions.py,sha256=
|
|
29
|
-
together/resources/embeddings.py,sha256=
|
|
27
|
+
together/resources/chat/completions.py,sha256=AOmm2CRwhz9VZpez35LoOUw432IPbtwCeUQXtCd3RK8,14208
|
|
28
|
+
together/resources/completions.py,sha256=C_Djn41zjdWdPn4rnOrAVEHvOaqyBSyxZS4eYqsZdMI,11482
|
|
29
|
+
together/resources/embeddings.py,sha256=PTvLb82yjG_-iQOyuhsilp77Fr7gZ0o6WD2KeRnKoxs,2675
|
|
30
30
|
together/resources/files.py,sha256=bnPbaF25e4InBRPvHwXHXT-oSX1Z1sZRsnQW5wq82U4,4990
|
|
31
31
|
together/resources/finetune.py,sha256=t8wOulAyNFKlHjHv_u4-PwdL-rR-klgEvDEfH-efdkQ,15970
|
|
32
|
-
together/resources/images.py,sha256=
|
|
32
|
+
together/resources/images.py,sha256=LQUjKPaFxWTqOAPnyF1Pp7Rz4NLOYhmoKwshpYiprEM,4923
|
|
33
33
|
together/resources/models.py,sha256=2dtHhXAqTDOOpwSbYLzWcKTC0-m2Szlb7LDYvp7Jr4w,1786
|
|
34
|
-
together/resources/rerank.py,sha256=
|
|
34
|
+
together/resources/rerank.py,sha256=3Ju_aRSyZ1s_3zCSNZnSnEJErUVmt2xa3M8z1nvejMA,3931
|
|
35
35
|
together/together_response.py,sha256=MhczUCPem93cjX-A1TOAUrRj3sO-o3SLcEcTsZgVzQI,1319
|
|
36
36
|
together/types/__init__.py,sha256=ghMiyyR2UzY-Io9Ck3ocwmS6_XSO9VaYWwbLqPDSZfo,1681
|
|
37
37
|
together/types/abstract.py,sha256=1lFQI_3WjsR_t1128AeKW0aTk6EiM6Gh1J3ZuyLLPao,642
|
|
@@ -51,8 +51,8 @@ together/utils/api_helpers.py,sha256=RSF7SRhbjHzroMOSWAXscflByM1r1ta_1SpxkAT22iE
|
|
|
51
51
|
together/utils/files.py,sha256=gMLthqfP5hKxVAerHMdy7gLXzdfY6lyOXdpW24Y4X3I,7165
|
|
52
52
|
together/utils/tools.py,sha256=3-lXWP3cBCzOVSZg9tr5zOT1jaVeKAKVWxO2fcXZTh8,1788
|
|
53
53
|
together/version.py,sha256=p03ivHyE0SyWU4jAnRTBi_sOwywVWoZPU4g2gzRgG-Y,126
|
|
54
|
-
together-1.2.
|
|
55
|
-
together-1.2.
|
|
56
|
-
together-1.2.
|
|
57
|
-
together-1.2.
|
|
58
|
-
together-1.2.
|
|
54
|
+
together-1.2.11.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
55
|
+
together-1.2.11.dist-info/METADATA,sha256=dGhkUfJY1_UbjfOmWiFoDIs-QzLFD1ZgBwRy9E7P59Y,11813
|
|
56
|
+
together-1.2.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
57
|
+
together-1.2.11.dist-info/entry_points.txt,sha256=G-b5NKW6lUUf1V1fH8IPTBb7jXnK7lhbX9H1zTEJXPs,50
|
|
58
|
+
together-1.2.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|