From 0e4c7b1da4146704dd45ef7c779682f9f6963370 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Wed, 11 Oct 2023 08:59:05 +0200 Subject: [PATCH] feat: add caching and benchmark --- requirements.txt | 2 +- startup.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index de861ded9..6e00e0d8b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -42,4 +42,4 @@ pytest-mock==3.11.1 open-interpreter==0.1.4; python_version>"3.9" ta==0.10.2 semantic-kernel==0.3.10.dev0 - +parea-ai diff --git a/startup.py b/startup.py index e2a903c9b..e680acc0a 100644 --- a/startup.py +++ b/startup.py @@ -3,6 +3,7 @@ import asyncio import fire +from parea import init, RedisCache from metagpt.roles import ( Architect, @@ -14,6 +15,12 @@ from metagpt.software_company import SoftwareCompany +# set this to True to use caching of LLM calls and being able to benchmark function across many inputs in parallel +IS_DEV = True +if IS_DEV: + init(cache=RedisCache()) + + async def startup( idea: str, investment: float = 3.0,