Skip to content

Commit

Permalink
Isolate caching module (#32)
Browse files Browse the repository at this point in the history
* add http cache unit tests

* add logger to caching module

* add app_id argument to _update_lunary_event method

* add _can_update_lunary_event method in BaseHttpCache class

* switching to the motleycache package

* remove motleycrew caching package

* update unit test cache files

* remove unit test cache

---------

Co-authored-by: User <[email protected]>
  • Loading branch information
BespalovSergey and User committed May 27, 2024
1 parent e0a7622 commit 460ccc2
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 578 deletions.
4 changes: 2 additions & 2 deletions examples/Caching and observability.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"metadata": {},
"outputs": [],
"source": [
"from motleycrew.caching import enable_cache\n",
"from motleycache import enable_cache\n",
"enable_cache() # Caching is on!"
]
},
Expand Down Expand Up @@ -225,7 +225,7 @@
"metadata": {},
"outputs": [],
"source": [
"from motleycrew.caching import set_cache_whitelist, set_cache_blacklist\n",
"from motleycache import set_cache_whitelist, set_cache_blacklist\n",
"set_cache_whitelist([\"*//api.openai.com/*\"]) # Will only cache OpenAI API requests\n",
"\n",
"# Alternatively, you can specify a blacklist\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/_test_single_openai_tools_react.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from motleycrew.agents.langchain.react import ReactMotleyAgent
from motleycrew.common.utils import configure_logging
from motleycrew.tasks import SimpleTask
from motleycrew.caching import enable_cache
from motleycache import enable_cache


def main():
Expand Down
9 changes: 0 additions & 9 deletions motleycrew/caching/__init__.py

This file was deleted.

64 changes: 0 additions & 64 deletions motleycrew/caching/caching.py

This file was deleted.

Loading

0 comments on commit 460ccc2

Please sign in to comment.