From ef7d6553345b5e4d3e0c6a39186d784b9d3ced65 Mon Sep 17 00:00:00 2001 From: sradc Date: Sun, 8 Oct 2023 22:08:05 +0100 Subject: [PATCH] docs: add video example to docs --- .gitattributes | 1 + README.ipynb | 6 +++++- README.md | 6 +++++- scripts/replace_readme_image_links.py | 10 ++++++---- static/bash_assistant_example.mp4 | 3 +++ {README_files => static}/make_agents_logo.jpg | Bin 6 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .gitattributes create mode 100644 static/bash_assistant_example.mp4 rename {README_files => static}/make_agents_logo.jpg (100%) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f8ff2b5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.mp4 filter=lfs diff=lfs merge=lfs -text diff --git a/README.ipynb b/README.ipynb index 4bf2be8..28faf39 100644 --- a/README.ipynb +++ b/README.ipynb @@ -24,7 +24,7 @@ "`pip install make_agents`\n", " \n", "

\n", - " \n", + " \n", "

\n", "\n", "# MakeAgents \n", @@ -44,6 +44,10 @@ "\n", "## Examples\n", "\n", + "Here's a video showing a MakeAgents agent in action:\n", + "\n", + "![Bash assistant example](static/bash_assistant_example.mp4)\n", + "\n", "### Example 1: A conversational agent tasked with getting the user's name" ] }, diff --git a/README.md b/README.md index eb6ec12..a1ceade 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ limitations under the License. --> `pip install make_agents`

- +

# MakeAgents @@ -38,6 +38,10 @@ Currently supports OpenAI's GPT chat models out of the box. ## Examples +Here's a video showing a MakeAgents agent in action: + +![Bash assistant example](static/bash_assistant_example.mp4) + ### Example 1: A conversational agent tasked with getting the user's name diff --git a/scripts/replace_readme_image_links.py b/scripts/replace_readme_image_links.py index 199d5d0..49750cc 100644 --- a/scripts/replace_readme_image_links.py +++ b/scripts/replace_readme_image_links.py @@ -7,14 +7,16 @@ GITHUB_PATH = "sradc/MakeAgents/main" with open(FILE_PATH, "r") as file: - data = file.read() + text = file.read() # Find links referencing README_files/ and replace them with absolute links pattern = r"(README_files/.*\.(png|jpg))" replacement = r"https://raw.githubusercontent.com/" + GITHUB_PATH + r"/\1" + text = re.sub(pattern, replacement, text) - # Substitute the pattern with the replacement - new_data = re.sub(pattern, replacement, data) + pattern = r"(static/.*\.(png|jpg))" + replacement = r"https://raw.githubusercontent.com/" + GITHUB_PATH + r"/\1" + text = re.sub(pattern, replacement, text) with open(FILE_PATH, "w") as file: - file.write(new_data) + file.write(text) diff --git a/static/bash_assistant_example.mp4 b/static/bash_assistant_example.mp4 new file mode 100644 index 0000000..2a63394 --- /dev/null +++ b/static/bash_assistant_example.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88aed5df11337b68651e5bb5adf85fa76261a4c3c72731aaec9e70cc4f8f843b +size 28440121 diff --git a/README_files/make_agents_logo.jpg b/static/make_agents_logo.jpg similarity index 100% rename from README_files/make_agents_logo.jpg rename to static/make_agents_logo.jpg