[Docs] Documentation updates (#1014)

This commit is contained in:
Deven Patel
2023-12-15 17:02:50 +05:30
committed by GitHub
parent 65c8dd445b
commit b246d9823e
7 changed files with 67 additions and 8 deletions

View File

@@ -48,8 +48,7 @@ class BaseLlm(JSONSerializable):
def update_history(self, app_id: str):
"""Update class history attribute with history in memory (for chat method)"""
chat_history = self.memory.get_recent_memories(app_id=app_id, num_rounds=10)
if chat_history:
self.set_history([str(history) for history in chat_history])
self.set_history([str(history) for history in chat_history])
def add_history(self, app_id: str, question: str, answer: str, metadata: Optional[Dict[str, Any]] = None):
chat_message = ChatMessage()