Update increment development for 0.5.x version: Delete files with 'refine' and write_code_guide.py. Add write_code_guide_an.py. Update write_code.py for guiding write code.

This commit is contained in:
mannaandpoem 2023-12-26 21:36:37 +08:00
parent 27b1f2b335
commit a15e88f963
2 changed files with 28 additions and 6 deletions

View file

@ -209,14 +209,13 @@ class WriteCodeGuide(Action):
context: Document = Field(default_factory=Document)
llm: BaseGPTAPI = Field(default_factory=LLM)
async def run(self):
rsp = await WRITE_CODE_GUIDE_NODE.fill(context=CODE_GUIDE_CONTEXT, llm=self.llm, schema="json")
return rsp
async def run(self, context):
return await WRITE_CODE_GUIDE_NODE.fill(context=context, llm=self.llm, schema="json")
def main():
action = WriteCodeGuide()
return asyncio.run(action.run())
return asyncio.run(action.run(CODE_GUIDE_CONTEXT))
if __name__ == "__main__":