Skip to main content
Version: Main branch

superduper_cohere

Superduper allows users to work with cohere API models.

Installation​

pip install superduper_cohere

API​

ClassDescription
superduper_cohere.model.CohereCohere predictor.
superduper_cohere.model.CohereEmbedCohere embedding predictor.
superduper_cohere.model.CohereGenerateCohere 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!'])