You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whether you're generating text, extracting structured information, or developing complex AI-driven agent systems, Mirascope provides the tools you need to streamline your development process and create powerful, robust applications.
30 Second Quickstart
Install Mirascope, specifying the provider(s) you intend to use, and set your API key:
Make your first call to an LLM to extract the title and author of a book from unstructured text:
frommirascopeimportllmfrompydanticimportBaseModelclassBook(BaseModel):
title: strauthor: str@llm.call(provider="openai", model="gpt-4o-mini", response_model=Book)defextract_book(text: str) ->str:
returnf"Extract {text}"book=extract_book("The Name of the Wind by Patrick Rothfuss")
assertisinstance(book, Book)
print(book)
# Output: title='The Name of the Wind' author='Patrick Rothfuss'
Tutorials
Check out our quickstart tutorial and many other tutorials for an interactive way to getting started with Mirascope.
Usage
For a complete guide on how to use all of the various features Mirascope has to offer, read through our Learn documentation.