Skip to main content

Intelligent Research and Experimentation AI for LLM experimentation production.

Project description

Intura-AI: Intelligent Research and Experimentation AI

PyPI version LangChain Compatible

intura-ai is a Python package designed to streamline LLM experimentation and production. It provides tools for logging LLM usage and managing experiment predictions, with seamless LangChain compatibility.

Dashboard: dashboard.intura.co

Features

  • Callbacks:
    • UsageTrackCallback: Log LLM usage details for analysis and monitoring.
  • Experiment Prediction:
    • ChatModelExperiment: Facilitates the selection and execution of LangChain models based on experiment configurations.
  • LangChain Compatibility:
    • Designed to integrate smoothly with LangChain workflows.

Installation

pip install intura-ai

Usage

Initialization

Before using intura-ai, you need to initialize the client with your API key.

from intura_ai.client import intura_initialization

INTURA_API_KEY = "..."
intura_initialization(INTURA_API_KEY)

Experiment Prediction

Use ChatModelExperiment to fetch and execute pre-configured LangChain models.

from intura_ai.experiments import ChatModelExperiment

EXPERIMENT_ID = "..."
client = ChatModelExperiment(EXPERIMENT_ID
llm, messages = client.build()
messages.append(('human', 'give me today quote for programmer'))
llm.invoke(messages)

Usage Tracking Callback

Integrate UsageTrackCallback to log LLM usage during execution.

from intura_ai.callbacks import UsageTrackCallback
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain.schema import HumanMessage

EXPERIMENT_ID = "..."
llm = ChatGoogleGenerativeAI(
    model="gemini-1.5-pro",
    max_tokens=300,
    timeout=None,
    max_retries=2,
    callbacks=[
        UsageTrackCallback(EXPERIMENT_ID)
    ]
)

messages = [HumanMessage(content="What is the capital of France?")]
llm.invoke(messages)

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bug reports or feature requests.

License

This project is licensed under the 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

intura_ai-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.

intura_ai-0.0.3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: intura_ai-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.10.16

File hashes

Hashes for intura_ai-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ec1d1e70d33ad7255bd6d922d6e0dd7a994e5f471c7f00f78e9c5ae48f0996a9
MD5 74b9e0a1b72ecff75ea688728d708616
BLAKE2b-256 7750b0731c37ec5df9de7bab81f966afc8d6e86c3e73aa7e27c99ac20e02b231

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for intura_ai-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6f305c061e6f0096134d295d74bbbf275a37b86526a2fd641f19fe691118950b
MD5 5448bc0de6df05a69b38835efce5c6c0
BLAKE2b-256 6e34e81d7ce86560e858e08eea13399d89266cb2c3ef4785169f5e0f215dcaad

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