Skip to main content

Quick Start

This guide will help you get started with AIMon. Before getting started, make sure you have AIMon installed. If not, follow the installation guide.

It is straightforward to use AIMon. Set the AIMON_API_KEY environment variable with your API key. Here is an example using the detect decorator which is synchronous:

from aimon import Detect

# See analyze_prod for the asynchronous version
# that can be used for continuous monitoring
detect = Detect(values_returned=['context', 'generated_text'], config={"hallucination": {"detector_name": "default"}})

@detect
def my_llm_app(context, query):
generated_text = my_llm_model(context, query)
return context, generated_text