Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha Rush committed Mar 23, 2023
1 parent e51670b commit e07a9a6
Show file tree
Hide file tree
Showing 19 changed files with 122 additions and 126 deletions.
18 changes: 9 additions & 9 deletions examples/backtrack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a64eda6c",
"id": "4f9259b2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3795ab26",
"id": "fe3bd871",
"metadata": {
"tags": [
"hide_inp"
Expand All @@ -24,15 +24,15 @@
"desc = \"\"\"\n",
"### Backtrack on Failure\n",
"\n",
"Chain that backtracks on failure. [[Code](https://github.com/srush/MiniChain/blob/main/examples/backtrack.py)]\n",
"Chain that backtracks on failure. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/srush/MiniChain/blob/master/examples/backtrack.ipynb)\n",
"\n",
"\"\"\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "801e0e01",
"id": "e3d3d455",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -45,7 +45,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "95e7f75f",
"id": "299a1116",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -59,7 +59,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c2be7076",
"id": "98467c77",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -76,7 +76,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3467feac",
"id": "f454ec72",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -90,7 +90,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "89f562ab",
"id": "78408126",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -104,7 +104,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7d12a4f8",
"id": "8c2a6881",
"metadata": {},
"outputs": [],
"source": [
Expand Down
18 changes: 9 additions & 9 deletions examples/bash.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "362a60bf",
"id": "107c864a",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "aacb18e3",
"id": "84dbb393",
"metadata": {
"lines_to_next_cell": 2,
"tags": [
Expand All @@ -26,7 +26,7 @@
"desc = \"\"\"\n",
"### Bash Command Suggestion\n",
"\n",
"Chain that ask for a command-line question and then runs the bash command. [[Code](https://github.com/srush/MiniChain/blob/main/examples/bash.py)]\n",
"Chain that ask for a command-line question and then runs the bash command. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/srush/MiniChain/blob/master/examples/bash.ipynb)\n",
"\n",
"(Adapted from LangChain [BashChain](https://langchain.readthedocs.io/en/latest/modules/chains/examples/llm_bash.html))\n",
"\"\"\""
Expand All @@ -35,7 +35,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ee87f757",
"id": "7edc46ca",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -45,7 +45,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7af0c760",
"id": "4b5ed6b9",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7a28e57c",
"id": "dd4e462e",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -74,7 +74,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a4a9e06e",
"id": "c4fe4bc1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -85,15 +85,15 @@
{
"cell_type": "code",
"execution_count": null,
"id": "642fa410",
"id": "514895db",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "b272afcc",
"id": "382e2fc6",
"metadata": {
"lines_to_next_cell": 2
},
Expand Down
2 changes: 1 addition & 1 deletion examples/bash.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = """
### Bash Command Suggestion
Chain that ask for a command-line question and then runs the bash command. [[Code](https://github.com/srush/MiniChain/blob/main/examples/bash.py)]
Chain that ask for a command-line question and then runs the bash command. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/srush/MiniChain/blob/master/examples/bash.ipynb)
(Adapted from LangChain [BashChain](https://langchain.readthedocs.io/en/latest/modules/chains/examples/llm_bash.html))
"""
Expand Down
26 changes: 13 additions & 13 deletions examples/chat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "fb2438b4",
"id": "cb6c3e15",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "87dcaa15",
"id": "6bd02e03",
"metadata": {
"lines_to_next_cell": 0,
"tags": [
Expand All @@ -25,7 +25,7 @@
"desc = \"\"\"\n",
"### Chat\n",
"\n",
"A chat-like example for multi-turn chat with state. [[Code](https://github.com/srush/MiniChain/blob/main/examples/chat.py)]\n",
"A chat-like example for multi-turn chat with state. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/srush/MiniChain/blob/master/examples/chat.ipynb)\n",
"\n",
"(Adapted from [LangChain](https://langchain.readthedocs.io/en/latest/modules/memory/examples/chatgpt_clone.html)'s version of this [blog post](https://www.engraved.blog/building-a-virtual-machine-inside/).)\n",
"\n",
Expand All @@ -35,7 +35,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d17968d1",
"id": "10517358",
"metadata": {
"lines_to_next_cell": 2
},
Expand All @@ -45,7 +45,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "01f35010",
"id": "90573878",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -56,7 +56,7 @@
},
{
"cell_type": "markdown",
"id": "372f1871",
"id": "b97e0209",
"metadata": {},
"source": [
"Generic stateful Memory"
Expand All @@ -65,7 +65,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d08f56b3",
"id": "6f494590",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -77,7 +77,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d9595714",
"id": "82fb67dc",
"metadata": {
"lines_to_next_cell": 1
},
Expand All @@ -95,7 +95,7 @@
},
{
"cell_type": "markdown",
"id": "7bbf913e",
"id": "dc55a4ea",
"metadata": {},
"source": [
"Chat prompt with memory"
Expand All @@ -104,7 +104,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a2e76e4d",
"id": "db1931bf",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -118,7 +118,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "74f5de17",
"id": "c0d0035f",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -136,7 +136,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d6d131db",
"id": "ee49f8f8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -154,7 +154,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "796e71bf",
"id": "e3e6868d",
"metadata": {},
"outputs": [],
"source": []
Expand Down
2 changes: 1 addition & 1 deletion examples/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
desc = """
### Chat
A chat-like example for multi-turn chat with state. [[Code](https://github.com/srush/MiniChain/blob/main/examples/chat.py)]
A chat-like example for multi-turn chat with state. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/srush/MiniChain/blob/master/examples/chat.ipynb)
(Adapted from [LangChain](https://langchain.readthedocs.io/en/latest/modules/memory/examples/chatgpt_clone.html)'s version of this [blog post](https://www.engraved.blog/building-a-virtual-machine-inside/).)
Expand Down
Loading

0 comments on commit e07a9a6

Please sign in to comment.