Skip to main content

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 messages
  • HumanMessage, AIMessage, MiscMessage — Message types
  • Content — Flexible content supporting text, resources, commands, and widgets
  • Widget — UI components for interactive conversations

File Storage (mmar_mapi.file_storage)

  • FileStorageAPI — Abstract interface for file operations
  • FileStorage — Implementation with deduplication
  • FileStorageBasic — Simple file access without storage
  • ResourceId — Type-safe resource identifiers

Models (mmar_mapi.models)

  • TrackInfo, DomainInfo — Track and domain categorization
  • DiagnosticsXMLTagEnum, MTRSXMLTagEnum, UncertaintyXMLTagEnum — Medical XML tags

Utilities (mmar_mapi.utils)

  • make_session_id() — Generate unique session identifiers
  • chunked() — Split iterables into chunks
  • XMLParser — XML processing utilities

Services (mmar_mapi.services)

Service APIs for integrating with external systems:

LLM Hub (llm_hub.py)

  • LLMHubAPI — Interface for LLM communication
  • LLMCallProps — Call configuration
  • LLMPayload — Message payload with attachments
  • LLMResponseExt — Extended response format

Document Extractor (document_extractor.py)

  • DocumentExtractorAPI — Extract content from documents
  • DocExtractionSpec — Extraction configuration
  • ExtractedTable, 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 chat
  • TextProcessorAPI — Process text with chat context

Content Interpreter (content_interpreter.py)

  • ContentInterpreterAPI — Interpret content resources
  • ContentInterpreterRemoteAPI — Remote content interpretation
  • ContentInterpreterRemoteResponse — Remote response format

Additional Services

  • BinaryClassifiersAPI — Binary text classification
  • TranslatorAPI — Language translation
  • CriticAPI — Text evaluation
  • TextExtractorAPI — Extract text from resources

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

mmar_mapi-1.5.4.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mmar_mapi-1.5.4-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file mmar_mapi-1.5.4.tar.gz.

File metadata

  • Download URL: mmar_mapi-1.5.4.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.13

File hashes

Hashes for mmar_mapi-1.5.4.tar.gz
Algorithm Hash digest
SHA256 e8a8b401b022ceaba4cf29e008f1f0e17978d165c4980df844d9208ff88f846e
MD5 0cf7e7dc6c97ab3fdfda6f47ae1dc35e
BLAKE2b-256 fce384c2f699db4356cc0b6e952737f6ae9f77841d6d1b33176a4a6d9a34af8c

See more details on using hashes here.

File details

Details for the file mmar_mapi-1.5.4-py3-none-any.whl.

File metadata

  • Download URL: mmar_mapi-1.5.4-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.13

File hashes

Hashes for mmar_mapi-1.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 335b09a51a4f3c0c4f0f04dbc810e5712eba8e936a73f7f8892cb111fc910019
MD5 249023b32ade04df141a51804cb3996e
BLAKE2b-256 826d15976ad0571d00576e5b807d54302fee4a5b89f01605e6040b3da9c63404

See more details on using hashes here.

Supported by

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