From f0b30f906cba6be1fcc9b8447c2e10af07e060f0 Mon Sep 17 00:00:00 2001 From: Arjun Desai Date: Sat, 11 Mar 2023 09:17:37 -0800 Subject: [PATCH] update flash fill --- .../app/src/lib/component/contrib/flash_fill/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meerkat/interactive/app/src/lib/component/contrib/flash_fill/__init__.py b/meerkat/interactive/app/src/lib/component/contrib/flash_fill/__init__.py index 5244d8e88..9733b45f9 100644 --- a/meerkat/interactive/app/src/lib/component/contrib/flash_fill/__init__.py +++ b/meerkat/interactive/app/src/lib/component/contrib/flash_fill/__init__.py @@ -23,7 +23,10 @@ def __init__( df: "DataFrame", target_column: str, manifest_cache_dir: str = "~/.cache/manifest", + max_tokens: int = 1, ): + self.max_tokens = max_tokens + df = df.view() if target_column not in df.columns: df[target_column] = "" @@ -139,7 +142,7 @@ def run_manifest( client_connection=os.getenv("OPENAI_API_KEY"), engine=engine, temperature=0, - max_tokens=1, + max_tokens=self.max_tokens, cache_name="sqlite", cache_connection=os.path.join(self.manifest_cache_dir, "cache.sqlite"), )