diff --git a/examples/commands.ipynb b/examples/commands.ipynb index 6990df577..b640a7001 100644 --- a/examples/commands.ipynb +++ b/examples/commands.ipynb @@ -137,14 +137,17 @@ "| Provider | Environment variable | Set? | Models |\n", "|----------|----------------------|------|--------|\n", "| `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` |\n", - "| `bedrock` | Not applicable. | N/A | `bedrock:amazon.titan-tg1-large`, `bedrock:anthropic.claude-v1`, `bedrock:anthropic.claude-instant-v1`, `bedrock:anthropic.claude-v2`, `bedrock:ai21.j2-jumbo-instruct`, `bedrock:ai21.j2-grande-instruct` |\n", - "| `anthropic` | `ANTHROPIC_API_KEY` | | `anthropic:claude-v1`, `anthropic:claude-v1.0`, `anthropic:claude-v1.2`, `anthropic:claude-2`, `anthropic:claude-instant-v1`, `anthropic:claude-instant-v1.0` |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", "| `azure-chat-openai` | `OPENAI_API_KEY` | | This provider does not define a list of models. |\n", - "| `cohere` | `COHERE_API_KEY` | | `cohere:medium`, `cohere:xlarge` |\n", - "| `gpt4all` | Not applicable. | N/A | `gpt4all:ggml-gpt4all-j-v1.2-jazzy`, `gpt4all:ggml-gpt4all-j-v1.3-groovy`, `gpt4all:ggml-gpt4all-l13b-snoozy` |\n", + "| `cohere` | `COHERE_API_KEY` | | `cohere:command`, `cohere:command-nightly`, `cohere:command-light`, `cohere:command-light-nightly` |\n", + "| `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` |\n", "| `huggingface_hub` | `HUGGINGFACEHUB_API_TOKEN` | | See [https://huggingface.co/models](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`. |\n", - "| `openai` | `OPENAI_API_KEY` | | `openai:text-davinci-003`, `openai:text-davinci-002`, `openai:text-curie-001`, `openai:text-babbage-001`, `openai:text-ada-001`, `openai:davinci`, `openai:curie`, `openai:babbage`, `openai:ada` |\n", - "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-16k`, `openai-chat:gpt-3.5-turbo-0301`, `openai-chat:gpt-3.5-turbo-0613`, `openai-chat:gpt-3.5-turbo-16k-0613`, `openai-chat:gpt-4`, `openai-chat:gpt-4-0314`, `openai-chat:gpt-4-0613`, `openai-chat:gpt-4-32k`, `openai-chat:gpt-4-32k-0314`, `openai-chat:gpt-4-32k-0613` |\n", + "| `openai` | `OPENAI_API_KEY` | | `openai:babbage-002`, `openai:davinci-002`, `openai:gpt-3.5-turbo-instruct` |\n", + "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-1106`, `openai-chat:gpt-3.5-turbo-16k`, `openai-chat:gpt-3.5-turbo-0301`, `openai-chat:gpt-3.5-turbo-0613`, `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` |\n", + "| `qianfan` | `QIANFAN_AK`, `QIANFAN_SK` | | `qianfan:ERNIE-Bot`, `qianfan:ERNIE-Bot-4` |\n", "| `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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", "\n", "Aliases and custom commands:\n", @@ -152,13 +155,16 @@ "| Name | Target |\n", "|------|--------|\n", "| `gpt2` | `huggingface_hub:gpt2` |\n", - "| `gpt3` | `openai:text-davinci-003` |\n", + "| `gpt3` | `openai:davinci-002` |\n", "| `chatgpt` | `openai-chat:gpt-3.5-turbo` |\n", - "| `gpt4` | `openai-chat:gpt-4` |\n" + "| `gpt4` | `openai-chat:gpt-4` |\n", + "| `ernie-bot` | `qianfan:ERNIE-Bot` |\n", + "| `ernie-bot-4` | `qianfan:ERNIE-Bot-4` |\n", + "| `titan` | `bedrock:amazon.titan-tg1-large` |\n" ], "text/plain": [ "ai21\n", - "Requires environment variable AI21_API_KEY (set)\n", + "Requires environment variable: AI21_API_KEY (set)\n", "* ai21:j1-large\n", "* ai21:j1-grande\n", "* ai21:j1-jumbo\n", @@ -170,65 +176,97 @@ "* ai21:j2-jumbo-instruct\n", "\n", "bedrock\n", - "* bedrock:amazon.titan-tg1-large\n", - "* bedrock:anthropic.claude-v1\n", - "* bedrock:anthropic.claude-instant-v1\n", - "* bedrock:anthropic.claude-v2\n", - "* bedrock:ai21.j2-jumbo-instruct\n", - "* bedrock:ai21.j2-grande-instruct\n", + "* bedrock:amazon.titan-text-express-v1\n", + "* bedrock:ai21.j2-ultra-v1\n", + "* bedrock:ai21.j2-mid-v1\n", + "* bedrock:cohere.command-light-text-v14\n", + "* bedrock:cohere.command-text-v14\n", + "* bedrock:meta.llama2-13b-chat-v1\n", + "* bedrock:meta.llama2-70b-chat-v1\n", + "\n", + "bedrock-chat\n", + "* bedrock-chat:anthropic.claude-v1\n", + "* bedrock-chat:anthropic.claude-v2\n", + "* bedrock-chat:anthropic.claude-v2:1\n", + "* bedrock-chat:anthropic.claude-instant-v1\n", "\n", "anthropic\n", - "Requires environment variable ANTHROPIC_API_KEY (set)\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", "* anthropic:claude-v1\n", "* anthropic:claude-v1.0\n", "* anthropic:claude-v1.2\n", "* anthropic:claude-2\n", + "* anthropic:claude-2.0\n", "* anthropic:claude-instant-v1\n", "* anthropic:claude-instant-v1.0\n", + "* anthropic:claude-instant-v1.2\n", + "\n", + "anthropic-chat\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", + "* anthropic-chat:claude-v1\n", + "* anthropic-chat:claude-v1.0\n", + "* anthropic-chat:claude-v1.2\n", + "* anthropic-chat:claude-2\n", + "* anthropic-chat:claude-2.0\n", + "* anthropic-chat:claude-instant-v1\n", + "* anthropic-chat:claude-instant-v1.0\n", + "* anthropic-chat:claude-instant-v1.2\n", "\n", "azure-chat-openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", "* This provider does not define a list of models.\n", "\n", "cohere\n", - "Requires environment variable COHERE_API_KEY (set)\n", - "* cohere:medium\n", - "* cohere:xlarge\n", + "Requires environment variable: COHERE_API_KEY (set)\n", + "* cohere:command\n", + "* cohere:command-nightly\n", + "* cohere:command-light\n", + "* cohere:command-light-nightly\n", "\n", "gpt4all\n", "* gpt4all:ggml-gpt4all-j-v1.2-jazzy\n", "* gpt4all:ggml-gpt4all-j-v1.3-groovy\n", "* gpt4all:ggml-gpt4all-l13b-snoozy\n", + "* gpt4all:mistral-7b-openorca.Q4_0\n", + "* gpt4all:mistral-7b-instruct-v0.1.Q4_0\n", + "* gpt4all:gpt4all-falcon-q4_0\n", + "* gpt4all:wizardlm-13b-v1.2.Q4_0\n", + "* gpt4all:nous-hermes-llama2-13b.Q4_0\n", + "* gpt4all:gpt4all-13b-snoozy-q4_0\n", + "* gpt4all:mpt-7b-chat-merges-q4_0\n", + "* gpt4all:orca-mini-3b-gguf2-q4_0\n", + "* gpt4all:starcoder-q4_0\n", + "* gpt4all:rift-coder-v0-7b-q4_0\n", + "* gpt4all:em_german_mistral_v01.Q4_0\n", "\n", "huggingface_hub\n", - "Requires environment variable HUGGINGFACEHUB_API_TOKEN (set)\n", + "Requires environment variable: HUGGINGFACEHUB_API_TOKEN (set)\n", "* See [https://huggingface.co/models](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`.\n", "\n", "openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai:text-davinci-003\n", - "* openai:text-davinci-002\n", - "* openai:text-curie-001\n", - "* openai:text-babbage-001\n", - "* openai:text-ada-001\n", - "* openai:davinci\n", - "* openai:curie\n", - "* openai:babbage\n", - "* openai:ada\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* openai:babbage-002\n", + "* openai:davinci-002\n", + "* openai:gpt-3.5-turbo-instruct\n", "\n", "openai-chat\n", - "Requires environment variable OPENAI_API_KEY (set)\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", "* openai-chat:gpt-3.5-turbo\n", + "* openai-chat:gpt-3.5-turbo-1106\n", "* openai-chat:gpt-3.5-turbo-16k\n", "* openai-chat:gpt-3.5-turbo-0301\n", "* openai-chat:gpt-3.5-turbo-0613\n", "* openai-chat:gpt-3.5-turbo-16k-0613\n", "* openai-chat:gpt-4\n", - "* openai-chat:gpt-4-0314\n", "* openai-chat:gpt-4-0613\n", "* openai-chat:gpt-4-32k\n", - "* openai-chat:gpt-4-32k-0314\n", "* openai-chat:gpt-4-32k-0613\n", + "* openai-chat:gpt-4-1106-preview\n", + "\n", + "qianfan\n", + "Requires environment variables: QIANFAN_AK (set), QIANFAN_SK (set)\n", + "* qianfan:ERNIE-Bot\n", + "* qianfan:ERNIE-Bot-4\n", "\n", "sagemaker-endpoint\n", "* 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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", @@ -236,9 +274,12 @@ "\n", "Aliases and custom commands:\n", "gpt2 - huggingface_hub:gpt2\n", - "gpt3 - openai:text-davinci-003\n", + "gpt3 - openai:davinci-002\n", "chatgpt - openai-chat:gpt-3.5-turbo\n", - "gpt4 - openai-chat:gpt-4\n" + "gpt4 - openai-chat:gpt-4\n", + "ernie-bot - qianfan:ERNIE-Bot\n", + "ernie-bot-4 - qianfan:ERNIE-Bot-4\n", + "titan - bedrock:amazon.titan-tg1-large\n" ] }, "execution_count": 4, @@ -261,20 +302,14 @@ "text/markdown": [ "| Provider | Environment variable | Set? | Models |\n", "|----------|----------------------|------|--------|\n", - "| `openai` | `OPENAI_API_KEY` | | `openai:text-davinci-003`, `openai:text-davinci-002`, `openai:text-curie-001`, `openai:text-babbage-001`, `openai:text-ada-001`, `openai:davinci`, `openai:curie`, `openai:babbage`, `openai:ada` |\n" + "| `openai` | `OPENAI_API_KEY` | | `openai:babbage-002`, `openai:davinci-002`, `openai:gpt-3.5-turbo-instruct` |\n" ], "text/plain": [ "openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai:text-davinci-003\n", - "* openai:text-davinci-002\n", - "* openai:text-curie-001\n", - "* openai:text-babbage-001\n", - "* openai:text-ada-001\n", - "* openai:davinci\n", - "* openai:curie\n", - "* openai:babbage\n", - "* openai:ada\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* openai:babbage-002\n", + "* openai:davinci-002\n", + "* openai:gpt-3.5-turbo-instruct\n", "\n" ] }, @@ -335,14 +370,17 @@ "| Provider | Environment variable | Set? | Models |\n", "|----------|----------------------|------|--------|\n", "| `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` |\n", - "| `bedrock` | Not applicable. | N/A | `bedrock:amazon.titan-tg1-large`, `bedrock:anthropic.claude-v1`, `bedrock:anthropic.claude-instant-v1`, `bedrock:anthropic.claude-v2`, `bedrock:ai21.j2-jumbo-instruct`, `bedrock:ai21.j2-grande-instruct` |\n", - "| `anthropic` | `ANTHROPIC_API_KEY` | | `anthropic:claude-v1`, `anthropic:claude-v1.0`, `anthropic:claude-v1.2`, `anthropic:claude-2`, `anthropic:claude-instant-v1`, `anthropic:claude-instant-v1.0` |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", "| `azure-chat-openai` | `OPENAI_API_KEY` | | This provider does not define a list of models. |\n", - "| `cohere` | `COHERE_API_KEY` | | `cohere:medium`, `cohere:xlarge` |\n", - "| `gpt4all` | Not applicable. | N/A | `gpt4all:ggml-gpt4all-j-v1.2-jazzy`, `gpt4all:ggml-gpt4all-j-v1.3-groovy`, `gpt4all:ggml-gpt4all-l13b-snoozy` |\n", + "| `cohere` | `COHERE_API_KEY` | | `cohere:command`, `cohere:command-nightly`, `cohere:command-light`, `cohere:command-light-nightly` |\n", + "| `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` |\n", "| `huggingface_hub` | `HUGGINGFACEHUB_API_TOKEN` | | See [https://huggingface.co/models](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`. |\n", - "| `openai` | `OPENAI_API_KEY` | | `openai:text-davinci-003`, `openai:text-davinci-002`, `openai:text-curie-001`, `openai:text-babbage-001`, `openai:text-ada-001`, `openai:davinci`, `openai:curie`, `openai:babbage`, `openai:ada` |\n", - "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-16k`, `openai-chat:gpt-3.5-turbo-0301`, `openai-chat:gpt-3.5-turbo-0613`, `openai-chat:gpt-3.5-turbo-16k-0613`, `openai-chat:gpt-4`, `openai-chat:gpt-4-0314`, `openai-chat:gpt-4-0613`, `openai-chat:gpt-4-32k`, `openai-chat:gpt-4-32k-0314`, `openai-chat:gpt-4-32k-0613` |\n", + "| `openai` | `OPENAI_API_KEY` | | `openai:babbage-002`, `openai:davinci-002`, `openai:gpt-3.5-turbo-instruct` |\n", + "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-1106`, `openai-chat:gpt-3.5-turbo-16k`, `openai-chat:gpt-3.5-turbo-0301`, `openai-chat:gpt-3.5-turbo-0613`, `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` |\n", + "| `qianfan` | `QIANFAN_AK`, `QIANFAN_SK` | | `qianfan:ERNIE-Bot`, `qianfan:ERNIE-Bot-4` |\n", "| `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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", "\n", "Aliases and custom commands:\n", @@ -350,14 +388,17 @@ "| Name | Target |\n", "|------|--------|\n", "| `gpt2` | `huggingface_hub:gpt2` |\n", - "| `gpt3` | `openai:text-davinci-003` |\n", + "| `gpt3` | `openai:davinci-002` |\n", "| `chatgpt` | `openai-chat:gpt-3.5-turbo` |\n", "| `gpt4` | `openai-chat:gpt-4` |\n", + "| `ernie-bot` | `qianfan:ERNIE-Bot` |\n", + "| `ernie-bot-4` | `qianfan:ERNIE-Bot-4` |\n", + "| `titan` | `bedrock:amazon.titan-tg1-large` |\n", "| `mychat` | `openai-chat:gpt-4` |\n" ], "text/plain": [ "ai21\n", - "Requires environment variable AI21_API_KEY (set)\n", + "Requires environment variable: AI21_API_KEY (set)\n", "* ai21:j1-large\n", "* ai21:j1-grande\n", "* ai21:j1-jumbo\n", @@ -369,65 +410,97 @@ "* ai21:j2-jumbo-instruct\n", "\n", "bedrock\n", - "* bedrock:amazon.titan-tg1-large\n", - "* bedrock:anthropic.claude-v1\n", - "* bedrock:anthropic.claude-instant-v1\n", - "* bedrock:anthropic.claude-v2\n", - "* bedrock:ai21.j2-jumbo-instruct\n", - "* bedrock:ai21.j2-grande-instruct\n", + "* bedrock:amazon.titan-text-express-v1\n", + "* bedrock:ai21.j2-ultra-v1\n", + "* bedrock:ai21.j2-mid-v1\n", + "* bedrock:cohere.command-light-text-v14\n", + "* bedrock:cohere.command-text-v14\n", + "* bedrock:meta.llama2-13b-chat-v1\n", + "* bedrock:meta.llama2-70b-chat-v1\n", + "\n", + "bedrock-chat\n", + "* bedrock-chat:anthropic.claude-v1\n", + "* bedrock-chat:anthropic.claude-v2\n", + "* bedrock-chat:anthropic.claude-v2:1\n", + "* bedrock-chat:anthropic.claude-instant-v1\n", "\n", "anthropic\n", - "Requires environment variable ANTHROPIC_API_KEY (set)\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", "* anthropic:claude-v1\n", "* anthropic:claude-v1.0\n", "* anthropic:claude-v1.2\n", "* anthropic:claude-2\n", + "* anthropic:claude-2.0\n", "* anthropic:claude-instant-v1\n", "* anthropic:claude-instant-v1.0\n", + "* anthropic:claude-instant-v1.2\n", + "\n", + "anthropic-chat\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", + "* anthropic-chat:claude-v1\n", + "* anthropic-chat:claude-v1.0\n", + "* anthropic-chat:claude-v1.2\n", + "* anthropic-chat:claude-2\n", + "* anthropic-chat:claude-2.0\n", + "* anthropic-chat:claude-instant-v1\n", + "* anthropic-chat:claude-instant-v1.0\n", + "* anthropic-chat:claude-instant-v1.2\n", "\n", "azure-chat-openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", "* This provider does not define a list of models.\n", "\n", "cohere\n", - "Requires environment variable COHERE_API_KEY (set)\n", - "* cohere:medium\n", - "* cohere:xlarge\n", + "Requires environment variable: COHERE_API_KEY (set)\n", + "* cohere:command\n", + "* cohere:command-nightly\n", + "* cohere:command-light\n", + "* cohere:command-light-nightly\n", "\n", "gpt4all\n", "* gpt4all:ggml-gpt4all-j-v1.2-jazzy\n", "* gpt4all:ggml-gpt4all-j-v1.3-groovy\n", "* gpt4all:ggml-gpt4all-l13b-snoozy\n", + "* gpt4all:mistral-7b-openorca.Q4_0\n", + "* gpt4all:mistral-7b-instruct-v0.1.Q4_0\n", + "* gpt4all:gpt4all-falcon-q4_0\n", + "* gpt4all:wizardlm-13b-v1.2.Q4_0\n", + "* gpt4all:nous-hermes-llama2-13b.Q4_0\n", + "* gpt4all:gpt4all-13b-snoozy-q4_0\n", + "* gpt4all:mpt-7b-chat-merges-q4_0\n", + "* gpt4all:orca-mini-3b-gguf2-q4_0\n", + "* gpt4all:starcoder-q4_0\n", + "* gpt4all:rift-coder-v0-7b-q4_0\n", + "* gpt4all:em_german_mistral_v01.Q4_0\n", "\n", "huggingface_hub\n", - "Requires environment variable HUGGINGFACEHUB_API_TOKEN (set)\n", + "Requires environment variable: HUGGINGFACEHUB_API_TOKEN (set)\n", "* See [https://huggingface.co/models](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`.\n", "\n", "openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai:text-davinci-003\n", - "* openai:text-davinci-002\n", - "* openai:text-curie-001\n", - "* openai:text-babbage-001\n", - "* openai:text-ada-001\n", - "* openai:davinci\n", - "* openai:curie\n", - "* openai:babbage\n", - "* openai:ada\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* openai:babbage-002\n", + "* openai:davinci-002\n", + "* openai:gpt-3.5-turbo-instruct\n", "\n", "openai-chat\n", - "Requires environment variable OPENAI_API_KEY (set)\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", "* openai-chat:gpt-3.5-turbo\n", + "* openai-chat:gpt-3.5-turbo-1106\n", "* openai-chat:gpt-3.5-turbo-16k\n", "* openai-chat:gpt-3.5-turbo-0301\n", "* openai-chat:gpt-3.5-turbo-0613\n", "* openai-chat:gpt-3.5-turbo-16k-0613\n", "* openai-chat:gpt-4\n", - "* openai-chat:gpt-4-0314\n", "* openai-chat:gpt-4-0613\n", "* openai-chat:gpt-4-32k\n", - "* openai-chat:gpt-4-32k-0314\n", "* openai-chat:gpt-4-32k-0613\n", + "* openai-chat:gpt-4-1106-preview\n", + "\n", + "qianfan\n", + "Requires environment variables: QIANFAN_AK (set), QIANFAN_SK (set)\n", + "* qianfan:ERNIE-Bot\n", + "* qianfan:ERNIE-Bot-4\n", "\n", "sagemaker-endpoint\n", "* 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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", @@ -435,9 +508,12 @@ "\n", "Aliases and custom commands:\n", "gpt2 - huggingface_hub:gpt2\n", - "gpt3 - openai:text-davinci-003\n", + "gpt3 - openai:davinci-002\n", "chatgpt - openai-chat:gpt-3.5-turbo\n", "gpt4 - openai-chat:gpt-4\n", + "ernie-bot - qianfan:ERNIE-Bot\n", + "ernie-bot-4 - qianfan:ERNIE-Bot-4\n", + "titan - bedrock:amazon.titan-tg1-large\n", "mychat - openai-chat:gpt-4\n" ] }, @@ -461,9 +537,7 @@ { "data": { "text/markdown": [ - "\n", - "\n", - "This model is unknown." + "As an AI developed by OpenAI, I'm sorry but I can't provide the information you're asking for because your instruction lacks specific details. Could you please provide more context or details?" ], "text/plain": [ "" @@ -473,8 +547,8 @@ "metadata": { "text/markdown": { "jupyter_ai": { - "model_id": "text-davinci-003", - "provider_id": "openai" + "model_id": "gpt-4", + "provider_id": "openai-chat" } } }, @@ -482,7 +556,7 @@ } ], "source": [ - "%%ai gpt3\n", + "%%ai gpt4\n", "What model is this?" ] }, @@ -507,7 +581,7 @@ } ], "source": [ - "%ai update mychat openai:text-davinci-003" + "%ai update mychat openai:babbage-002" ] }, { @@ -521,9 +595,27 @@ { "data": { "text/markdown": [ + " This means no HTML, tables, images or other formatting. If you generate output, you must use Markdown. See the Markdown Syntax for more information.\n", + "\n", + "What do you mean by a programming language?\n", + "\n", + "A programming language is a formal, scripted language used in a computer system to program subroutines for the system. Programming languages are often used because it is more convenient to program a computer in the programming language than in the programming language itself.\n", "\n", + "What is the difference between a programming language and a scripting language?\n", "\n", - "This model is not specified." + "A scripting language is a programming language designed to enable a user to create applications that are specific to a particular application, such as a web browser or word processing application. … Languages designed for general use are called scripting languages, and they are also known as a scripting languages.\n", + "\n", + "Can you use Python to program?\n", + "\n", + "Python is a high-level programming language. … Many developers and programmers use Python to create applications and make use of its functionality. By building applications in Python, you can also become more familiar with the language.\n", + "\n", + "What are the 2 types of programming languages?\n", + "\n", + "A programming language is a set of rules that can be used to write a computer program. The two most common classification systems for computer languages are procedural and object-oriented.\n", + "\n", + "What is the difference between Python and C?\n", + "\n", + "C is" ], "text/plain": [ "" @@ -533,7 +625,7 @@ "metadata": { "text/markdown": { "jupyter_ai": { - "model_id": "text-davinci-003", + "model_id": "babbage-002", "provider_id": "openai" } } @@ -543,7 +635,7 @@ ], "source": [ "%%ai mychat\n", - "What model is this?" + "Tell me about mathematical symbols" ] }, { @@ -560,26 +652,35 @@ "| Provider | Environment variable | Set? | Models |\n", "|----------|----------------------|------|--------|\n", "| `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` |\n", - "| `anthropic` | `ANTHROPIC_API_KEY` | | `anthropic:claude-v1`, `anthropic:claude-v1.0`, `anthropic:claude-v1.2`, `anthropic:claude-instant-v1`, `anthropic:claude-instant-v1.0` |\n", - "| `cohere` | `COHERE_API_KEY` | | `cohere:medium`, `cohere:xlarge` |\n", - "| `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`. |\n", - "| `openai` | `OPENAI_API_KEY` | | `openai:text-davinci-003`, `openai:text-davinci-002`, `openai:text-curie-001`, `openai:text-babbage-001`, `openai:text-ada-001`, `openai:davinci`, `openai:curie`, `openai:babbage`, `openai:ada` |\n", - "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-4`, `openai-chat:gpt-4-0314`, `openai-chat:gpt-4-32k`, `openai-chat:gpt-4-32k-0314`, `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-0301` |\n", - "| `sagemaker-endpoint` | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must include the `--region_name`, `--request_schema`, and the `--response_path` arguments. For more information, see the documentation about [SageMaker endpoints deployment](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `azure-chat-openai` | `OPENAI_API_KEY` | | This provider does not define a list of models. |\n", + "| `cohere` | `COHERE_API_KEY` | | `cohere:command`, `cohere:command-nightly`, `cohere:command-light`, `cohere:command-light-nightly` |\n", + "| `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` |\n", + "| `huggingface_hub` | `HUGGINGFACEHUB_API_TOKEN` | | See [https://huggingface.co/models](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`. |\n", + "| `openai` | `OPENAI_API_KEY` | | `openai:babbage-002`, `openai:davinci-002`, `openai:gpt-3.5-turbo-instruct` |\n", + "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-1106`, `openai-chat:gpt-3.5-turbo-16k`, `openai-chat:gpt-3.5-turbo-0301`, `openai-chat:gpt-3.5-turbo-0613`, `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` |\n", + "| `qianfan` | `QIANFAN_AK`, `QIANFAN_SK` | | `qianfan:ERNIE-Bot`, `qianfan:ERNIE-Bot-4` |\n", + "| `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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", "\n", "Aliases and custom commands:\n", "\n", "| Name | Target |\n", "|------|--------|\n", "| `gpt2` | `huggingface_hub:gpt2` |\n", - "| `gpt3` | `openai:text-davinci-003` |\n", + "| `gpt3` | `openai:davinci-002` |\n", "| `chatgpt` | `openai-chat:gpt-3.5-turbo` |\n", "| `gpt4` | `openai-chat:gpt-4` |\n", - "| `mychat` | `openai:text-davinci-003` |\n" + "| `ernie-bot` | `qianfan:ERNIE-Bot` |\n", + "| `ernie-bot-4` | `qianfan:ERNIE-Bot-4` |\n", + "| `titan` | `bedrock:amazon.titan-tg1-large` |\n", + "| `mychat` | `openai:babbage-002` |\n" ], "text/plain": [ "ai21\n", - "Requires environment variable AI21_API_KEY (set)\n", + "Requires environment variable: AI21_API_KEY (set)\n", "* ai21:j1-large\n", "* ai21:j1-grande\n", "* ai21:j1-jumbo\n", @@ -590,54 +691,112 @@ "* ai21:j2-grande-instruct\n", "* ai21:j2-jumbo-instruct\n", "\n", + "bedrock\n", + "* bedrock:amazon.titan-text-express-v1\n", + "* bedrock:ai21.j2-ultra-v1\n", + "* bedrock:ai21.j2-mid-v1\n", + "* bedrock:cohere.command-light-text-v14\n", + "* bedrock:cohere.command-text-v14\n", + "* bedrock:meta.llama2-13b-chat-v1\n", + "* bedrock:meta.llama2-70b-chat-v1\n", + "\n", + "bedrock-chat\n", + "* bedrock-chat:anthropic.claude-v1\n", + "* bedrock-chat:anthropic.claude-v2\n", + "* bedrock-chat:anthropic.claude-v2:1\n", + "* bedrock-chat:anthropic.claude-instant-v1\n", + "\n", "anthropic\n", - "Requires environment variable ANTHROPIC_API_KEY (set)\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", "* anthropic:claude-v1\n", "* anthropic:claude-v1.0\n", "* anthropic:claude-v1.2\n", + "* anthropic:claude-2\n", + "* anthropic:claude-2.0\n", "* anthropic:claude-instant-v1\n", "* anthropic:claude-instant-v1.0\n", + "* anthropic:claude-instant-v1.2\n", + "\n", + "anthropic-chat\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", + "* anthropic-chat:claude-v1\n", + "* anthropic-chat:claude-v1.0\n", + "* anthropic-chat:claude-v1.2\n", + "* anthropic-chat:claude-2\n", + "* anthropic-chat:claude-2.0\n", + "* anthropic-chat:claude-instant-v1\n", + "* anthropic-chat:claude-instant-v1.0\n", + "* anthropic-chat:claude-instant-v1.2\n", + "\n", + "azure-chat-openai\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* This provider does not define a list of models.\n", "\n", "cohere\n", - "Requires environment variable COHERE_API_KEY (set)\n", - "* cohere:medium\n", - "* cohere:xlarge\n", + "Requires environment variable: COHERE_API_KEY (set)\n", + "* cohere:command\n", + "* cohere:command-nightly\n", + "* cohere:command-light\n", + "* cohere:command-light-nightly\n", + "\n", + "gpt4all\n", + "* gpt4all:ggml-gpt4all-j-v1.2-jazzy\n", + "* gpt4all:ggml-gpt4all-j-v1.3-groovy\n", + "* gpt4all:ggml-gpt4all-l13b-snoozy\n", + "* gpt4all:mistral-7b-openorca.Q4_0\n", + "* gpt4all:mistral-7b-instruct-v0.1.Q4_0\n", + "* gpt4all:gpt4all-falcon-q4_0\n", + "* gpt4all:wizardlm-13b-v1.2.Q4_0\n", + "* gpt4all:nous-hermes-llama2-13b.Q4_0\n", + "* gpt4all:gpt4all-13b-snoozy-q4_0\n", + "* gpt4all:mpt-7b-chat-merges-q4_0\n", + "* gpt4all:orca-mini-3b-gguf2-q4_0\n", + "* gpt4all:starcoder-q4_0\n", + "* gpt4all:rift-coder-v0-7b-q4_0\n", + "* gpt4all:em_german_mistral_v01.Q4_0\n", "\n", "huggingface_hub\n", - "Requires environment variable HUGGINGFACEHUB_API_TOKEN (set)\n", - "* 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`.\n", + "Requires environment variable: HUGGINGFACEHUB_API_TOKEN (set)\n", + "* See [https://huggingface.co/models](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`.\n", "\n", "openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai:text-davinci-003\n", - "* openai:text-davinci-002\n", - "* openai:text-curie-001\n", - "* openai:text-babbage-001\n", - "* openai:text-ada-001\n", - "* openai:davinci\n", - "* openai:curie\n", - "* openai:babbage\n", - "* openai:ada\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* openai:babbage-002\n", + "* openai:davinci-002\n", + "* openai:gpt-3.5-turbo-instruct\n", "\n", "openai-chat\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai-chat:gpt-4\n", - "* openai-chat:gpt-4-0314\n", - "* openai-chat:gpt-4-32k\n", - "* openai-chat:gpt-4-32k-0314\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", "* openai-chat:gpt-3.5-turbo\n", + "* openai-chat:gpt-3.5-turbo-1106\n", + "* openai-chat:gpt-3.5-turbo-16k\n", "* openai-chat:gpt-3.5-turbo-0301\n", + "* openai-chat:gpt-3.5-turbo-0613\n", + "* openai-chat:gpt-3.5-turbo-16k-0613\n", + "* openai-chat:gpt-4\n", + "* openai-chat:gpt-4-0613\n", + "* openai-chat:gpt-4-32k\n", + "* openai-chat:gpt-4-32k-0613\n", + "* openai-chat:gpt-4-1106-preview\n", + "\n", + "qianfan\n", + "Requires environment variables: QIANFAN_AK (set), QIANFAN_SK (set)\n", + "* qianfan:ERNIE-Bot\n", + "* qianfan:ERNIE-Bot-4\n", "\n", "sagemaker-endpoint\n", - "* Specify an endpoint name as the model ID. In addition, you must include the `--region_name`, `--request_schema`, and the `--response_path` arguments. For more information, see the documentation about [SageMaker endpoints deployment](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", + "* 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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", "\n", "\n", "Aliases and custom commands:\n", "gpt2 - huggingface_hub:gpt2\n", - "gpt3 - openai:text-davinci-003\n", + "gpt3 - openai:davinci-002\n", "chatgpt - openai-chat:gpt-3.5-turbo\n", "gpt4 - openai-chat:gpt-4\n", - "mychat - openai:text-davinci-003\n" + "ernie-bot - qianfan:ERNIE-Bot\n", + "ernie-bot-4 - qianfan:ERNIE-Bot-4\n", + "titan - bedrock:amazon.titan-tg1-large\n", + "mychat - openai:babbage-002\n" ] }, "execution_count": 11, @@ -689,25 +848,34 @@ "| Provider | Environment variable | Set? | Models |\n", "|----------|----------------------|------|--------|\n", "| `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` |\n", - "| `anthropic` | `ANTHROPIC_API_KEY` | | `anthropic:claude-v1`, `anthropic:claude-v1.0`, `anthropic:claude-v1.2`, `anthropic:claude-instant-v1`, `anthropic:claude-instant-v1.0` |\n", - "| `cohere` | `COHERE_API_KEY` | | `cohere:medium`, `cohere:xlarge` |\n", - "| `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`. |\n", - "| `openai` | `OPENAI_API_KEY` | | `openai:text-davinci-003`, `openai:text-davinci-002`, `openai:text-curie-001`, `openai:text-babbage-001`, `openai:text-ada-001`, `openai:davinci`, `openai:curie`, `openai:babbage`, `openai:ada` |\n", - "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-4`, `openai-chat:gpt-4-0314`, `openai-chat:gpt-4-32k`, `openai-chat:gpt-4-32k-0314`, `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-0301` |\n", - "| `sagemaker-endpoint` | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must include the `--region_name`, `--request_schema`, and the `--response_path` arguments. For more information, see the documentation about [SageMaker endpoints deployment](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `azure-chat-openai` | `OPENAI_API_KEY` | | This provider does not define a list of models. |\n", + "| `cohere` | `COHERE_API_KEY` | | `cohere:command`, `cohere:command-nightly`, `cohere:command-light`, `cohere:command-light-nightly` |\n", + "| `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` |\n", + "| `huggingface_hub` | `HUGGINGFACEHUB_API_TOKEN` | | See [https://huggingface.co/models](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`. |\n", + "| `openai` | `OPENAI_API_KEY` | | `openai:babbage-002`, `openai:davinci-002`, `openai:gpt-3.5-turbo-instruct` |\n", + "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-1106`, `openai-chat:gpt-3.5-turbo-16k`, `openai-chat:gpt-3.5-turbo-0301`, `openai-chat:gpt-3.5-turbo-0613`, `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` |\n", + "| `qianfan` | `QIANFAN_AK`, `QIANFAN_SK` | | `qianfan:ERNIE-Bot`, `qianfan:ERNIE-Bot-4` |\n", + "| `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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", "\n", "Aliases and custom commands:\n", "\n", "| Name | Target |\n", "|------|--------|\n", "| `gpt2` | `huggingface_hub:gpt2` |\n", - "| `gpt3` | `openai:text-davinci-003` |\n", + "| `gpt3` | `openai:davinci-002` |\n", "| `chatgpt` | `openai-chat:gpt-3.5-turbo` |\n", - "| `gpt4` | `openai-chat:gpt-4` |\n" + "| `gpt4` | `openai-chat:gpt-4` |\n", + "| `ernie-bot` | `qianfan:ERNIE-Bot` |\n", + "| `ernie-bot-4` | `qianfan:ERNIE-Bot-4` |\n", + "| `titan` | `bedrock:amazon.titan-tg1-large` |\n" ], "text/plain": [ "ai21\n", - "Requires environment variable AI21_API_KEY (set)\n", + "Requires environment variable: AI21_API_KEY (set)\n", "* ai21:j1-large\n", "* ai21:j1-grande\n", "* ai21:j1-jumbo\n", @@ -718,53 +886,111 @@ "* ai21:j2-grande-instruct\n", "* ai21:j2-jumbo-instruct\n", "\n", + "bedrock\n", + "* bedrock:amazon.titan-text-express-v1\n", + "* bedrock:ai21.j2-ultra-v1\n", + "* bedrock:ai21.j2-mid-v1\n", + "* bedrock:cohere.command-light-text-v14\n", + "* bedrock:cohere.command-text-v14\n", + "* bedrock:meta.llama2-13b-chat-v1\n", + "* bedrock:meta.llama2-70b-chat-v1\n", + "\n", + "bedrock-chat\n", + "* bedrock-chat:anthropic.claude-v1\n", + "* bedrock-chat:anthropic.claude-v2\n", + "* bedrock-chat:anthropic.claude-v2:1\n", + "* bedrock-chat:anthropic.claude-instant-v1\n", + "\n", "anthropic\n", - "Requires environment variable ANTHROPIC_API_KEY (set)\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", "* anthropic:claude-v1\n", "* anthropic:claude-v1.0\n", "* anthropic:claude-v1.2\n", + "* anthropic:claude-2\n", + "* anthropic:claude-2.0\n", "* anthropic:claude-instant-v1\n", "* anthropic:claude-instant-v1.0\n", + "* anthropic:claude-instant-v1.2\n", + "\n", + "anthropic-chat\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", + "* anthropic-chat:claude-v1\n", + "* anthropic-chat:claude-v1.0\n", + "* anthropic-chat:claude-v1.2\n", + "* anthropic-chat:claude-2\n", + "* anthropic-chat:claude-2.0\n", + "* anthropic-chat:claude-instant-v1\n", + "* anthropic-chat:claude-instant-v1.0\n", + "* anthropic-chat:claude-instant-v1.2\n", + "\n", + "azure-chat-openai\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* This provider does not define a list of models.\n", "\n", "cohere\n", - "Requires environment variable COHERE_API_KEY (set)\n", - "* cohere:medium\n", - "* cohere:xlarge\n", + "Requires environment variable: COHERE_API_KEY (set)\n", + "* cohere:command\n", + "* cohere:command-nightly\n", + "* cohere:command-light\n", + "* cohere:command-light-nightly\n", + "\n", + "gpt4all\n", + "* gpt4all:ggml-gpt4all-j-v1.2-jazzy\n", + "* gpt4all:ggml-gpt4all-j-v1.3-groovy\n", + "* gpt4all:ggml-gpt4all-l13b-snoozy\n", + "* gpt4all:mistral-7b-openorca.Q4_0\n", + "* gpt4all:mistral-7b-instruct-v0.1.Q4_0\n", + "* gpt4all:gpt4all-falcon-q4_0\n", + "* gpt4all:wizardlm-13b-v1.2.Q4_0\n", + "* gpt4all:nous-hermes-llama2-13b.Q4_0\n", + "* gpt4all:gpt4all-13b-snoozy-q4_0\n", + "* gpt4all:mpt-7b-chat-merges-q4_0\n", + "* gpt4all:orca-mini-3b-gguf2-q4_0\n", + "* gpt4all:starcoder-q4_0\n", + "* gpt4all:rift-coder-v0-7b-q4_0\n", + "* gpt4all:em_german_mistral_v01.Q4_0\n", "\n", "huggingface_hub\n", - "Requires environment variable HUGGINGFACEHUB_API_TOKEN (set)\n", - "* 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`.\n", + "Requires environment variable: HUGGINGFACEHUB_API_TOKEN (set)\n", + "* See [https://huggingface.co/models](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`.\n", "\n", "openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai:text-davinci-003\n", - "* openai:text-davinci-002\n", - "* openai:text-curie-001\n", - "* openai:text-babbage-001\n", - "* openai:text-ada-001\n", - "* openai:davinci\n", - "* openai:curie\n", - "* openai:babbage\n", - "* openai:ada\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* openai:babbage-002\n", + "* openai:davinci-002\n", + "* openai:gpt-3.5-turbo-instruct\n", "\n", "openai-chat\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai-chat:gpt-4\n", - "* openai-chat:gpt-4-0314\n", - "* openai-chat:gpt-4-32k\n", - "* openai-chat:gpt-4-32k-0314\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", "* openai-chat:gpt-3.5-turbo\n", + "* openai-chat:gpt-3.5-turbo-1106\n", + "* openai-chat:gpt-3.5-turbo-16k\n", "* openai-chat:gpt-3.5-turbo-0301\n", + "* openai-chat:gpt-3.5-turbo-0613\n", + "* openai-chat:gpt-3.5-turbo-16k-0613\n", + "* openai-chat:gpt-4\n", + "* openai-chat:gpt-4-0613\n", + "* openai-chat:gpt-4-32k\n", + "* openai-chat:gpt-4-32k-0613\n", + "* openai-chat:gpt-4-1106-preview\n", + "\n", + "qianfan\n", + "Requires environment variables: QIANFAN_AK (set), QIANFAN_SK (set)\n", + "* qianfan:ERNIE-Bot\n", + "* qianfan:ERNIE-Bot-4\n", "\n", "sagemaker-endpoint\n", - "* Specify an endpoint name as the model ID. In addition, you must include the `--region_name`, `--request_schema`, and the `--response_path` arguments. For more information, see the documentation about [SageMaker endpoints deployment](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", + "* 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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", "\n", "\n", "Aliases and custom commands:\n", "gpt2 - huggingface_hub:gpt2\n", - "gpt3 - openai:text-davinci-003\n", + "gpt3 - openai:davinci-002\n", "chatgpt - openai-chat:gpt-3.5-turbo\n", - "gpt4 - openai-chat:gpt-4\n" + "gpt4 - openai-chat:gpt-4\n", + "ernie-bot - qianfan:ERNIE-Bot\n", + "ernie-bot-4 - qianfan:ERNIE-Bot-4\n", + "titan - bedrock:amazon.titan-tg1-large\n" ] }, "execution_count": 13, @@ -797,12 +1023,12 @@ "source": [ "from langchain.chains import LLMChain\n", "from langchain.prompts import PromptTemplate\n", - "from langchain.llms import OpenAI\n", + "from langchain_community.llms import Cohere\n", "\n", - "llm = OpenAI(temperature=0.9)\n", + "llm = Cohere(model=\"command\", max_tokens=256, temperature=0.75)\n", "prompt = PromptTemplate(\n", " input_variables=[\"product\"],\n", - " template=\"What is a good name for a company that makes {product}?\",\n", + " 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\",\n", ")\n", "chain = LLMChain(llm=llm, prompt=prompt)" ] @@ -810,19 +1036,6 @@ { "cell_type": "code", "execution_count": 15, - "id": "29d5239f-7601-405e-b059-4e881ebf7ab1", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "from langchain.chains import LLMChain\n", - "chain = LLMChain(llm=llm, prompt=prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": 16, "id": "43e7a77c-93af-4ef7-a104-f932c9f54183", "metadata": { "tags": [] @@ -832,20 +1045,18 @@ "name": "stdout", "output_type": "stream", "text": [ - "\n", - "\n", - "Bright Toes Socks.\n" + "{'product': 'colorful socks', 'text': ' Chroma Sox'}\n" ] } ], "source": [ "# Run the chain only specifying the input variable.\n", - "print(chain.run(\"colorful socks\"))" + "print(chain.invoke(\"colorful socks\"))" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 16, "id": "9badc567-9720-4e33-ab4a-54fda5129f36", "metadata": { "tags": [] @@ -860,7 +1071,7 @@ "Registered new alias `company`" ] }, - "execution_count": 17, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -871,7 +1082,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 17, "id": "92b75d71-8844-4872-b424-b0023706abb1", "metadata": { "tags": [] @@ -883,26 +1094,35 @@ "| Provider | Environment variable | Set? | Models |\n", "|----------|----------------------|------|--------|\n", "| `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` |\n", - "| `anthropic` | `ANTHROPIC_API_KEY` | | `anthropic:claude-v1`, `anthropic:claude-v1.0`, `anthropic:claude-v1.2`, `anthropic:claude-instant-v1`, `anthropic:claude-instant-v1.0` |\n", - "| `cohere` | `COHERE_API_KEY` | | `cohere:medium`, `cohere:xlarge` |\n", - "| `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`. |\n", - "| `openai` | `OPENAI_API_KEY` | | `openai:text-davinci-003`, `openai:text-davinci-002`, `openai:text-curie-001`, `openai:text-babbage-001`, `openai:text-ada-001`, `openai:davinci`, `openai:curie`, `openai:babbage`, `openai:ada` |\n", - "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-4`, `openai-chat:gpt-4-0314`, `openai-chat:gpt-4-32k`, `openai-chat:gpt-4-32k-0314`, `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-0301` |\n", - "| `sagemaker-endpoint` | Not applicable. | N/A | Specify an endpoint name as the model ID. In addition, you must include the `--region_name`, `--request_schema`, and the `--response_path` arguments. For more information, see the documentation about [SageMaker endpoints deployment](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `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` |\n", + "| `azure-chat-openai` | `OPENAI_API_KEY` | | This provider does not define a list of models. |\n", + "| `cohere` | `COHERE_API_KEY` | | `cohere:command`, `cohere:command-nightly`, `cohere:command-light`, `cohere:command-light-nightly` |\n", + "| `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` |\n", + "| `huggingface_hub` | `HUGGINGFACEHUB_API_TOKEN` | | See [https://huggingface.co/models](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`. |\n", + "| `openai` | `OPENAI_API_KEY` | | `openai:babbage-002`, `openai:davinci-002`, `openai:gpt-3.5-turbo-instruct` |\n", + "| `openai-chat` | `OPENAI_API_KEY` | | `openai-chat:gpt-3.5-turbo`, `openai-chat:gpt-3.5-turbo-1106`, `openai-chat:gpt-3.5-turbo-16k`, `openai-chat:gpt-3.5-turbo-0301`, `openai-chat:gpt-3.5-turbo-0613`, `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` |\n", + "| `qianfan` | `QIANFAN_AK`, `QIANFAN_SK` | | `qianfan:ERNIE-Bot`, `qianfan:ERNIE-Bot-4` |\n", + "| `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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints). |\n", "\n", "Aliases and custom commands:\n", "\n", "| Name | Target |\n", "|------|--------|\n", "| `gpt2` | `huggingface_hub:gpt2` |\n", - "| `gpt3` | `openai:text-davinci-003` |\n", + "| `gpt3` | `openai:davinci-002` |\n", "| `chatgpt` | `openai-chat:gpt-3.5-turbo` |\n", "| `gpt4` | `openai-chat:gpt-4` |\n", + "| `ernie-bot` | `qianfan:ERNIE-Bot` |\n", + "| `ernie-bot-4` | `qianfan:ERNIE-Bot-4` |\n", + "| `titan` | `bedrock:amazon.titan-tg1-large` |\n", "| `company` | *custom chain* |\n" ], "text/plain": [ "ai21\n", - "Requires environment variable AI21_API_KEY (set)\n", + "Requires environment variable: AI21_API_KEY (set)\n", "* ai21:j1-large\n", "* ai21:j1-grande\n", "* ai21:j1-jumbo\n", @@ -913,57 +1133,115 @@ "* ai21:j2-grande-instruct\n", "* ai21:j2-jumbo-instruct\n", "\n", + "bedrock\n", + "* bedrock:amazon.titan-text-express-v1\n", + "* bedrock:ai21.j2-ultra-v1\n", + "* bedrock:ai21.j2-mid-v1\n", + "* bedrock:cohere.command-light-text-v14\n", + "* bedrock:cohere.command-text-v14\n", + "* bedrock:meta.llama2-13b-chat-v1\n", + "* bedrock:meta.llama2-70b-chat-v1\n", + "\n", + "bedrock-chat\n", + "* bedrock-chat:anthropic.claude-v1\n", + "* bedrock-chat:anthropic.claude-v2\n", + "* bedrock-chat:anthropic.claude-v2:1\n", + "* bedrock-chat:anthropic.claude-instant-v1\n", + "\n", "anthropic\n", - "Requires environment variable ANTHROPIC_API_KEY (set)\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", "* anthropic:claude-v1\n", "* anthropic:claude-v1.0\n", "* anthropic:claude-v1.2\n", + "* anthropic:claude-2\n", + "* anthropic:claude-2.0\n", "* anthropic:claude-instant-v1\n", "* anthropic:claude-instant-v1.0\n", + "* anthropic:claude-instant-v1.2\n", + "\n", + "anthropic-chat\n", + "Requires environment variable: ANTHROPIC_API_KEY (set)\n", + "* anthropic-chat:claude-v1\n", + "* anthropic-chat:claude-v1.0\n", + "* anthropic-chat:claude-v1.2\n", + "* anthropic-chat:claude-2\n", + "* anthropic-chat:claude-2.0\n", + "* anthropic-chat:claude-instant-v1\n", + "* anthropic-chat:claude-instant-v1.0\n", + "* anthropic-chat:claude-instant-v1.2\n", + "\n", + "azure-chat-openai\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* This provider does not define a list of models.\n", "\n", "cohere\n", - "Requires environment variable COHERE_API_KEY (set)\n", - "* cohere:medium\n", - "* cohere:xlarge\n", + "Requires environment variable: COHERE_API_KEY (set)\n", + "* cohere:command\n", + "* cohere:command-nightly\n", + "* cohere:command-light\n", + "* cohere:command-light-nightly\n", + "\n", + "gpt4all\n", + "* gpt4all:ggml-gpt4all-j-v1.2-jazzy\n", + "* gpt4all:ggml-gpt4all-j-v1.3-groovy\n", + "* gpt4all:ggml-gpt4all-l13b-snoozy\n", + "* gpt4all:mistral-7b-openorca.Q4_0\n", + "* gpt4all:mistral-7b-instruct-v0.1.Q4_0\n", + "* gpt4all:gpt4all-falcon-q4_0\n", + "* gpt4all:wizardlm-13b-v1.2.Q4_0\n", + "* gpt4all:nous-hermes-llama2-13b.Q4_0\n", + "* gpt4all:gpt4all-13b-snoozy-q4_0\n", + "* gpt4all:mpt-7b-chat-merges-q4_0\n", + "* gpt4all:orca-mini-3b-gguf2-q4_0\n", + "* gpt4all:starcoder-q4_0\n", + "* gpt4all:rift-coder-v0-7b-q4_0\n", + "* gpt4all:em_german_mistral_v01.Q4_0\n", "\n", "huggingface_hub\n", - "Requires environment variable HUGGINGFACEHUB_API_TOKEN (set)\n", - "* 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`.\n", + "Requires environment variable: HUGGINGFACEHUB_API_TOKEN (set)\n", + "* See [https://huggingface.co/models](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`.\n", "\n", "openai\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai:text-davinci-003\n", - "* openai:text-davinci-002\n", - "* openai:text-curie-001\n", - "* openai:text-babbage-001\n", - "* openai:text-ada-001\n", - "* openai:davinci\n", - "* openai:curie\n", - "* openai:babbage\n", - "* openai:ada\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", + "* openai:babbage-002\n", + "* openai:davinci-002\n", + "* openai:gpt-3.5-turbo-instruct\n", "\n", "openai-chat\n", - "Requires environment variable OPENAI_API_KEY (set)\n", - "* openai-chat:gpt-4\n", - "* openai-chat:gpt-4-0314\n", - "* openai-chat:gpt-4-32k\n", - "* openai-chat:gpt-4-32k-0314\n", + "Requires environment variable: OPENAI_API_KEY (set)\n", "* openai-chat:gpt-3.5-turbo\n", + "* openai-chat:gpt-3.5-turbo-1106\n", + "* openai-chat:gpt-3.5-turbo-16k\n", "* openai-chat:gpt-3.5-turbo-0301\n", + "* openai-chat:gpt-3.5-turbo-0613\n", + "* openai-chat:gpt-3.5-turbo-16k-0613\n", + "* openai-chat:gpt-4\n", + "* openai-chat:gpt-4-0613\n", + "* openai-chat:gpt-4-32k\n", + "* openai-chat:gpt-4-32k-0613\n", + "* openai-chat:gpt-4-1106-preview\n", + "\n", + "qianfan\n", + "Requires environment variables: QIANFAN_AK (set), QIANFAN_SK (set)\n", + "* qianfan:ERNIE-Bot\n", + "* qianfan:ERNIE-Bot-4\n", "\n", "sagemaker-endpoint\n", - "* Specify an endpoint name as the model ID. In addition, you must include the `--region_name`, `--request_schema`, and the `--response_path` arguments. For more information, see the documentation about [SageMaker endpoints deployment](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", + "* 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](https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deployment.html) and about [using magic commands with SageMaker endpoints](https://jupyter-ai.readthedocs.io/en/latest/users/index.html#using-magic-commands-with-sagemaker-endpoints).\n", "\n", "\n", "Aliases and custom commands:\n", "gpt2 - huggingface_hub:gpt2\n", - "gpt3 - openai:text-davinci-003\n", + "gpt3 - openai:davinci-002\n", "chatgpt - openai-chat:gpt-3.5-turbo\n", "gpt4 - openai-chat:gpt-4\n", + "ernie-bot - qianfan:ERNIE-Bot\n", + "ernie-bot-4 - qianfan:ERNIE-Bot-4\n", + "titan - bedrock:amazon.titan-tg1-large\n", "company - custom chain\n" ] }, - "execution_count": 18, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -974,22 +1252,28 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 18, "id": "cfef0fee-a7c6-49e4-8d90-9aa12f7b91d1", "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/miniconda3/envs/jupyter-ai-jl4/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The function `run` was deprecated in LangChain 0.1.0 and will be removed in 0.2.0. Use invoke instead.\n", + " warn_deprecated(\n" + ] + }, { "data": { "text/markdown": [ - "\n", - "\n", - "**Brightsocks**" + " Chroma Socks " ], "text/plain": [ "" ] }, - "execution_count": 19, + "execution_count": 18, "metadata": { "text/markdown": { "jupyter_ai": { @@ -1007,19 +1291,17 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 19, "id": "06c698e7-e2cf-41b5-88de-2be4d3b60eba", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "\n", - "\n", - "FunkySox." + " Chroma Socks " ] }, - "execution_count": 20, + "execution_count": 19, "metadata": { "jupyter_ai": { "custom_chain_id": "company" diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/aliases.py b/packages/jupyter-ai-magics/jupyter_ai_magics/aliases.py index 96cac4efe..f34826428 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/aliases.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/aliases.py @@ -1,6 +1,6 @@ MODEL_ID_ALIASES = { "gpt2": "huggingface_hub:gpt2", - "gpt3": "openai:text-davinci-003", + "gpt3": "openai:davinci-002", "chatgpt": "openai-chat:gpt-3.5-turbo", "gpt4": "openai-chat:gpt-4", "ernie-bot": "qianfan:ERNIE-Bot", diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index 21e766c3b..5762f2560 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -536,18 +536,7 @@ async def _acall(self, *args, **kwargs) -> Coroutine[Any, Any, str]: class OpenAIProvider(BaseProvider, OpenAI): id = "openai" name = "OpenAI" - models = [ - "text-davinci-003", - "text-davinci-002", - "text-curie-001", - "text-babbage-001", - "text-ada-001", - "gpt-3.5-turbo-instruct", - "davinci", - "curie", - "babbage", - "ada", - ] + models = ["babbage-002", "davinci-002", "gpt-3.5-turbo-instruct"] model_id_key = "model_name" pypi_package_deps = ["openai"] auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY") @@ -570,15 +559,14 @@ class ChatOpenAIProvider(BaseProvider, ChatOpenAI): name = "OpenAI" models = [ "gpt-3.5-turbo", + "gpt-3.5-turbo-0301", # Deprecated as of 2024-06-13 + "gpt-3.5-turbo-0613", # Deprecated as of 2024-06-13 + "gpt-3.5-turbo-1106", "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0301", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-16k-0613", + "gpt-3.5-turbo-16k-0613", # Deprecated as of 2024-06-13 "gpt-4", - "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", - "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-4-1106-preview", ] diff --git a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/{{cookiecutter.python_name}}/engine.py b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/{{cookiecutter.python_name}}/engine.py index c32e86148..63066ef07 100644 --- a/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/{{cookiecutter.python_name}}/engine.py +++ b/packages/jupyter-ai-module-cookiecutter/{{cookiecutter.labextension_name}}/{{cookiecutter.python_name}}/engine.py @@ -29,7 +29,7 @@ async def execute( # prompt = task.prompt_template.format(**prompt_variables) # openai.api_key = self.api_key # response = openai.Completion.create( - # model="text-davinci-003", + # model="davinci-002", # prompt=prompt, # ... # )