Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes double call to cell help command #220

Merged
merged 3 commits into from
Jun 9, 2023

Conversation

JasonWeill
Copy link
Collaborator

Fixes the %ai help command to only display the %%ai cell magic help information once, not twice. Updates sample notebook. Fixes #204.

Revised output is below.

Usage: %%ai [OPTIONS] MODEL_ID

  Invokes a language model identified by MODEL_ID, with the prompt being
  contained in all lines after the first. Both local model IDs and global
  model IDs (with the provider ID explicitly prefixed, followed by a colon)
  are accepted.

  To view available language models, please run `%ai list`.

Options:
  -f, --format [code|html|image|json|markdown|math|md|text]
                                  IPython display to use when rendering
                                  output. [default="markdown"]
  -r, --reset                     Clears the conversation transcript used when
                                  interacting with an OpenAI chat model
                                  provider. Does nothing with other providers.
  -n, --region-name TEXT          AWS region name, e.g. 'us-east-1'. Required
                                  for SageMaker provider; does nothing with
                                  other providers.
  -q, --request-schema TEXT       The JSON object the endpoint expects, with
                                  the prompt being substituted into any value
                                  that matches the string literal '<prompt>'.
                                  Required for SageMaker provider; does
                                  nothing with other providers.
  -p, --response-path TEXT        A JSONPath string that retrieves the
                                  language model's output from the endpoint's
                                  JSON response. Required for SageMaker
                                  provider; does nothing with other providers.
  --help                          Show this message and exit.
------------------------------------------------------------------------------
Usage: %ai [OPTIONS] COMMAND [ARGS]...

  Invokes a subcommand.

Options:
  --help  Show this message and exit.

Commands:
  delete    Delete an alias. See `%ai delete --help` for options.
  error     Explains the most recent error.
  help      Show this message and exit.
  list      List language models. See `%ai list --help` for options.
  register  Register a new alias. See `%ai register --help` for options.
  update    Update the target of an alias. See `%ai update --help` for
            options.

@JasonWeill JasonWeill added bug Something isn't working @jupyter-ai/magics labels Jun 9, 2023
@3coins 3coins added this to the 0.8.0 Release milestone Jun 9, 2023
@JasonWeill JasonWeill merged commit 97c413e into jupyterlab:main Jun 9, 2023
3coins pushed a commit to krassowski/jupyter-ai that referenced this pull request Jun 15, 2023
* Fixes double call to cell help command

* Parity between %ai --help and %ai help

* Revert nonfunctional change
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Fixes double call to cell help command

* Parity between %ai --help and %ai help

* Revert nonfunctional change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @jupyter-ai/magics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running %ai help yields %%ai help twice
2 participants