AI commands#

You can use the %ai cell magic to run special commands. If a model has the same name as a command, you will need to refer to the model using the provider:model format only; the model shortcut will not work.

[1]:
%reload_ext jupyter_ai

Getting help#

%ai help will show you a list of all supported commands.

[2]:
%ai help
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"]
  -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.
  -m, --model-parameters TEXT     A JSON value that specifies extra values
                                  that will be passed to the model. The
                                  accepted value parsed to a dict, unpacked
                                  and passed as-is to the provider class.
  --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.

[3]:
%ai register --help
Usage: %ai register [OPTIONS] NAME TARGET

  Register a new alias called NAME for the model or chain named TARGET.

Options:
  --help  Show this message and exit.
[4]:
%ai list
[4]:

Provider

Environment variable

Set?

Models

| ai21 | AI21_API_KEY | ✅ |

  • ai21:j1-large

  • ai21:j1-grande

  • ai21:j1-jumbo

  • ai21:j1-grande-instruct

  • ai21:j2-large

  • ai21:j2-grande

  • ai21:j2-jumbo

  • ai21:j2-grande-instruct

  • ai21:j2-jumbo-instruct

| | bedrock | Not applicable. | N/A |

  • bedrock:amazon.titan-text-express-v1

  • bedrock:ai21.j2-ultra-v1

  • bedrock:ai21.j2-mid-v1

  • bedrock:cohere.command-light-text-v14

  • bedrock:cohere.command-text-v14

  • bedrock:meta.llama2-13b-chat-v1

  • bedrock:meta.llama2-70b-chat-v1

| | bedrock-chat | Not applicable. | N/A |

  • bedrock-chat:anthropic.claude-v1

  • bedrock-chat:anthropic.claude-v2

  • bedrock-chat:anthropic.claude-v2:1

  • bedrock-chat:anthropic.claude-instant-v1

| | anthropic | ANTHROPIC_API_KEY | ✅ |

  • anthropic:claude-v1

  • anthropic:claude-v1.0

  • anthropic:claude-v1.2

  • anthropic:claude-2

  • anthropic:claude-2.0

  • anthropic:claude-instant-v1

  • anthropic:claude-instant-v1.0

  • anthropic:claude-instant-v1.2

| | anthropic-chat | ANTHROPIC_API_KEY | ✅ |

  • anthropic-chat:claude-v1

  • anthropic-chat:claude-v1.0

  • anthropic-chat:claude-v1.2

  • anthropic-chat:claude-2

  • anthropic-chat:claude-2.0

  • anthropic-chat:claude-instant-v1

  • anthropic-chat:claude-instant-v1.0

  • anthropic-chat:claude-instant-v1.2

| | azure-chat-openai | OPENAI_API_KEY | ✅ | This provider does not define a list of models. | | cohere | COHERE_API_KEY | ✅ |

  • cohere:command

  • cohere:command-nightly

  • cohere:command-light

  • cohere:command-light-nightly

| | gpt4all | Not applicable. | N/A |

  • gpt4all:ggml-gpt4all-j-v1.2-jazzy

  • gpt4all:ggml-gpt4all-j-v1.3-groovy

  • gpt4all:ggml-gpt4all-l13b-snoozy

  • gpt4all:mistral-7b-openorca.Q4_0

  • gpt4all:mistral-7b-instruct-v0.1.Q4_0

  • gpt4all:gpt4all-falcon-q4_0

  • gpt4all:wizardlm-13b-v1.2.Q4_0

  • gpt4all:nous-hermes-llama2-13b.Q4_0

  • gpt4all:gpt4all-13b-snoozy-q4_0

  • gpt4all:mpt-7b-chat-merges-q4_0

  • gpt4all:orca-mini-3b-gguf2-q4_0

  • gpt4all:starcoder-q4_0

  • gpt4all:rift-coder-v0-7b-q4_0

  • gpt4all:em_german_mistral_v01.Q4_0

