Intelligent Research and Experimentation AI for LLM experimentation production.
Project description
Intura-AI: Intelligent Research and Experimentation AI
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file intura_ai-0.0.1b1.tar.gz.
File metadata
- Download URL: intura_ai-0.0.1b1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5719d264cc55e017eb96f70e3c36373596af6c3e4c59a4eb7da35925098aaff
|
|
| MD5 |
73da0e2d814887ac6e385d78cffc9ba8
|
|
| BLAKE2b-256 |
e762fbc00ceb961b7b4ed80363b1b2f25d5df6256e51061794704739142e96af
|
File details
Details for the file intura_ai-0.0.1b1-py3-none-any.whl.
File metadata
- Download URL: intura_ai-0.0.1b1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb8f789e315cc42b5e720f9b06e769e8ac14f1b7ac03569bb2bc28e79ae6a39
|
|
| MD5 |
9277afb55bea51f5f86eef79f599c889
|
|
| BLAKE2b-256 |
637fe0469e2cb178f1f23af6b8f6efe751051817c5a58b2e06e6be07b9ab5e7c
|