Change the way, memory is logged.

This commit is contained in:
OK
2024-03-17 12:08:00 +01:00
parent 36190745c9
commit 3bdf9d03c6
3 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -121,14 +121,14 @@ class OpenAIResponder(AIResponder, LeonardoAIDrawMixIn):
f'The whole memory should not be too long, summarize if required. '
f'Write just new memory data without any comments.'}]
try:
logging.info(f'send this memory request:\n{pp(messages)}')
# logging.info(f'send this memory request:\n{pp(messages)}')
result = await openai_chat(self.client,
model=self.config['memory-model'],
messages=messages,
temperature=0.6,
max_tokens=4096)
new_memory = result.choices[0].message.content
logging.info(f'new memory:\n{pp(new_memory)}')
logging.info(f'new memory:\n{new_memory}')
return new_memory
except Exception as err:
logging.warning(f"failed to create new memory: {repr(err)}")