diff --git a/_llm/llm.py b/_llm/llm.py index 4705599..93999e8 100644 --- a/_llm/llm.py +++ b/_llm/llm.py @@ -555,7 +555,15 @@ class LLM: if not self.chat: self.messages = [self.messages[0]] - return response.message + #* Add attribute 'content' for compatibility with old version of _llm.py + #* This is a copy of response.message.content + #TODO Remove this when _llm.py is updated + # Show a warning if using old version of _llm.py + Warning = ("Please use reposen.message.content when ising _llm") + + response.content = response.message + + return response else: return "An error occurred." except Exception as e: