You can pass instructions to steer model transformation via the instructions parameter:
@marvin.model(instructions='Always generate locations in California')
class Location(BaseModel):
city: str
state: str
Location('a large city')
# Location(city='Los Angeles', state='California')
Note that instructions are set at the class level, so they will apply to all instances of the model. To customize instructions on a per-instance basis, use cast with the instructions parameter instead.
You can pass instructions to steer model transformation via the
instructions
parameter:Note that instructions are set at the class level, so they will apply to all instances of the model. To customize instructions on a per-instance basis, use
cast
with theinstructions
parameter instead.