[docs]classChatService:"""For interacting with Chat objects"""def__init__(self,api_connection:BigdataConnectionProtocol):self._api=api_connection
[docs]defnew(self,name:str,formatter:Optional[InlineAttributionFormatter]=None,)->Chat:"""Create a new chat"""response=self._api.create_chat(CreateNewChat(name=name))formatter=formatterorDefaultFormatter()returnresponse.to_chat_model(self._api,formatter=formatter)
[docs]defget(self,id_:str,formatter:Optional[InlineAttributionFormatter]=None,)->Chat:"""Return a Chat by its id"""response=self._api.get_chat(id_)formatter=formatterorDefaultFormatter()returnresponse.to_chat_model(self._api,formatter=formatter)
[docs]defdelete(self,id_:str):"""Delete a Chat by its id"""self._api.delete_chat(id_)