The most pythonic LLM application building experience
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.
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="YOUR_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mirascope-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a39aa7adf0b037062d075fdf5dfc12839710b9d90aa4eddbe7da9a00140d24d2 |
|
MD5 | 04dc7fb3f63a6371bdb1b91c3be203b0 |
|
BLAKE2b-256 | c4145875ab5c1095c19a2afba5f2b3ab50484e25647f93a5aeb81462d0db5ef7 |