Common pure/IO utilities for multi-modal architectures team
Project description
mmar-mapi
Multimodal architectures Maestro API — common pure/IO utilities for multi-modal architectures team.
Installation
pip install mmar-mapi
Overview
A Python library providing foundational utilities for building conversational AI systems, with particular focus on medical/healthcare applications.
Core Features
- Chat Management: Framework for managing conversations with flexible message types
- File Storage: Resource management with deduplication support
- Document Processing: Content extraction from various document types
- LLM Integration: Interfaces for Large Language Model communication
- XML Parsing: Utilities for medical diagnostic data
Quick Start
from mmar_mapi import Chat, HumanMessage, AIMessage, make_content
# Create a chat session
chat = Chat(
context=Context(session_id="session-123", user_id="user-456"),
messages=[
HumanMessage(content=make_content("Hello, AI!")),
AIMessage(content=make_content("How can I help you today?"))
]
)
from mmar_mapi import FileStorage, ResourceId
# Store and retrieve files
storage = FileStorage()
resource_id = storage.upload(b"file content")
content = storage.download(resource_id)
Main Modules
Chat System (mmar_mapi.models.chat)
Chat— Conversation container with context and messagesHumanMessage,AIMessage,MiscMessage— Message typesContent— Flexible content supporting text, resources, commands, and widgetsWidget— UI components for interactive conversations
File Storage (mmar_mapi.file_storage)
FileStorageAPI— Abstract interface for file operationsFileStorage— Implementation with deduplicationFileStorageBasic— Simple file access without storageResourceId— Type-safe resource identifiers
Models (mmar_mapi.models)
TrackInfo,DomainInfo— Track and domain categorizationDiagnosticsXMLTagEnum,MTRSXMLTagEnum,UncertaintyXMLTagEnum— Medical XML tags
Utilities (mmar_mapi.utils)
make_session_id()— Generate unique session identifierschunked()— Split iterables into chunksXMLParser— XML processing utilities
Services (mmar_mapi.services)
Service APIs for integrating with external systems:
LLM Hub (llm_hub.py)
LLMHubAPI— Interface for LLM communicationLLMCallProps— Call configurationLLMPayload— Message payload with attachmentsLLMResponseExt— Extended response format
Document Extractor (document_extractor.py)
DocumentExtractorAPI— Extract content from documentsDocExtractionSpec— Extraction configurationExtractedTable,ExtractedPicture,ExtractedPageImage— Extraction results
Chat Manager (chat_manager.py)
ChatManagerAPI— Manage domains, tracks, and chat responses
Text Processing (text_generator.py, text_processor.py)
TextGeneratorAPI— Generate text from chatTextProcessorAPI— Process text with chat context
Content Interpreter (content_interpreter.py)
ContentInterpreterAPI— Interpret content resourcesContentInterpreterRemoteAPI— Remote content interpretationContentInterpreterRemoteResponse— Remote response format
Additional Services
BinaryClassifiersAPI— Binary text classificationTranslatorAPI— Language translationCriticAPI— Text evaluationTextExtractorAPI— Extract text from resources
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mmar_mapi-1.6.1.tar.gz.
File metadata
- Download URL: mmar_mapi-1.6.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.31
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8db555a76494926023acaf2591ee38391df837a63f726a8e72a60cabda50554f
|
|
| MD5 |
e86b66377b678cfb54bba3283b4699e9
|
|
| BLAKE2b-256 |
304bc75dfa784fedf4d52b390ca28da13bdc72bd0a5b40395f13cbed8f4d031b
|
File details
Details for the file mmar_mapi-1.6.1-py3-none-any.whl.
File metadata
- Download URL: mmar_mapi-1.6.1-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.31
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6a7f2e5ca384a070337360e2619db4179d81f95be92b08cd63b2fc86588947a
|
|
| MD5 |
3bfeebf6ebe97fd59c977651ec6a2a97
|
|
| BLAKE2b-256 |
ef35e0bd95e3080bff62fe01dcb126f1aea35e0a7e8f38f339634dcc7d9d1914
|