From b833f3cc5c5194ff4098a9613f933164d1eb8759 Mon Sep 17 00:00:00 2001 From: Sarmad Qadri Date: Tue, 21 May 2024 13:57:48 -0400 Subject: [PATCH] Update readme Created a colab notebook to help showcase the demo without setting up streamlit --- cookbooks/Basic-Prompt-Routing/README.md | 11 +++++++++++ cookbooks/Basic-Prompt-Routing/assistant.ipynb | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cookbooks/Basic-Prompt-Routing/README.md b/cookbooks/Basic-Prompt-Routing/README.md index 50eca708e..b85cfd00a 100644 --- a/cookbooks/Basic-Prompt-Routing/README.md +++ b/cookbooks/Basic-Prompt-Routing/README.md @@ -1,9 +1,14 @@ # Basic Prompting Routing - AI Teaching Assistant +[![colab](https://colab.research.google.com/drive/1ue0ZAEdlalw57JwTtXlfl8kH8W_j1XQq#scrollTo=kNmnUZnUFzt3)] + This demo shows prompt routing with AIConfig. We used streamlit to host the app so you can interact with the assistant! +Alternatively, you can run the aiconfig in an ipynb ![image](https://github-production-user-asset-6210df.s3.amazonaws.com/81494782/282203473-f779feb6-339d-4331-9aed-1761b845100a.png) +## Streamlit + ### How does it work? The user asks a question. The LLM decides the topic as math, physics, or general. Based on the topic, the LLM selects a different "assistant" to respond. These assistants have different system prompts and respond with varying introductions and style of response. @@ -17,3 +22,9 @@ The user asks a question. The LLM decides the topic as math, physics, or general ### Run with Streamlit `streamlit run assistant_app.py` + +## IPython Notebook + +[![colab](https://colab.research.google.com/drive/1ue0ZAEdlalw57JwTtXlfl8kH8W_j1XQq#scrollTo=kNmnUZnUFzt3)] + +Open assistant.ipynb in this folder, or in Colab, to use the aiconfig diff --git a/cookbooks/Basic-Prompt-Routing/assistant.ipynb b/cookbooks/Basic-Prompt-Routing/assistant.ipynb index 48adae75c..3705abaf0 100644 --- a/cookbooks/Basic-Prompt-Routing/assistant.ipynb +++ b/cookbooks/Basic-Prompt-Routing/assistant.ipynb @@ -145,7 +145,6 @@ "source": [ "## Load AI Config `assistant.aiconfig.json`\n", "\n", - "/Users/saqadri/lm/aiconfig2/cookbooks/Basic-Prompt-Routing/assistant.ipynb\n", "Download file [from here](https://github.com/lastmile-ai/aiconfig/blob/main/cookbooks/Basic-Prompt-Routing/assistant.aiconfig.json). \n", "\n", "If you're using Colab, Upload to 'Files' in your colab notebook and load (shown below).\n"