Skip to main content

Prompt management directly integrated into your workflow.

Project description

Getting started with Mirascope

This library intends to give developers a better way to build with LLMs that integrates seamlessly into your workflow, starting with better prompt management and core LLM interaction calls. We’re building the de facto pythonic prompt templating and LLM-interaction library.


GitHub stars Documentation GitHub issues Github discussions GitHub license PyPI version PyPI pyversions


Why use Mirascope?

  • Easy: Designed for ease of use, Mirascope features an intuitive interface and a minimal learning curve
  • Intuitive: Get editor support for prompts, eliminating the need to dig through documentation
  • Durable: Mirascope offers versatile and adaptable functionality, allowing seamless integration with custom solutions
  • Integration: Leveraging Pydantic, Mirascope offers easy integration with JSON Schema and other tools
  • Maintainability: Reduce prompt-related bugs and organize prompts with provided utilities

Installation

Install Mirascope and start building with LLMs in minutes.

$ pip install mirascope

This will install the mirascope package and CLI.

A Simple Mirascope Example

from mirascope import OpenAIChat, Prompt

class BookRecommendationPrompt(Prompt):
    """
    Can you recommend some books on {topic}?
    """

    topic: str

prompt = BookRecommendationPrompt(topic="coding")
print(str(prompt))

model = OpenAIChat(api_key=os.getenv("OPENAI_API_KEY"))
res = model.create(prompt)
print(str(res))
Can you recommend some books on coding?

Certainly! Here are some highly recommended books on coding: ...

Dive Deeper

  • Check out the concepts section to dive deeper into the library and the core features that make it powerful, such as pydantic prompts and the Mirascope CLI.
  • You can follow along with more detailed examples to get a better understanding of how to utilize the library to effectively model your data. You can also take a look at code examples in the repo.
  • The API Reference contains full details on all classes, methods, functions, etc.

Contributing

Mirascope welcomes contributions from the community! See the contribution guide for more information on the development workflow. For bugs and feature requests, visit our GitHub Issues and check out our templates.

How To Help

Any and all help is greatly appreciated! Check out our page on how you can help.

Roadmap (What's on our mind)

  • Agents
  • RAG
  • Functions as OpenAI tools
  • Testing for prompts
  • Add more LLMs
  • Prompt Response tracking
  • Database support for versioning
  • Better DX for Mirascope CLI (e.g. autocomplete)

Versioning

Mirascope uses Semantic Versioning.

License

This project is licensed under the terms of the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mirascope-0.1.0.tar.gz (14.4 kB view hashes)

Uploaded Source

Built Distribution

mirascope-0.1.0-py3-none-any.whl (16.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page