From 5ea3a5908d334cfc29a7937f9f81b0b8cde902b5 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sat, 23 Nov 2024 00:57:14 +0000 Subject: [PATCH] minor notebook cleanup --- 00_core.ipynb | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/00_core.ipynb b/00_core.ipynb index bfa5e56..55628d5 100644 --- a/00_core.ipynb +++ b/00_core.ipynb @@ -775,7 +775,7 @@ "id": "fb04f6b4", "metadata": {}, "source": [ - "LLMs, don't actually have state, but instead dialogs are created by passing back all previous prompts and responses every time. With OpenAI, they always alternate *user* and *assistant*. We'll use `mk_msgs` from `msglm` to make it easier to build up these dialog lists." + "LLMs, don't actually have state, but instead dialogs are created by passing back all previous prompts and responses every time. With Claude, they always alternate *user* and *assistant*. We'll use `mk_msgs` from `msglm` to make it easier to build up these dialog lists." ] }, { @@ -2808,7 +2808,7 @@ "id": "09be3d09", "metadata": {}, "source": [ - "You don't need to call `mk_msg` on each individual message before passing them to `Chat`. Instead you can pass your messages in a list and the `Chat` class will automatically call `mk_msgs` in the background. \n", + "You don't need to call `mk_msg` on each individual message before passing them to the `Chat` class. Instead you can pass your messages in a list and the `Chat` class will automatically call `mk_msgs` in the background. \n", "\n", "```python\n", "c([\"How are you?\", r])\n", @@ -2992,20 +2992,7 @@ "execution_count": null, "id": "5fd151fe", "metadata": {}, - "outputs": [ - { - "ename": "KeyError", - "evalue": "'AWS_ACCESS_KEY'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[104], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m ab \u001b[38;5;241m=\u001b[39m AnthropicBedrock(\n\u001b[0;32m----> 2\u001b[0m aws_access_key\u001b[38;5;241m=\u001b[39m\u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43menviron\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mAWS_ACCESS_KEY\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m]\u001b[49m,\n\u001b[1;32m 3\u001b[0m aws_secret_key\u001b[38;5;241m=\u001b[39mos\u001b[38;5;241m.\u001b[39menviron[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAWS_SECRET_KEY\u001b[39m\u001b[38;5;124m'\u001b[39m],\n\u001b[1;32m 4\u001b[0m )\n\u001b[1;32m 5\u001b[0m client \u001b[38;5;241m=\u001b[39m Client(models_aws[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m], ab)\n", - "File \u001b[0;32m:679\u001b[0m, in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n", - "\u001b[0;31mKeyError\u001b[0m: 'AWS_ACCESS_KEY'" - ] - } - ], + "outputs": [], "source": [ "ab = AnthropicBedrock(\n", " aws_access_key=os.environ['AWS_ACCESS_KEY'],\n",