| | huggingface_hub | HUGGINGFACEHUB_API_TOKEN | ✅ | See https://huggingface.co/models for a list of models. Pass a model’s repository ID as the model ID; for example, huggingface_hub:ExampleOwner/example-model. | | openai | OPENAI_API_KEY | ✅ |

  • openai:babbage-002

  • openai:davinci-002

  • openai:gpt-3.5-turbo-instruct

| | openai-chat | OPENAI_API_KEY | ✅ |

  • openai-chat:gpt-3.5-turbo

  • openai-chat:gpt-3.5-turbo-0301

  • openai-chat:gpt-3.5-turbo-0613

  • openai-chat:gpt-3.5-turbo-1106

  • openai-chat:gpt-3.5-turbo-16k

  • openai-chat:gpt-3.5-turbo-16k-0613

  • openai-chat:gpt-4

  • openai-chat:gpt-4-0613

  • openai-chat:gpt-4-32k

  • openai-chat:gpt-4-32k-0613

  • openai-chat:gpt-4-1106-preview

| | qianfan | QIANFAN_AK, QIANFAN_SK | ❌ |

  • qianfan:ERNIE-Bot

  • qianfan:ERNIE-Bot-4

| | sagemaker-endpoint | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must specify a region name, request schema, and response path. For more information, see the documentation about SageMaker endpoints deployment and about using magic commands with SageMaker endpoints. |

Aliases and custom commands:

Name

Target

gpt2

huggingface_hub:gpt2

gpt3

openai:davinci-002

chatgpt

openai-chat:gpt-3.5-turbo

gpt4

openai-chat:gpt-4

ernie-bot

qianfan:ERNIE-Bot

ernie-bot-4

qianfan:ERNIE-Bot-4

titan

bedrock:amazon.titan-tg1-large

[5]:
%ai list openai
[5]:

Provider

Environment variable

Set?

Models

| openai | OPENAI_API_KEY | ✅ |

  • openai:babbage-002

  • openai:davinci-002

  • openai:gpt-3.5-turbo-instruct

|

Model aliases#

Using the syntax %ai register NAME TARGET, you can create a new alias to an existing alias’s target. The target must be specified using the full provider:model syntax. You cannot create an alias to another alias.

[6]:
%ai register mychat openai-chat:gpt-4
[6]:

Registered new alias mychat

[7]:
%ai list
[7]:

Provider

Environment variable

Set?

Models

| ai21 | AI21_API_KEY | ✅ |

  • ai21:j1-large

  • ai21:j1-grande

  • ai21:j1-jumbo

  • ai21:j1-grande-instruct

  • ai21:j2-large

  • ai21:j2-grande

  • ai21:j2-jumbo

  • ai21:j2-grande-instruct

  • ai21:j2-jumbo-instruct

| | bedrock | Not applicable. | N/A |

  • bedrock:amazon.titan-text-express-v1

  • bedrock:ai21.j2-ultra-v1

  • bedrock:ai21.j2-mid-v1

  • bedrock:cohere.command-light-text-v14

  • bedrock:cohere.command-text-v14

  • bedrock:meta.llama2-13b-chat-v1

  • bedrock:meta.llama2-70b-chat-v1

| | bedrock-chat | Not applicable. | N/A |

  • bedrock-chat:anthropic.claude-v1

  • bedrock-chat:anthropic.claude-v2

  • bedrock-chat:anthropic.claude-v2:1

  • bedrock-chat:anthropic.claude-instant-v1

| | anthropic | ANTHROPIC_API_KEY | ✅ |

  • anthropic:claude-v1

  • anthropic:claude-v1.0

  • anthropic:claude-v1.2

  • anthropic:claude-2

  • anthropic:claude-2.0

  • anthropic:claude-instant-v1

  • anthropic:claude-instant-v1.0

  • anthropic:claude-instant-v1.2

| | anthropic-chat | ANTHROPIC_API_KEY | ✅ |

  • anthropic-chat:claude-v1

  • anthropic-chat:claude-v1.0

  • anthropic-chat:claude-v1.2

  • anthropic-chat:claude-2

  • anthropic-chat:claude-2.0

  • anthropic-chat:claude-instant-v1

  • anthropic-chat:claude-instant-v1.0

  • anthropic-chat:claude-instant-v1.2

