Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lytix.co/llms.txt

Use this file to discover all available pages before exploring further.

Lytix supports capturing custom LLM traces (e.g. not associated with any SDK or API call). This is useful if you have custom models you’d still like to track.
from lytix_py import lytix


@lytix.trace(modelName="nodeCli")
async def getResponse(logger):
    modelOutput = "Paris is the capital of France"

    # Set our defined params however we want
    lytix.setMessage("Some user input", "user")
    lytix.setMessage(modelOutput, "assistant")

    # Optional values
    lytix.setUserIdentifier("testUser")
    lytix.setSessionId("testSession")

    return modelOutput