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

Uploaded Python 3

File details

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

File metadata

  • Download URL: intura_ai-0.0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1f902a0e5fc7a7cdc7e2f5f5d25d3a1dae3f37955e4ad6093daeed30d1f0b21d
MD5 1f8d560d69ff4bea7ab1b237643d3ce4
BLAKE2b-256 8f8d401f3ba0cbd8236e26bb00c7f2d01749e94841cffae446f0157e0303823a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: intura_ai-0.0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65e936abee5d3c4aaf0e1a60da878ceea40691a822cdfeee6a61c23cc13111bf
MD5 742d7798b99833bfa8d03afb9cfc064c
BLAKE2b-256 0e9a90bdbde9a06a865cf9e2d985863cd7c9a663e2e8f6769606dd216e3b4192

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