diff --git a/examples/commands.ipynb b/examples/commands.ipynb index e87e90205..17726c97e 100644 --- a/examples/commands.ipynb +++ b/examples/commands.ipynb @@ -62,24 +62,18 @@ " -r, --reset Clears the conversation transcript used when\n", " interacting with an OpenAI chat model\n", " provider. Does nothing with other providers.\n", - " --help Show this message and exit.\n", - "------------------------------------------------------------------------------\n", - "Usage: %%ai [OPTIONS] MODEL_ID\n", - "\n", - " Invokes a language model identified by MODEL_ID, with the prompt being\n", - " contained in all lines after the first. Both local model IDs and global\n", - " model IDs (with the provider ID explicitly prefixed, followed by a colon)\n", - " are accepted.\n", - "\n", - " To view available language models, please run `%ai list`.\n", - "\n", - "Options:\n", - " -f, --format [code|html|image|json|markdown|math|md|text]\n", - " IPython display to use when rendering\n", - " output. [default=\"markdown\"]\n", - " -r, --reset Clears the conversation transcript used when\n", - " interacting with an OpenAI chat model\n", - " provider. Does nothing with other providers.\n", + " -n, --region-name TEXT AWS region name, e.g. 'us-east-1'. Required\n", + " for SageMaker provider; does nothing with\n", + " other providers.\n", + " -q, --request-schema TEXT The JSON object the endpoint expects, with\n", + " the prompt being substituted into any value\n", + " that matches the string literal ''.\n", + " Required for SageMaker provider; does\n", + " nothing with other providers.\n", + " -p, --response-path TEXT A JSONPath string that retrieves the\n", + " language model's output from the endpoint's\n", + " JSON response. Required for SageMaker\n", + " provider; does nothing with other providers.\n", " --help Show this message and exit.\n", "------------------------------------------------------------------------------\n", "Usage: %ai [OPTIONS] COMMAND [ARGS]...\n", diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/magics.py b/packages/jupyter-ai-magics/jupyter_ai_magics/magics.py index 8f6118d15..f9eebcac1 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/magics.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/magics.py @@ -419,9 +419,7 @@ def display_output(self, output, display_format, md): return output_display def handle_help(self, _: HelpArgs): - with click.Context(cell_magic_parser, info_name="%%ai") as ctx: - click.echo(cell_magic_parser.get_help(ctx)) - click.echo('-' * 78) + # The line parser's help function prints both cell and line help with click.Context(line_magic_parser, info_name="%ai") as ctx: click.echo(line_magic_parser.get_help(ctx))