|
|
|
@ -555,7 +555,15 @@ class LLM: |
|
|
|
if not self.chat: |
|
|
|
if not self.chat: |
|
|
|
self.messages = [self.messages[0]] |
|
|
|
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: |
|
|
|
else: |
|
|
|
return "An error occurred." |
|
|
|
return "An error occurred." |
|
|
|
except Exception as e: |
|
|
|
except Exception as e: |
|
|
|
|