fix force_prefix missing bug

This commit is contained in:
alexisxy 2023-09-23 00:16:18 -04:00
parent 0e7bcda0ba
commit 741292e1d2

View File

@ -126,6 +126,10 @@ class PromptAgent(Agent):
n = 0
while True:
response = call_llm(lm_config, prompt)
force_prefix = self.prompt_constructor.instruction[
"meta_data"
].get("force_prefix", "")
response = f"{force_prefix}{response}"
n += 1
try:
parsed_response = self.prompt_constructor.extract_action(