mirascope.core.mistral.dynamic_config¶
This module defines the function return type for functions as LLM calls.
MistralDynamicConfig
module-attribute
¶
MistralDynamicConfig = BaseDynamicConfig[
AssistantMessage
| SystemMessage
| ToolMessage
| UserMessage
| BaseMessageParam,
MistralCallParams,
Mistral,
]
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()}}