Skip to content

mirascope.core.mistral.dynamic_config

This module defines the function return type for functions as LLM calls.

Usage Documentation

Dynamic Configuration

MistralDynamicConfig module-attribute

MistralDynamicConfig = BaseDynamicConfig[
    BaseMessageParam, MistralCallParams
]

The function return type for functions wrapped with the mistral_call decorator.

Example:

from mirascope.core import prompt_template
from mirascope.core.mistral import MistralDynamicConfig, mistral_call


@mistral_call("mistral-large-latest")
@prompt_template("Recommend a {capitalized_genre} book")
def recommend_book(genre: str) -> MistralDynamicConfig:
    return {"computed_fields": {"capitalized_genre": genre.capitalize()}}