Class representing a Cohere Large Language Model (LLM). It interacts with the Cohere API to generate text completions.
const model = new Cohere({ temperature: 0.7, maxTokens: 20, maxRetries: 5,});const res = await model.call( "Question: What would be a good company name for a company that makes colorful socks?\nAnswer:");console.log({ res }); Copy
const model = new Cohere({ temperature: 0.7, maxTokens: 20, maxRetries: 5,});const res = await model.call( "Question: What would be a good company name for a company that makes colorful socks?\nAnswer:");console.log({ res });
Optional
Maximum number of tokens to generate in the completion.
Model to use
Sampling temperature to use
Generated using TypeDoc
Class representing a Cohere Large Language Model (LLM). It interacts with the Cohere API to generate text completions.
Example