Skip to content

Commit

Permalink
Fixed Bug Nicholas found during our call. The error was a missing tag…
Browse files Browse the repository at this point in the history
… in output, but that error wasn't making it into LLM prompt, so couldn't fix
  • Loading branch information
dividor committed Jul 15, 2024
1 parent fe754bc commit 24116c9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions management/recipe_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,8 @@ def create_new_recipe(recipe_intent, recipe_author):

print("Running recipe to capture errors for LLM ...")
result = run_recipe(recipe_path)
print("JJJJJJ")
sys.exit()
print(result.stderr)

# If there was an error, call edit recipe to try and fix it one round
Expand Down Expand Up @@ -1338,12 +1340,14 @@ def run_recipe(recipe_path):
# Extract output
if output_start_string in result.stdout:
output = result.stdout.split(output_start_string)[1]
# output is JSON
validate_output(output)
output = json.loads(output)
else:
raise ValueError("Output of recipe must contain 'OUTPUT:'")

# output is JSON
validate_output(output)
output = json.loads(output)
error_str = "ERROR: Output of recipe must contain 'OUTPUT:'"
print(error_str)
result.stderr += f"\n\n{error_str}"
output = {}

recipe_folder = os.path.dirname(recipe_path)

Expand Down

0 comments on commit 24116c9

Please sign in to comment.