Execute step

This commit is contained in:
Anton Osika
2023-06-17 14:10:29 +02:00
parent b07fbe1315
commit 5cb6b4539b
2 changed files with 13 additions and 5 deletions

View File

@@ -1,7 +1,9 @@
import re
from typing import List, Tuple
from gpt_engineer.db import DB
def parse_chat(chat): # -> List[Tuple[str, str]]:
def parse_chat(chat) -> List[Tuple[str, str]]:
# Get all ``` blocks
regex = r"```(.*?)```"
@@ -19,7 +21,7 @@ def parse_chat(chat): # -> List[Tuple[str, str]]:
return files
def to_files(chat, workspace):
def to_files(chat: str, workspace: DB):
workspace["all_output.txt"] = chat
files = parse_chat(chat)