superduper_cohere
Superduper allows users to work with cohere API models.
Installation​
pip install superduper_cohere
API​
Class | Description |
---|---|
superduper_cohere.model.Cohere | Cohere predictor. |
superduper_cohere.model.CohereEmbed | Cohere embedding predictor. |
superduper_cohere.model.CohereGenerate | Cohere realistic text generator (chat predictor). |
Examples​
CohereEmbed​
from superduper_cohere.model import CohereEmbed
model = CohereEmbed(identifier='embed-english-v2.0', batch_size=1)
model..predict('Hello world')
CohereGenerate​
from superduper_cohere.model import CohereGenerate
model = CohereGenerate(identifier='base-light', prompt='Hello, {context}')
model.predict('', context=['world!'])