diff --git a/docs/blog/posts/learn-async.md b/docs/blog/posts/learn-async.md index ea88891..461a89f 100644 --- a/docs/blog/posts/learn-async.md +++ b/docs/blog/posts/learn-async.md @@ -16,6 +16,10 @@ authors: Today, I will introduce you to various approaches for using asyncio in Python. We will apply this to batch process data using `instructor` and learn how to use `asyncio.gather` and `asyncio.as_completed` for concurrent data processing. Additionally, we will explore how to limit the number of concurrent requests to a server using `asyncio.Semaphore`. +!!! notes "Github Example" + + If you want to run the code examples in this article, you can find them on [jxnl/instructor](https://github.com/jxnl/instructor/blob/main/examples/learn-async/run.py) + We will start by defining an `async` function that calls `openai` to extract data, and then examine four different ways to execute it. We will discuss the pros and cons of each approach and analyze the results of running them on a small batch. ## Understanding `asyncio` diff --git a/requirements-doc.txt b/requirements-doc.txt index 2e98b1b..b03ccb9 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -9,6 +9,4 @@ pytest aiohttp==3.8.2 yarl==1.8.1 frozenlist==1.3.1 -git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git -mkdocs-minify-plugin -mike \ No newline at end of file +mkdocs-minify-plugin \ No newline at end of file