Harrison/cache (#343)

This commit is contained in:
Harrison Chase
2022-12-15 07:53:32 -08:00
committed by GitHub
parent 8cf62ce06e
commit 78b31e5966
16 changed files with 380 additions and 46 deletions

View File

@@ -33,7 +33,7 @@ class FakeListLLM(LLM, BaseModel):
"""Return type of llm."""
return "fake_list"
def __call__(self, prompt: str, stop: Optional[List[str]] = None) -> str:
def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str:
"""Increment counter, and then return response in that index."""
self.i += 1
return self.responses[self.i]