| | azure-chat-openai | OPENAI_API_KEY | ✅ | This provider does not define a list of models. | | cohere | COHERE_API_KEY | ✅ |

  • cohere:command

  • cohere:command-nightly

  • cohere:command-light

  • cohere:command-light-nightly

| | gpt4all | Not applicable. | N/A |

  • gpt4all:ggml-gpt4all-j-v1.2-jazzy

  • gpt4all:ggml-gpt4all-j-v1.3-groovy

  • gpt4all:ggml-gpt4all-l13b-snoozy

  • gpt4all:mistral-7b-openorca.Q4_0

  • gpt4all:mistral-7b-instruct-v0.1.Q4_0

  • gpt4all:gpt4all-falcon-q4_0

  • gpt4all:wizardlm-13b-v1.2.Q4_0

  • gpt4all:nous-hermes-llama2-13b.Q4_0

  • gpt4all:gpt4all-13b-snoozy-q4_0

  • gpt4all:mpt-7b-chat-merges-q4_0

  • gpt4all:orca-mini-3b-gguf2-q4_0

  • gpt4all:starcoder-q4_0

  • gpt4all:rift-coder-v0-7b-q4_0

  • gpt4all:em_german_mistral_v01.Q4_0

| | huggingface_hub | HUGGINGFACEHUB_API_TOKEN | ✅ | See https://huggingface.co/models for a list of models. Pass a model’s repository ID as the model ID; for example, huggingface_hub:ExampleOwner/example-model. | | openai | OPENAI_API_KEY | ✅ |

  • openai:babbage-002

  • openai:davinci-002

  • openai:gpt-3.5-turbo-instruct

| | openai-chat | OPENAI_API_KEY | ✅ |

  • openai-chat:gpt-3.5-turbo

  • openai-chat:gpt-3.5-turbo-0301

  • openai-chat:gpt-3.5-turbo-0613

  • openai-chat:gpt-3.5-turbo-1106

  • openai-chat:gpt-3.5-turbo-16k

  • openai-chat:gpt-3.5-turbo-16k-0613

  • openai-chat:gpt-4

  • openai-chat:gpt-4-0613

  • openai-chat:gpt-4-32k

  • openai-chat:gpt-4-32k-0613

  • openai-chat:gpt-4-1106-preview

| | qianfan | QIANFAN_AK, QIANFAN_SK | ❌ |

  • qianfan:ERNIE-Bot

  • qianfan:ERNIE-Bot-4

| | sagemaker-endpoint | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must specify a region name, request schema, and response path. For more information, see the documentation about SageMaker endpoints deployment and about using magic commands with SageMaker endpoints. |

Aliases and custom commands:

Name

Target

gpt2

huggingface_hub:gpt2

gpt3

openai:davinci-002

chatgpt

openai-chat:gpt-3.5-turbo

gpt4

openai-chat:gpt-4

ernie-bot

qianfan:ERNIE-Bot

ernie-bot-4

qianfan:ERNIE-Bot-4

titan

bedrock:amazon.titan-tg1-large

mychat

openai-chat:gpt-4

[8]:
%%ai gpt4
What model is this?
[8]:

Apologies for the confusion, but your question is not clear. Could you please provide more details or context? Are you asking about a specific car, phone, laptop, or other product model? Without this crucial information, it’s impossible to give an accurate answer.

[9]:
%ai update mychat openai:babbage-002
[9]:

Updated target of alias mychat

[10]:
%%ai mychat
Tell me about mathematical symbols
[10]:

No HTML or other code.

What is the difference between an assignment and a function call? Why is an assignment called a value assignment and a function call a value function?

A value function is a function that takes no arguments, is returning a value. A function call is when you type in the name of a function.

Below are the symbols used in the COVID-19 pandemic:

The STARS symbol stands for the Swedish National Board of Health and Welfare.

The HEALTHY symbol stands for the Swedish National Board of Health and Welfare.

