Skip to main content

Welcome to xpuls.ai 👋

xpuls-ml-sdk

Twitter Follow Discord

PyPI version GitHub version

Roadmap 🚀

Framework Status
Langchain ✅
LLamaIndex Planned
PyTorch Planned
SKLearn Planned
Transformers Planned
Stable Diffusion Next

💡 If support of any framework/feature is useful for you, please feel free to reach out to us via Discord or Github Discussions

🔗 Installation

  1. Install from PyPI
pip install xpuls-ml-sdk

🧩 Usage Example

from xpuls.mlmonitor.langchain.instrument import LangchainTelemetry
import os
import xpuls
from xpuls.prompt_hub import PromptClient

# Enable this for advance tracking with our xpuls-ml platform
xpuls.host_url = "https://api.xpuls.ai"
xpuls.api_key = "********************"  # Get from https://platform.xpuls.ai
xpuls.adv_tracing_enabled = "true" # Enable this for automated insights and log tracing via xpulsAI platform
# Add default labels that will be added to all captured metrics
default_labels = {"service": "ml-project-service", "k8s_cluster": "app0", "namespace": "dev", "agent_name": "fallback_value"}

# Enable the auto-telemetry
LangchainTelemetry(default_labels=default_labels,).auto_instrument()
prompt_client = PromptClient(   
    prompt_id="clrfm4v70jnlb1kph240",  # Get prompt_id from the platform
    environment_name="dev"  # Deployed environment name
)

## [Optional] Override labels for scope of decorator [Useful if you have multiple scopes where you need to override the default label values]
@TelemetryOverrideLabels(agent_name="chat_agent_alpha")
@MapXpulsProject(project_slug="defaultoPIt9USSR")  # Get Project Slug from platform
def get_response_using_agent_alpha(prompt, query):
    agent = initialize_agent(llm=chat_model,
                             verbose=True,
                             agent=CONVERSATIONAL_REACT_DESCRIPTION,
                             memory=memory)
    
    data = prompt_client.get_prompt({"variable-1": "I'm the first variable"})  # Substitute any variables in prompt

    res = agent.run(data) # Pass the entire `XPPrompt` object to run or invoke method

ℹ️ Complete Usage Guides

🧾 License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.

📢 Contributing

We welcome contributions to xpuls-ml-sdk! If you're interested in contributing.

If you encounter any issues or have feature requests, please file an issue on our GitHub repository.

💬 Get in touch

👉 Join our Discord community!

🐦 Follow the latest from xpuls.ai team on Twitter @xpulsai

📮 Write to us at hello@xpuls.ai

Metadata

Release files for xpuls-ml-sdk 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xpuls-ml-sdk 0.3.0
File Size Uploaded Provenance Actions
xpuls-ml-sdk-0.3.0.tar.gz 22.5 kB Without provenance Details for xpuls-ml-sdk-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xpuls-ml-sdk 0.3.0
File Interpreter ABI Platform Actions
xpuls_ml_sdk-0.3.0-py3-none-any.whl Python 3 none any Details for xpuls_ml_sdk-0.3.0-py3-none-any.whl

Total release size: 52.7 kB

Release files / xpuls-ml-sdk-0.3.0.tar.gz

Download URL xpuls-ml-sdk-0.3.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5fb3c028135a97515ac1e63e93beb6192eb255ab5d04860456604c6499bd2b97
BLAKE2b-256 checksum
How to use checksums
70a3a8a1496db712ee7476da4c21059e6b14a3a0105ea6f8618640b821aba56b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / xpuls_ml_sdk-0.3.0-py3-none-any.whl

Download URL xpuls_ml_sdk-0.3.0-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b5fe6957d2887cbf444fa92d1fd3357eeea508cd886eeec280786ab22ced3a8
BLAKE2b-256 checksum
How to use checksums
68987ca497d2e34e89b004c05145ea7b4f1636c87cb3f922968e590f035100a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for xpuls-ml-sdk 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page