v0.21.0
What's Changed
- Improve function calling docs by @jackmpcollins in #186
- Add vision example: renaming screenshots by @jackmpcollins in #187
- Improve RAG example notebook using GitHub search by @jackmpcollins in #188
- Add Mistral backend by @jackmpcollins in #189
Full Changelog: v0.20.1...v0.21.0
Mistral API now supported natively 🚀
with full support for StreamedStr
, ParallelFunctionCall
, etc. Example:
from magentic import prompt
from magentic.chat_model.mistral_chat_model import MistralChatModel
from pydantic import BaseModel
class Superhero(BaseModel):
name: str
age: int
power: str
enemies: list[str]
@prompt(
"""Create a Superhero named {name}""",
model=MistralChatModel("mistral-large-latest"),
)
def create_superhero(name: str) -> Superhero: ...
create_superhero("Garden Man")
# Superhero(name='Garden Man', age=35, power='Plant control', enemies=['Smog', 'Deforestator'])