The HEALTHY symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for the Swedish National Board of Health and Welfare.

The COVID-19 symbol stands for

[11]:
%ai list
[11]:

Provider

Environment variable

Set?

Models

| ai21 | AI21_API_KEY | ✅ |

  • ai21:j1-large

  • ai21:j1-grande

  • ai21:j1-jumbo

  • ai21:j1-grande-instruct

  • ai21:j2-large

  • ai21:j2-grande

  • ai21:j2-jumbo

  • ai21:j2-grande-instruct

  • ai21:j2-jumbo-instruct

| | bedrock | Not applicable. | N/A |

  • bedrock:amazon.titan-text-express-v1

  • bedrock:ai21.j2-ultra-v1

  • bedrock:ai21.j2-mid-v1

  • bedrock:cohere.command-light-text-v14

  • bedrock:cohere.command-text-v14

  • bedrock:meta.llama2-13b-chat-v1

  • bedrock:meta.llama2-70b-chat-v1

| | bedrock-chat | Not applicable. | N/A |

  • bedrock-chat:anthropic.claude-v1

  • bedrock-chat:anthropic.claude-v2

  • bedrock-chat:anthropic.claude-v2:1

  • bedrock-chat:anthropic.claude-instant-v1

| | anthropic | ANTHROPIC_API_KEY | ✅ |

  • anthropic:claude-v1

  • anthropic:claude-v1.0

  • anthropic:claude-v1.2

  • anthropic:claude-2

  • anthropic:claude-2.0

  • anthropic:claude-instant-v1

  • anthropic:claude-instant-v1.0

  • anthropic:claude-instant-v1.2

| | anthropic-chat | ANTHROPIC_API_KEY | ✅ |

  • anthropic-chat:claude-v1

  • anthropic-chat:claude-v1.0

  • anthropic-chat:claude-v1.2

  • anthropic-chat:claude-2

  • anthropic-chat:claude-2.0

  • anthropic-chat:claude-instant-v1

  • anthropic-chat:claude-instant-v1.0

  • anthropic-chat:claude-instant-v1.2

| | azure-chat-openai | OPENAI_API_KEY | ✅ | This provider does not define a list of models. | | cohere | COHERE_API_KEY | ✅ |

  • cohere:command

  • cohere:command-nightly

  • cohere:command-light

  • cohere:command-light-nightly

| | gpt4all | Not applicable. | N/A |

  • gpt4all:ggml-gpt4all-j-v1.2-jazzy

  • gpt4all:ggml-gpt4all-j-v1.3-groovy

  • gpt4all:ggml-gpt4all-l13b-snoozy

  • gpt4all:mistral-7b-openorca.Q4_0

  • gpt4all:mistral-7b-instruct-v0.1.Q4_0

  • gpt4all:gpt4all-falcon-q4_0

  • gpt4all:wizardlm-13b-v1.2.Q4_0

  • gpt4all:nous-hermes-llama2-13b.Q4_0

  • gpt4all:gpt4all-13b-snoozy-q4_0

  • gpt4all:mpt-7b-chat-merges-q4_0

  • gpt4all:orca-mini-3b-gguf2-q4_0

  • gpt4all:starcoder-q4_0

  • gpt4all:rift-coder-v0-7b-q4_0

  • gpt4all:em_german_mistral_v01.Q4_0

| | huggingface_hub | HUGGINGFACEHUB_API_TOKEN | ✅ | See https://huggingface.co/models for a list of models. Pass a model’s repository ID as the model ID; for example, huggingface_hub:ExampleOwner/example-model. | | openai | OPENAI_API_KEY | ✅ |

  • openai:babbage-002

  • openai:davinci-002

  • openai:gpt-3.5-turbo-instruct

| | openai-chat | OPENAI_API_KEY | ✅ |

  • openai-chat:gpt-3.5-turbo

  • openai-chat:gpt-3.5-turbo-0301

  • openai-chat:gpt-3.5-turbo-0613

  • openai-chat:gpt-3.5-turbo-1106

  • openai-chat:gpt-3.5-turbo-16k

  • openai-chat:gpt-3.5-turbo-16k-0613

  • openai-chat:gpt-4

  • openai-chat:gpt-4-0613

  • openai-chat:gpt-4-32k

  • openai-chat:gpt-4-32k-0613

  • openai-chat:gpt-4-1106-preview

