griptape icon indicating copy to clipboard operation
griptape copied to clipboard

Add Bedrock Cohere Support

Open collindutter opened this issue 1 year ago • 4 comments

The BedrockPromptDriver is missing support for Cohere.

collindutter avatar Oct 02 '23 22:10 collindutter

@vasinov so this is an interesting one. The Bedrock APIs don't return a token count, and Cohere's tokenizer requires an API key 😕

collindutter avatar Oct 05 '23 16:10 collindutter

Related to https://github.com/griptape-ai/griptape/issues/337. Can we skip this parameter entirely?

collindutter avatar Oct 09 '23 20:10 collindutter

@collindutter according to the Cohere SDK, it looks like max_tokens is an optional API parameter. Would it make sense to send a value if explicitly set by the caller and fall back to the default otherwise?

andrewfrench avatar Oct 28 '23 00:10 andrewfrench

@andrewfrench I think that's our best option, especially if it's not a required parameter.

collindutter avatar Oct 30 '23 16:10 collindutter