together 2.0.0a16__py3-none-any.whl → 2.0.0a17__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/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "together"
4
- __version__ = "2.0.0-alpha.16" # x-release-please-version
4
+ __version__ = "2.0.0-alpha.17" # x-release-please-version
@@ -31,7 +31,7 @@ from .hardware import hardware
31
31
  )
32
32
  @click.option(
33
33
  "--gpu",
34
- type=click.Choice(["h100", "a100", "l40", "l40s", "rtx-6000"]),
34
+ type=click.Choice(["b200", "h200", "h100", "a100", "l40", "l40s", "rtx-6000"]),
35
35
  required=True,
36
36
  help="GPU type to use for inference",
37
37
  )
@@ -48,7 +48,7 @@ from .hardware import hardware
48
48
  @click.option(
49
49
  "--no-prompt-cache",
50
50
  is_flag=True,
51
- help="Disable the prompt cache for this endpoint",
51
+ help="Deprecated and no longer has any effect.",
52
52
  )
53
53
  @click.option(
54
54
  "--no-speculative-decoding",
@@ -95,6 +95,8 @@ def create(
95
95
  client: Together = ctx.obj
96
96
  # Map GPU types to their full hardware ID names
97
97
  gpu_map = {
98
+ "b200": "nvidia_b200_180gb_sxm",
99
+ "h200": "nvidia_h200_140gb_sxm",
98
100
  "h100": "nvidia_h100_80gb_sxm",
99
101
  "a100": "nvidia_a100_80gb_pcie" if gpu_count == 1 else "nvidia_a100_80gb_sxm",
100
102
  "l40": "nvidia_l40",
@@ -102,6 +104,9 @@ def create(
102
104
  "rtx-6000": "nvidia_rtx_6000_ada",
103
105
  }
104
106
 
107
+ if no_prompt_cache is not None:
108
+ click.echo("Warning: --no-prompt-cache is deprecated and no longer has any effect.", err=True)
109
+
105
110
  hardware_id = f"{gpu_count}x_{gpu_map[gpu]}"
106
111
 
107
112
  try:
@@ -113,7 +118,6 @@ def create(
113
118
  "max_replicas": max_replicas,
114
119
  },
115
120
  display_name=display_name or omit,
116
- disable_prompt_cache=no_prompt_cache or omit,
117
121
  disable_speculative_decoding=no_speculative_decoding or omit,
118
122
  state="STOPPED" if no_auto_start else "STARTED",
119
123
  inactive_timeout=inactive_timeout,
@@ -134,8 +138,6 @@ def create(
134
138
  click.echo(f" Hardware: {hardware_id}", err=True)
135
139
  if display_name:
136
140
  click.echo(f" Display name: {display_name}", err=True)
137
- if no_prompt_cache:
138
- click.echo(" Prompt cache: disabled", err=True)
139
141
  if no_speculative_decoding:
140
142
  click.echo(" Speculative decoding: disabled", err=True)
141
143
  if no_auto_start:
@@ -5,9 +5,9 @@ import click
5
5
  from tabulate import tabulate
6
6
 
7
7
  from together import Together, omit
8
- from together._models import BaseModel
9
8
  from together._response import APIResponse as APIResponse
10
9
  from together.lib.cli.api._utils import handle_api_errors
10
+ from together.lib.utils.serializer import datetime_serializer
11
11
 
12
12
 
13
13
  @click.command()
@@ -29,23 +29,27 @@ def list(ctx: click.Context, type: Optional[str], json: bool) -> None:
29
29
 
30
30
  models_list = client.models.list(dedicated=type == "dedicated" if type else omit)
31
31
 
32
+ if json:
33
+ items = [model.model_dump() for model in models_list]
34
+ click.echo(json_lib.dumps(items, indent=2, default=datetime_serializer))
35
+ return
36
+
32
37
  display_list: List[Dict[str, Any]] = []
33
- model: BaseModel
34
- for model in models_list:
38
+ for model in sorted(models_list, key=lambda x: x.type):
39
+ price_parts: List[str] = []
40
+
41
+ # Only show pricing if a value actually exists
42
+ if model.pricing and model.pricing.input > 0 and model.pricing.output > 0:
43
+ price_parts.append(f"${model.pricing.input:.2f}")
44
+ price_parts.append(f"${model.pricing.output:.2f}")
45
+
35
46
  display_list.append(
36
47
  {
37
- "ID": model.id,
38
- "Name": model.display_name,
39
- "Organization": model.organization,
48
+ "Model": model.id,
40
49
  "Type": model.type,
41
- "Context Length": model.context_length,
42
- "License": model.license,
43
- "Input per 1M token": model.pricing.input if model.pricing else None,
44
- "Output per 1M token": model.pricing.output if model.pricing else None,
50
+ "Context length": model.context_length if model.context_length else None,
51
+ "Price per 1M Tokens (input/output)": "/".join(price_parts),
45
52
  }
46
53
  )
47
54
 
48
- if json:
49
- click.echo(json_lib.dumps(display_list, indent=2))
50
- else:
51
- click.echo(tabulate(display_list, headers="keys", tablefmt="plain"))
55
+ click.echo(tabulate(display_list, headers="keys"))
@@ -81,7 +81,7 @@ class EndpointsResource(SyncAPIResource):
81
81
 
82
82
  availability_zone: Create the endpoint in a specified availability zone (e.g., us-central-4b)
83
83
 
84
- disable_prompt_cache: Whether to disable the prompt cache for this endpoint
84
+ disable_prompt_cache: This parameter is deprecated and no longer has any effect.
85
85
 
86
86
  disable_speculative_decoding: Whether to disable speculative decoding for this endpoint
87
87
 
@@ -375,7 +375,7 @@ class AsyncEndpointsResource(AsyncAPIResource):
375
375
 
376
376
  availability_zone: Create the endpoint in a specified availability zone (e.g., us-central-4b)
377
377
 
378
- disable_prompt_cache: Whether to disable the prompt cache for this endpoint
378
+ disable_prompt_cache: This parameter is deprecated and no longer has any effect.
379
379
 
380
380
  disable_speculative_decoding: Whether to disable speculative decoding for this endpoint
381
381
 
@@ -24,7 +24,7 @@ class EndpointCreateParams(TypedDict, total=False):
24
24
  """Create the endpoint in a specified availability zone (e.g., us-central-4b)"""
25
25
 
26
26
  disable_prompt_cache: bool
27
- """Whether to disable the prompt cache for this endpoint"""
27
+ """This parameter is deprecated and no longer has any effect."""
28
28
 
29
29
  disable_speculative_decoding: bool
30
30
  """Whether to disable speculative decoding for this endpoint"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: together
3
- Version: 2.0.0a16
3
+ Version: 2.0.0a17
4
4
  Summary: The official Python library for the together API
5
5
  Project-URL: Homepage, https://github.com/togethercomputer/together-py
6
6
  Project-URL: Repository, https://github.com/togethercomputer/together-py
@@ -11,7 +11,7 @@ together/_resource.py,sha256=-ZTq9O5qf2YsgjJk_gwJs-CM_OG4p6gdMLcNWjuxFwQ,1112
11
11
  together/_response.py,sha256=lvqEsCbpD8SRJTjlhhUFGbnLUR_4-Qva-OApxfVdiY4,28800
12
12
  together/_streaming.py,sha256=sk6fVYbpdO3Y-0S5iwZTHQJ3N24UkK0KaupgUTftWZk,11825
13
13
  together/_types.py,sha256=6XJrgQABAp4xUfdSwlKJ3gAG0eRQHG92TwqqxgLh_tI,7596
14
- together/_version.py,sha256=KrBQd6trfZ-62WQZY087FReuHWQooZCvvm8x38I0PoM,169
14
+ together/_version.py,sha256=wOUjcWV7EyqOH6E2UiB_0-mvr8MtoU08tEf3Wns5O0s,169
15
15
  together/constants.py,sha256=U1SgiirDQMiT5XvyrGcnNxPKlFmWeKq3TGkWLtB705w,1305
16
16
  together/error.py,sha256=Xn-OeVpHIP06zWuLlqCTdglks2UOZpjdXzi2P46NlqA,452
17
17
  together/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -49,7 +49,7 @@ together/lib/cli/api/beta/clusters/storage/list.py,sha256=Pn12uJ7HhZ2MfRBeVMc8md
49
49
  together/lib/cli/api/beta/clusters/storage/retrieve.py,sha256=PnyZxZ_DKN-UNVITpOBP94y56hatbh1WOwqWYAV7eu8,772
50
50
  together/lib/cli/api/endpoints/__init__.py,sha256=wZJvqaNxQhOZ6NLctrRjR2tbf6rL14ZGHQ_w-fmmCcI,1759
51
51
  together/lib/cli/api/endpoints/availability_zones.py,sha256=DF1gxtmvhyQyIIOYw7QS00k2tDMJ1E5qPVoLu2gLBI8,766
52
- together/lib/cli/api/endpoints/create.py,sha256=Q3P5FVJDL_Xa27JXL4FA-agP9GZDU23zyV5DM1QPeQE,4821
52
+ together/lib/cli/api/endpoints/create.py,sha256=mz2L9BtDr6yYrwMOmnGw0sBzw4YpeyuRaVpugSsa0E0,4918
53
53
  together/lib/cli/api/endpoints/delete.py,sha256=rvLcI_m5N8Mx2elNxJB4aPDuMuGmFcKaJcQO1BKauCA,447
54
54
  together/lib/cli/api/endpoints/hardware.py,sha256=FufyNgnKl_VjFkUlJ4QmfUGPCpXuHF4AbmQGJ3c9C3o,1521
55
55
  together/lib/cli/api/endpoints/list.py,sha256=EUr3p2VXNPiwED_LIzAPTmvjlpuPbAzCEGfzmCEl0mM,1734
@@ -79,7 +79,7 @@ together/lib/cli/api/fine_tuning/list_checkpoints.py,sha256=I1dFgfHTXfN7a3NvSAhn
79
79
  together/lib/cli/api/fine_tuning/list_events.py,sha256=GUVuFFpJNL_BkxYVgtLSzuhBPdrU8p8itdCf5-tPNQM,981
80
80
  together/lib/cli/api/fine_tuning/retrieve.py,sha256=IskJVcfWwxaB-0jOHZ2nrew4mozNixza9R-95psBzrY,870
81
81
  together/lib/cli/api/models/__init__.py,sha256=eITfO7XSwhdRQMUYlmVKge_lpOCmKnEGL3PhvjQlttM,234
82
- together/lib/cli/api/models/list.py,sha256=gcLh9Ek_2cPjhdiFC9T-1rnvdC6wMrEmXvo2EtsYy3Q,1593
82
+ together/lib/cli/api/models/list.py,sha256=W5DT-rlLvpO-X1INbES8qQTJ9PrcyIrZbQ17cG0AY8E,1796
83
83
  together/lib/cli/api/models/upload.py,sha256=wG4EV2WO1eFVd0hOIY9YvQF2-yMdFW4YlryUYJJAHn0,2708
84
84
  together/lib/resources/__init__.py,sha256=ystIb0pBHQLuwUBtHJwhRgtjK3_TV6K0KuM8NGuuNoU,172
85
85
  together/lib/resources/files.py,sha256=Z_D23IvjYYWBpYrfYolCNfUslJBcE4PnU0WtuLsN67M,37277
@@ -96,7 +96,7 @@ together/resources/__init__.py,sha256=GRjbTMmep-fxfaRYWazySFcfeZBaztG_skfnsSaAb1
96
96
  together/resources/batches.py,sha256=FTdtVrCGstua94Imd5kqPhvzTBA8MdcFXuNb9gMha8Q,15386
97
97
  together/resources/completions.py,sha256=DHTQs7PLxjwWacEtRSmB2AKat3DaWotm8vz2Z7F_WDE,41505
98
98
  together/resources/embeddings.py,sha256=7EU6DZQd0Nm0Sh7x7v37QQOLNuLqNmcjdJAyOTckeRo,7447
99
- together/resources/endpoints.py,sha256=dYdLlAJ0P7HJNhzZGxlbzEQYpUWsh35cjAMVfdWiifw,27884
99
+ together/resources/endpoints.py,sha256=-EyX1MfUoBA94JqkDPf2UkFjCzuShThLM2MnJ57gOBA,27894
100
100
  together/resources/evals.py,sha256=FPjvkbsBY5rrzLyQ-X1G9fWt2QmivI9ol5GExGtqYVA,16216
101
101
  together/resources/files.py,sha256=0paHeVqNt3NQCXoztCgFS8PEIg_-mMVto-ulHTr7GzE,16854
102
102
  together/resources/fine_tuning.py,sha256=BiCxQpdTjW5ArBufmWHNQoYY4z7Ulge8dI9GDCa5Dow,54795
@@ -139,7 +139,7 @@ together/types/completion_create_params.py,sha256=IxnGl1I_7sJl5rW57DwJfA74-nEnJT
139
139
  together/types/dedicated_endpoint.py,sha256=eZx8Arh3WEWpsFciws0CF7Z2RlWw5wKiA6NIPtcCrZY,1147
140
140
  together/types/embedding.py,sha256=ThcALXoTfDPptcFikqfUjDkBTHk3diJtYJ4hXYQOVHk,413
141
141
  together/types/embedding_create_params.py,sha256=6FEUFFRj3EQ7_3T8qjjCpfpA1YWzcpcO259db5koNCo,913
142
- together/types/endpoint_create_params.py,sha256=GnfrwDdtGTJjSrPgE8lxRz4Hfql8DMVBRAnY6gSmLVo,1311
142
+ together/types/endpoint_create_params.py,sha256=-9rL6FvjMBJGquBG4kTpJ7j0Ot7nkE3srr44-W_f8uc,1316
143
143
  together/types/endpoint_list_avzones_response.py,sha256=LbzRkG7snD7Swy-t0E0MLXrlU-utn_N9qPwjPkr8jT4,303
144
144
  together/types/endpoint_list_params.py,sha256=83Mg5beLYX_ipn1X_izk7hDIO8q8YNEL-tjsv5AcNXo,506
145
145
  together/types/endpoint_list_response.py,sha256=LPyv8np_HctSW0QKstC8k7vF0RAejb6X9N2JowZtaEY,1010
@@ -226,8 +226,8 @@ together/types/chat/chat_completion_warning.py,sha256=_Dp7YKlxyY2HeZopTvT-Go7qqK
226
226
  together/types/chat/completion_create_params.py,sha256=GpOQIpL2hODOV-iPoilHxo5UYP_KHJ-zdZMP-VW87-g,13755
227
227
  together/types/code_interpreter/__init__.py,sha256=dAXfb3ryLMtcBalCfxxNu2wJVswVP8G1xXryZnahPQY,201
228
228
  together/types/code_interpreter/session_list_response.py,sha256=TRxLGFTmIY-KLpStKjJtsrm4EI6BBvakpx43B6pkhnw,662
229
- together-2.0.0a16.dist-info/METADATA,sha256=0VoI6xgnRwNl5aE1rHBnfLNf6ZaWw8fTBvokjshDkWY,21255
230
- together-2.0.0a16.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
231
- together-2.0.0a16.dist-info/entry_points.txt,sha256=urdkNVg6rlks26fHnWO7smiBtaZ6Vr75hlsoHSJ7TKc,51
232
- together-2.0.0a16.dist-info/licenses/LICENSE,sha256=oSs-kmJHhMue4vIIPIxQMvXou9PbxgNdIX-r_AwfO7c,11338
233
- together-2.0.0a16.dist-info/RECORD,,
229
+ together-2.0.0a17.dist-info/METADATA,sha256=ie2XtMpnQOyhDe8IuvPleBfL7hqKMswn7zwYEZZsstk,21255
230
+ together-2.0.0a17.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
231
+ together-2.0.0a17.dist-info/entry_points.txt,sha256=urdkNVg6rlks26fHnWO7smiBtaZ6Vr75hlsoHSJ7TKc,51
232
+ together-2.0.0a17.dist-info/licenses/LICENSE,sha256=oSs-kmJHhMue4vIIPIxQMvXou9PbxgNdIX-r_AwfO7c,11338
233
+ together-2.0.0a17.dist-info/RECORD,,