mirror of https://github.com/hwchase17/langchain
Feat bedrock cohere support (#11230)
**Description:** Added support for Cohere command model via Bedrock. With this change it is now possible to use the `cohere.command-text-v14` model via Bedrock API. About Streaming: Cohere model outputs 2 additional chunks at the end of the text being generated via streaming: a chunk containing the text `<EOS_TOKEN>`, and a chunk indicating the end of the stream. In this implementation I chose to ignore both chunks. An alternative solution could be to replace `<EOS_TOKEN>` with `\n` Tests: manually tested that the new model work with both `llm.generate()` and `llm.stream()`. Tested with `temperature`, `p` and `stop` parameters. **Issue:** #11181 **Dependencies:** No new dependencies **Tag maintainer:** @baskaryan **Twitter handle:** mangelino --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>pull/11382/head
parent
37f2f71156
commit
2f83350eac
Loading…
Reference in New Issue