Skip to main content

Get structured output from multimodal AI models and integrate them into multitool agents

Project description

OmniModKit

Use convenient multimodal toolkit that operates with structured output.

Easily build agent tools on top of that.

Implementation

This package utilizes the implemented langchain structured output pipelines.

Installation

pip install omnimodkit

Usage

  • Import ModelsToolkit
  • Run appropriate models
  • Get structured output response
from omnimodkit import ModelsToolkit

# Initialize the model toolkit
modkit = ModelsToolkit()

# Run the model synchronously
modkit.text_model.run(
    user_input="What is the capital of France?",
)

# Stream responses from the model
for response in modkit.text_model.stream(
    user_input="What is the capital of France?",
):
    print(response, end="|", flush=True)

# Generate images
modkit.image_generation_model.run(
    user_input="Draw a cat",
)

# Use audio recognition
import io
import requests

url = "https://cdn.openai.com/API/examples/data/ZyntriQix.wav"
audio_bytes = io.BytesIO(requests.get(url, timeout=10).content)
audio_bytes.name = "audio.wav"
modkit.audio_recognition_model.run(
    in_memory_audio_stream=audio_bytes,
)

# Use image recognition
import io
import requests

url = "https://raw.githubusercontent.com/Flagro/treefeeder/main/logo.png"
image_bytes = io.BytesIO(requests.get(url, timeout=10).content)
image_bytes.name = "image.png"
modkit.vision_model.run(
    in_memory_image_stream=image_bytes,
)

License

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

omnimodkit-0.0.3.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

omnimodkit-0.0.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file omnimodkit-0.0.3.tar.gz.

File metadata

  • Download URL: omnimodkit-0.0.3.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for omnimodkit-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8ce2092c077c69143b1a3dccc8051fc9068de65f3966e104182db5ef60913bad
MD5 ec0bffe81be389c07cd42b3ee433c0c5
BLAKE2b-256 c1be0f35d1727ac32b9bdb348a7632429ed750a6a361850d0226cc13c70dc082

See more details on using hashes here.

File details

Details for the file omnimodkit-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: omnimodkit-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for omnimodkit-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 336c6f8caa39ec3e0647fc5d1fdfaafefaf60957141d1351ba1ffc61bf8e51e0
MD5 9f53a38d1eed5caddea5da76c10b67f4
BLAKE2b-256 38ab2d5131779e8ca3d167e05e9cc34f1562dcd3a31be6480b111d93435bc8d7

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