Skip to main content

Overview

Mistral AI provides high-performance open and commercial models including Mistral Large and Codestral. Known for strong performance and European values. Model Class: MistralModel

Authentication

export MISTRAL_API_KEY="..."

Examples

from upsonic import Agent, Task
from upsonic.models.mistral import MistralModel

model = MistralModel(model_name="mistral-large-latest")
agent = Agent(model=model)

task = Task("Hello, how are you?")
result = agent.do(task)
print(result.output)

Parameters

ParameterTypeDescriptionDefaultSource
max_tokensintMaximum tokens to generateModel defaultBase
temperaturefloatSampling temperature (0.0-1.0)0.7Base
top_pfloatNucleus sampling1.0Base
seedintRandom seedNoneBase
stop_sequenceslist[str]Stop generation sequencesNoneBase
presence_penaltyfloatToken presence penalty0.0Base
frequency_penaltyfloatToken frequency penalty0.0Base
timeoutfloatRequest timeout (seconds)600Base