Buslytics is a Python package designed to process natural language user input to monitor and analyze the health and performance of message bus systems. It leverages language models to interpret queries related to message throughput, error rates, queue statuses, and system alerts, delivering structured insights that help developers and operators maintain system reliability without requiring deep technical expertise.
Install the package via pip:
pip install buslyticsHere's a basic example of how to use Buslytics:
from buslytics import buslytics
response = buslytics(user_input="What is the current error rate?", api_key="your_api_key")
print(response)- user_input (str): The text query input by the user for system analysis.
- llm (Optional[BaseChatModel]): An optional LangChain LLM instance. If not provided, the default ChatLLM7 from
langchain_llm7will be used. - api_key (Optional[str]): Your LLM7 API key. If not provided, it will be fetched from the environment variable
LLM7_API_KEY.
You can pass your own language model instance to suit your preferred provider:
from langchain_openai import ChatOpenAI
from buslytics import buslytics
llm = ChatOpenAI()
response = buslytics(user_input="Check message throughput", llm=llm)Other supported models include:
from langchain_anthropic import ChatAnthropic
llm = ChatAnthropic()
response = buslytics(user_input="Check queue status", llm=llm)from langchain_google_genai import ChatGoogleGenerativeAI
llm = ChatGoogleGenerativeAI()
response = buslytics(user_input="Identify system alerts", llm=llm)- The package uses
ChatLLM7fromlangchain_llm7by default. - The default rate limits for the free tier of LLM7 are usually sufficient. For higher limits, supply your API key via the environment variable
LLM7_API_KEYor directly as a parameter. - Obtain a free API key at https://token.llm7.io/.
Please report issues or feature requests at: https://github.com/chigwell/buslytics/issues
Eugene Evstafev
Email: [email protected]
GitHub: chigwell
This project is licensed under the MIT License.