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.2.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.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omnimodkit-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 dcd1610166c7f9a91c079398df6040a17fb88605b0c4c59668c5038c129675ad
MD5 633fbd9ecaf6e9fb3bfe228fb1ed8a15
BLAKE2b-256 dc2464e01f9b026007906cb3f6ff5e3362f5c70e936be581e810f11e68d836ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: omnimodkit-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37495653267379fbc7041518d1983728218f81fe0ea734a8b3cb6b49d09ebfcc
MD5 ef47c2dcc116f7253ba1841ee89e5619
BLAKE2b-256 576aa2361a001432cb9f4690d818279ffe9cc4a9f3d1e399f98c72ab6d8321cd

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