diff --git a/lazydev/modules/developer.py b/lazydev/modules/developer.py index 4b04f16..b646b93 100644 --- a/lazydev/modules/developer.py +++ b/lazydev/modules/developer.py @@ -166,8 +166,9 @@ def write_file_content(self, file_path, review_iteration: int = 1): ) response = self.brain_storm( review_prompt, f'code-{file_path.split("/")[-1]}') - response = response.strip('"\'`-\n') - if (response.strip('"\'`-\n') == "NONE"): + response = response.strip('."\'`-\n') + nonecheck_response = response.split("\n")[0].split(" ")[0] + if (nonecheck_response.strip('."\'`-\n') == "NONE"): break code = response diff --git a/lazydev/modules/prompts.py b/lazydev/modules/prompts.py index 0cab510..628d3a6 100644 --- a/lazydev/modules/prompts.py +++ b/lazydev/modules/prompts.py @@ -179,11 +179,15 @@ def get_code_feedback(draft: str, question, clarifications: str, plan: str, file your job is to find problems with the code and refine it. As your response will go to an automated parser, things to keep in mind all the time: -* if no refinement is required then just say NONE, and nothing else +* if no refinement is required then just say "NONE", and nothing else * only write the file content, no expiation, no pretext as this will directly go as code. * if the language support, add comments at steps, which expains what you are about to do, dont add comment if comment is not supported by the file type example json file * keep in mind there wont be any additional files other then the full files list given above, only use files that are mentioned in that list Begin! + +File: {file_path_to_write} + +Refined code: """ def get_compressed_code(code: str): diff --git a/setup.py b/setup.py index 13c8b52..1275c2b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="lazydev", - version='0.0.8', + version='0.0.9', packages=find_packages(), install_requires=[ "langchain>=0.0.188", @@ -46,3 +46,8 @@ # ], ) + +# steps to build and publish +# source .venv/bin/activate +# python -m bild +# twine upload dist/*