From bb380ee6560513e8b3b1b1872bc191bc7fa25d0c Mon Sep 17 00:00:00 2001 From: Bishoy Hany <167128903+Bishoy-at-pieces@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:36:36 +0200 Subject: [PATCH] fix if conversation is 0 --- src/pieces/copilot/conversations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pieces/copilot/conversations.py b/src/pieces/copilot/conversations.py index 5e7f604..8abd06c 100644 --- a/src/pieces/copilot/conversations.py +++ b/src/pieces/copilot/conversations.py @@ -100,8 +100,8 @@ def get_conversations(max_conversations,**kwargs): def get_conversation_messages(idx:Optional[int]=None,conversation:Optional[BasicChat]=None): """Print a conversation messages. you need to pass the index of the conversation or the conversation id""" - - if idx: + + if idx is not None: conversation = Settings.pieces_client.copilot.chats()[idx]