Thanks for the package. I thought I would change the API to using R's S3 interface namely so that it is extensible; this PR enables anyone to add new vendors.
I know this is quite a large PR which changes a lot of the source code so I'd totally understand if you do not want to merge it.
The idea is that change create_chat to a generic that returns an object of class tidychat on which we can then call various methods.
I could for instance bring support for a new vendor via:
Either the existing methods to add_message, add_param, etc. for the object tidychat work fine with my API in which case I can leave it as is. Otherwise I can create methods.
Hi Albert,
Thanks for the package. I thought I would change the API to using R's S3 interface namely so that it is extensible; this PR enables anyone to add new vendors.
I know this is quite a large PR which changes a lot of the source code so I'd totally understand if you do not want to merge it.
The idea is that change
create_chat
to a generic that returns an object of classtidychat
on which we can then call various methods.I could for instance bring support for a new vendor via:
Either the existing methods to
add_message
,add_param
, etc. for the objecttidychat
work fine with my API in which case I can leave it as is. Otherwise I can create methods.