Skip to content

Commit

Permalink
minor notebook cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
comhar committed Nov 23, 2024
1 parent cca3823 commit 5ea3a59
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions 00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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<frozen os>: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",
Expand Down

0 comments on commit 5ea3a59

Please sign in to comment.