This commit is contained in:
Paul Gauthier 2023-07-21 11:49:19 -03:00
parent 289887d94f
commit 23beb7cb5d
6 changed files with 87 additions and 105 deletions

View file

@ -55,15 +55,6 @@ class WholeFileFunctionCoder(Coder):
else:
self.cur_messages += [dict(role="assistant", content=self.partial_response_content)]
def get_context_from_history(self, history):
context = ""
if history:
context += "# Context:\n"
for msg in history:
if msg["role"] == "user":
context += msg["role"].upper() + ": " + msg["content"] + "\n"
return context
def render_incremental_response(self, final=False):
if self.partial_response_content:
return self.partial_response_content