Ava Mosaic AI
v0.1.9
__ __ _______ _______ _______ ___ _______
| |_| || || || _ || | | |
| || _ || _____|| |_| || | | |
| || | | || |_____ | || | | |
| || |_| ||_____ || || | | _|
| ||_|| || | _____| || _ || | | |_
|_| |_||_______||_______||__| |__||___| |_______|
Mosaic is a lightweight Python library that extends the capabilities of the Instructor library for LLM-based tasks. Born out of a personal project to streamline repetitive processes in GenAI development, Mosaic aims to reduce overhead and simplify common operations in LLM/GenAI projects.
pip install ava-mosaic-ai
import ava_mosaic_ai
from pydantic import BaseModel
# Initialize LLM
llm = ava_mosaic_ai.get_llm("openai")
# Define response model
class ResponseModel(BaseModel):
response: str
# Use Mosaic's simplified interface
response = llm.create_completion(
response_model=ResponseModel,
messages=[{"role": "user", "content": "Tell me a joke about AI"}],
)
print(response)
For full documentation, visit our docs site.
We welcome contributions! Please see our Contributing Guide for more details.
llm_factory
, which inspired this project. Check out his work here.Mosaic is released under the MIT License. See the LICENSE file for details.
Built with ❤️ by [karan Singh Kochar]