| | qianfan | QIANFAN_AK, QIANFAN_SK | ❌ |

  • qianfan:ERNIE-Bot

  • qianfan:ERNIE-Bot-4

| | sagemaker-endpoint | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must specify a region name, request schema, and response path. For more information, see the documentation about SageMaker endpoints deployment and about using magic commands with SageMaker endpoints. |

Aliases and custom commands:

Name

Target

gpt2

huggingface_hub:gpt2

gpt3

openai:davinci-002

chatgpt

openai-chat:gpt-3.5-turbo

gpt4

openai-chat:gpt-4

ernie-bot

qianfan:ERNIE-Bot

ernie-bot-4

qianfan:ERNIE-Bot-4

titan

bedrock:amazon.titan-tg1-large

mychat

openai:babbage-002

[12]:
%ai delete mychat
[12]:

Deleted alias mychat

[13]:
%ai list
[13]:

Provider

Environment variable

Set?

Models

| ai21 | AI21_API_KEY | ✅ |

  • ai21:j1-large

  • ai21:j1-grande

  • ai21:j1-jumbo

  • ai21:j1-grande-instruct

  • ai21:j2-large

  • ai21:j2-grande

  • ai21:j2-jumbo

  • ai21:j2-grande-instruct

  • ai21:j2-jumbo-instruct

| | bedrock | Not applicable. | N/A |

  • bedrock:amazon.titan-text-express-v1

  • bedrock:ai21.j2-ultra-v1

  • bedrock:ai21.j2-mid-v1

  • bedrock:cohere.command-light-text-v14

  • bedrock:cohere.command-text-v14

  • bedrock:meta.llama2-13b-chat-v1

  • bedrock:meta.llama2-70b-chat-v1

| | bedrock-chat | Not applicable. | N/A |

  • bedrock-chat:anthropic.claude-v1

  • bedrock-chat:anthropic.claude-v2

  • bedrock-chat:anthropic.claude-v2:1

  • bedrock-chat:anthropic.claude-instant-v1

| | anthropic | ANTHROPIC_API_KEY | ✅ |

  • anthropic:claude-v1

  • anthropic:claude-v1.0

  • anthropic:claude-v1.2

  • anthropic:claude-2

  • anthropic:claude-2.0

  • anthropic:claude-instant-v1

  • anthropic:claude-instant-v1.0

  • anthropic:claude-instant-v1.2

| | anthropic-chat | ANTHROPIC_API_KEY | ✅ |

  • anthropic-chat:claude-v1

  • anthropic-chat:claude-v1.0

  • anthropic-chat:claude-v1.2

  • anthropic-chat:claude-2

  • anthropic-chat:claude-2.0

  • anthropic-chat:claude-instant-v1

  • anthropic-chat:claude-instant-v1.0

  • anthropic-chat:claude-instant-v1.2

| | azure-chat-openai | OPENAI_API_KEY | ✅ | This provider does not define a list of models. | | cohere | COHERE_API_KEY | ✅ |

  • cohere:command

  • cohere:command-nightly

  • cohere:command-light

  • cohere:command-light-nightly

| | gpt4all | Not applicable. | N/A |

  • gpt4all:ggml-gpt4all-j-v1.2-jazzy

  • gpt4all:ggml-gpt4all-j-v1.3-groovy

  • gpt4all:ggml-gpt4all-l13b-snoozy

  • gpt4all:mistral-7b-openorca.Q4_0

  • gpt4all:mistral-7b-instruct-v0.1.Q4_0

  • gpt4all:gpt4all-falcon-q4_0

  • gpt4all:wizardlm-13b-v1.2.Q4_0

  • gpt4all:nous-hermes-llama2-13b.Q4_0

  • gpt4all:gpt4all-13b-snoozy-q4_0

  • gpt4all:mpt-7b-chat-merges-q4_0

  • gpt4all:orca-mini-3b-gguf2-q4_0

  • gpt4all:starcoder-q4_0

  • gpt4all:rift-coder-v0-7b-q4_0

  • gpt4all:em_german_mistral_v01.Q4_0

