Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Using Cohere models with Upsonic
CohereModel
export CO_API_KEY="..."
from upsonic import Agent, Task from upsonic.models.cohere import CohereModel model = CohereModel(model_name="command-r-plus") agent = Agent(model=model) task = Task("Hello, how are you?") result = agent.do(task) print(result)
from upsonic import Agent, Task from upsonic.models.cohere import CohereModel, CohereModelSettings model = CohereModel( model_name="command-r-plus", settings=CohereModelSettings(max_tokens=1024, temperature=0.7) ) agent = Agent(model=model)
from upsonic import Agent, Task from upsonic.models.cohere import CohereModelSettings agent = Agent( model="cohere/command-r-plus", settings=CohereModelSettings(max_tokens=1024) )
max_tokens
int
temperature
float
top_p
seed
stop_sequences
list[str]
presence_penalty
frequency_penalty