Docs
Install
Mirascope

Mirascope

Mirascope users can use HyperDX to observe their LLM applications. You can get started with just a few lines of Mirascope SDK configuration and a HyperDX API key.

This Guide Integrates: Traces

Getting Started

Integrating HyperDX with Mirascope is straightforward. Here's a basic example of how you can instrument your Mirascope application to send data to HyperDX:

# my_app.py
import os
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import (
 BatchSpanProcessor,
)
from mirascope.openai import OpenAICall
from mirascope.otel import configure
from mirascope.otel.hyperdx import with_hyperdx

@with_hyperdx
classBookRecommender(OpenAICall):
 prompt_template ="Please recommend a {genre} book."

 genre:str


response =BookRecommender(genre="fantasy").call()# this will be logged to HyperDX
print(response.content)

And then starting your application with the following environment variables:

HYPERDX_API_KEY=<YOUR_API_KEY> OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>pythonmy_app.py

You can view the full documentation and setup guide on the Mirascope HyperDX Integration Page (opens in a new tab).

Hi, how can I help you?

AltStyle によって変換されたページ (->オリジナル) /