| | huggingface_hub | HUGGINGFACEHUB_API_TOKEN | ✅ | See https://huggingface.co/models for a list of models. Pass a model’s repository ID as the model ID; for example, huggingface_hub:ExampleOwner/example-model. | | openai | OPENAI_API_KEY | ✅ |

  • openai:babbage-002

  • openai:davinci-002

  • openai:gpt-3.5-turbo-instruct

| | openai-chat | OPENAI_API_KEY | ✅ |

  • openai-chat:gpt-3.5-turbo

  • openai-chat:gpt-3.5-turbo-0301

  • openai-chat:gpt-3.5-turbo-0613

  • openai-chat:gpt-3.5-turbo-1106

  • openai-chat:gpt-3.5-turbo-16k

  • openai-chat:gpt-3.5-turbo-16k-0613

  • openai-chat:gpt-4

  • openai-chat:gpt-4-0613

  • openai-chat:gpt-4-32k

  • openai-chat:gpt-4-32k-0613

  • openai-chat:gpt-4-1106-preview

| | qianfan | QIANFAN_AK, QIANFAN_SK | ❌ |

  • qianfan:ERNIE-Bot

  • qianfan:ERNIE-Bot-4

| | sagemaker-endpoint | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must specify a region name, request schema, and response path. For more information, see the documentation about SageMaker endpoints deployment and about using magic commands with SageMaker endpoints. |

Aliases and custom commands:

Name

Target

gpt2

huggingface_hub:gpt2

gpt3

openai:davinci-002

chatgpt

openai-chat:gpt-3.5-turbo

gpt4

openai-chat:gpt-4

ernie-bot

qianfan:ERNIE-Bot

ernie-bot-4

qianfan:ERNIE-Bot-4

titan

bedrock:amazon.titan-tg1-large

Custom chains#

You can define a LangChain chain in a local variable and use that as the target in a magic %ai register command.

[14]:
from langchain.chains import LLMChain
from langchain.prompts import PromptTemplate
from langchain_community.llms import Cohere

llm = Cohere(model="command", max_tokens=256, temperature=0.75)
prompt = PromptTemplate(
    input_variables=["product"],
    template="What is a good name for a company that makes {product}? Provide only one name. Do not provide any other text than the name. Do not provide other info",
)
chain = LLMChain(llm=llm, prompt=prompt)
[15]:
# Run the chain only specifying the input variable.
print(chain.invoke("colorful socks"))
{'product': 'colorful socks', 'text': ' FunkyHues'}
[16]:
%ai register company chain
[16]:

Registered new alias company

[17]:
%ai list
[17]:

Provider

Environment variable

Set?

Models

| ai21 | AI21_API_KEY | ✅ |

  • ai21:j1-large

  • ai21:j1-grande

  • ai21:j1-jumbo

  • ai21:j1-grande-instruct

  • ai21:j2-large

  • ai21:j2-grande

  • ai21:j2-jumbo

  • ai21:j2-grande-instruct

  • ai21:j2-jumbo-instruct

| | bedrock | Not applicable. | N/A |

  • bedrock:amazon.titan-text-express-v1

  • bedrock:ai21.j2-ultra-v1

  • bedrock:ai21.j2-mid-v1

  • bedrock:cohere.command-light-text-v14

  • bedrock:cohere.command-text-v14

  • bedrock:meta.llama2-13b-chat-v1

  • bedrock:meta.llama2-70b-chat-v1

| | bedrock-chat | Not applicable. | N/A |

  • bedrock-chat:anthropic.claude-v1

  • bedrock-chat:anthropic.claude-v2

  • bedrock-chat:anthropic.claude-v2:1

  • bedrock-chat:anthropic.claude-instant-v1

