|
26 | 26 | from together.lib.cli.utils._console import console |
27 | 27 | from together.lib.cli.utils._api_error import try_handle_server_error_message |
28 | 28 | from together.lib.cli.utils._completion import install_completion |
| 29 | +from together.lib.cli.utils._help_examples import ( |
| 30 | + ENDPOINTS_HELP_EXAMPLES, |
| 31 | + TOP_LEVEL_HELP_EXAMPLES, |
| 32 | + ENDPOINTS_CREATE_HELP_EXAMPLES, |
| 33 | + ENDPOINTS_UPDATE_HELP_EXAMPLES, |
| 34 | + ENDPOINTS_HARDWARE_HELP_EXAMPLES, |
| 35 | +) |
29 | 36 | from together.lib.cli.utils._help_formatter import help_formatter |
30 | 37 | from together.lib.cli.utils._preparse_tokens import preparse_tokens |
31 | 38 |
|
@@ -326,17 +333,28 @@ async def run_command() -> None: |
326 | 333 | ## Endpoints API commands |
327 | 334 | endpoints_app = app.command(App(name="endpoints", help="Deploy and manage dedicated endpoints")) |
328 | 335 | endpoints_app.command( |
329 | | - (f"{_CLI}.endpoints.hardware:hardware"), help="List available hardware configurations for deploying models" |
| 336 | + (f"{_CLI}.endpoints.hardware:hardware"), |
| 337 | + help="List available hardware configurations for deploying models", |
| 338 | + help_epilogue=ENDPOINTS_HARDWARE_HELP_EXAMPLES, |
| 339 | +) |
| 340 | +endpoints_app.command( |
| 341 | + (f"{_CLI}.endpoints.create:create"), |
| 342 | + alias="-c", |
| 343 | + help="Create a new endpoint", |
| 344 | + help_epilogue=ENDPOINTS_CREATE_HELP_EXAMPLES, |
330 | 345 | ) |
331 | | -endpoints_app.command((f"{_CLI}.endpoints.create:create"), alias="-c", help="Create a new endpoint") |
332 | | -endpoints_app.command((f"{_CLI}.endpoints.retrieve:retrieve"), help="Get endpoint details") |
333 | | -endpoints_app.command((f"{_CLI}.endpoints.stop:stop"), help="Stop an endpoint") |
334 | | -endpoints_app.command((f"{_CLI}.endpoints.start:start"), help="Start an endpoint") |
335 | | -endpoints_app.command((f"{_CLI}.endpoints.delete:delete"), alias="-d", help="Delete an endpoint") |
336 | | -endpoints_app.command((f"{_CLI}.endpoints.list:list"), alias="ls", help="List your endpoints") |
337 | | -endpoints_app.command((f"{_CLI}.endpoints.update:update"), help="Update an endpoint") |
| 346 | +endpoints_app.command((f"{_CLI}.endpoints.retrieve:retrieve"), help="Get endpoint details", help_epilogue="") |
| 347 | +endpoints_app.command((f"{_CLI}.endpoints.stop:stop"), help="Stop an endpoint", help_epilogue="") |
| 348 | +endpoints_app.command((f"{_CLI}.endpoints.start:start"), help="Start an endpoint", help_epilogue="") |
| 349 | +endpoints_app.command((f"{_CLI}.endpoints.delete:delete"), alias="-d", help="Delete an endpoint", help_epilogue="") |
| 350 | +endpoints_app.command((f"{_CLI}.endpoints.list:list"), alias="ls", help="List your endpoints", help_epilogue="") |
338 | 351 | endpoints_app.command( |
339 | | - (f"{_CLI}.endpoints.availability_zones:availability_zones"), help="List availability zones for deploying models" |
| 352 | + (f"{_CLI}.endpoints.update:update"), help="Update an endpoint", help_epilogue=ENDPOINTS_UPDATE_HELP_EXAMPLES |
| 353 | +) |
| 354 | +endpoints_app.command( |
| 355 | + (f"{_CLI}.endpoints.availability_zones:availability_zones"), |
| 356 | + help="List availability zones for deploying models", |
| 357 | + help_epilogue="", |
340 | 358 | ) |
341 | 359 |
|
342 | 360 | ## Evals API commands |
@@ -435,6 +453,9 @@ async def run_command() -> None: |
435 | 453 | (f"{_CLI}.beta.jig.jig:jig_volumes_list"), name="list", alias="ls", help="List volumes for a Jig deployment" |
436 | 454 | ) |
437 | 455 |
|
| 456 | +app.help_epilogue = TOP_LEVEL_HELP_EXAMPLES |
| 457 | +endpoints_app.help_epilogue = ENDPOINTS_HELP_EXAMPLES |
| 458 | + |
438 | 459 |
|
439 | 460 | def main() -> None: |
440 | 461 | install_completion(app) |
|
0 commit comments