From 65001352fd8d1ce31e7aac79ebc470c9f1a09ee6 Mon Sep 17 00:00:00 2001 From: Noah Shinn Date: Sat, 5 Aug 2023 00:05:33 -0700 Subject: [PATCH] fix chat completion --- alfworld_runs/alfworld_trial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alfworld_runs/alfworld_trial.py b/alfworld_runs/alfworld_trial.py index d2d4859..b7b3223 100644 --- a/alfworld_runs/alfworld_trial.py +++ b/alfworld_runs/alfworld_trial.py @@ -24,9 +24,9 @@ def llm(prompt: str, model: Model, stop: List[str] = ["\n"]): cur_try = 0 while cur_try < 6: if model == "text-davinci-003": - text = get_completion(prompt=prompt, temperature=cur_try * 0.2, stop=stop) + text = get_completion(prompt=prompt, temperature=cur_try * 0.2, stop_strs=stop) else: - text = get_chat(prompt=prompt, model=model, temperature=cur_try * 0.2, stop=stop) + text = get_chat(prompt=prompt, model=model, temperature=cur_try * 0.2, stop_strs=stop) # dumb way to do this if len(text.strip()) >= 5: return text