| | anthropic | ANTHROPIC_API_KEY | ✅ |

  • anthropic:claude-v1

  • anthropic:claude-v1.0

  • anthropic:claude-v1.2

  • anthropic:claude-2

  • anthropic:claude-2.0

  • anthropic:claude-instant-v1

  • anthropic:claude-instant-v1.0

  • anthropic:claude-instant-v1.2

| | anthropic-chat | ANTHROPIC_API_KEY | ✅ |

  • anthropic-chat:claude-v1

  • anthropic-chat:claude-v1.0

  • anthropic-chat:claude-v1.2

  • anthropic-chat:claude-2

  • anthropic-chat:claude-2.0

  • anthropic-chat:claude-instant-v1

  • anthropic-chat:claude-instant-v1.0

  • anthropic-chat:claude-instant-v1.2

| | azure-chat-openai | OPENAI_API_KEY | ✅ | This provider does not define a list of models. | | cohere | COHERE_API_KEY | ✅ |

  • cohere:command

  • cohere:command-nightly

  • cohere:command-light

  • cohere:command-light-nightly

| | gpt4all | Not applicable. | N/A |

  • gpt4all:ggml-gpt4all-j-v1.2-jazzy

  • gpt4all:ggml-gpt4all-j-v1.3-groovy

  • gpt4all:ggml-gpt4all-l13b-snoozy

  • gpt4all:mistral-7b-openorca.Q4_0

  • gpt4all:mistral-7b-instruct-v0.1.Q4_0

  • gpt4all:gpt4all-falcon-q4_0

  • gpt4all:wizardlm-13b-v1.2.Q4_0

  • gpt4all:nous-hermes-llama2-13b.Q4_0

  • gpt4all:gpt4all-13b-snoozy-q4_0

  • gpt4all:mpt-7b-chat-merges-q4_0

  • gpt4all:orca-mini-3b-gguf2-q4_0

  • gpt4all:starcoder-q4_0

  • gpt4all:rift-coder-v0-7b-q4_0

  • gpt4all:em_german_mistral_v01.Q4_0

| | huggingface_hub | HUGGINGFACEHUB_API_TOKEN | ✅ | See https://huggingface.co/models for a list of models. Pass a model’s repository ID as the model ID; for example, huggingface_hub:ExampleOwner/example-model. | | openai | OPENAI_API_KEY | ✅ |

  • openai:babbage-002

  • openai:davinci-002

  • openai:gpt-3.5-turbo-instruct

| | openai-chat | OPENAI_API_KEY | ✅ |

  • openai-chat:gpt-3.5-turbo

  • openai-chat:gpt-3.5-turbo-0301

  • openai-chat:gpt-3.5-turbo-0613

  • openai-chat:gpt-3.5-turbo-1106

  • openai-chat:gpt-3.5-turbo-16k

  • openai-chat:gpt-3.5-turbo-16k-0613

  • openai-chat:gpt-4

  • openai-chat:gpt-4-0613

  • openai-chat:gpt-4-32k

  • openai-chat:gpt-4-32k-0613

  • openai-chat:gpt-4-1106-preview

| | qianfan | QIANFAN_AK, QIANFAN_SK | ❌ |

  • qianfan:ERNIE-Bot

  • qianfan:ERNIE-Bot-4

| | sagemaker-endpoint | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must specify a region name, request schema, and response path. For more information, see the documentation about SageMaker endpoints deployment and about using magic commands with SageMaker endpoints. |

Aliases and custom commands:

Name

Target

gpt2

huggingface_hub:gpt2

gpt3

openai:davinci-002

chatgpt

openai-chat:gpt-3.5-turbo

gpt4

openai-chat:gpt-4

ernie-bot

qianfan:ERNIE-Bot

ernie-bot-4

qianfan:ERNIE-Bot-4

titan

bedrock:amazon.titan-tg1-large

company

custom chain

[18]:
%%ai company
colorful socks
[18]:

Vox Socks

[19]:
%%ai company --format text
colorful socks
[19]:
 Spectra Socks
[ ]: