cohere-ai / cohere-typescript

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

refactor: changes summarize request from enum to union type #73

Closed amir002001 closed 1 year ago

amir002001 commented 1 year ago

Description

I added a refactor that adds union types to co.summarize() instead of using TypeScript enums. Also noticed almost all of your codebase uses union types. Excuse me if this is an edge case where enums are good. Here's some sources behind my reasoning, but my main reason was IntelliSense :)

sources:

How Has This Been Tested?

Passes all tests (except for the last one because my API key is rate limited haha), and now has LSP IntelliSense as well for the union types.

Checklist:

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.