cohere-ai / cohere-typescript

The Cohere TypeScript SDK
https://docs.cohere.ai
MIT License
127 stars 18 forks source link

Add more flexible types #2

Closed kravse closed 3 years ago

kravse commented 3 years ago

The sdk shouldn't break if a parameter changes or is added. This adds Indexable types to the response objects in typescript to allow any number of parameters in the response. Ideally the declarations should be kept up to date, but in the worst case scenario the types shouldn't cause problems with regards to unexpected changes.