dd-trace
    Preparing search index...

    Interface AnnotationOptions

    Annotation options for LLM Observability spans.

    interface AnnotationOptions {
        inputData?:
            | string
            | Document
            | llmobs.Message
            | { [key: string]: any }
            | llmobs.Message[]
            | Document[];
        metadata?: { [key: string]: any };
        metrics?: { [key: string]: number };
        outputData?:
            | string
            | Document
            | llmobs.Message
            | llmobs.Message[]
            | Document[]
            | { [key: string]: any };
        tags?: { [key: string]: any };
    }
    Index

    Properties

    inputData?:
        | string
        | Document
        | llmobs.Message
        | { [key: string]: any }
        | llmobs.Message[]
        | Document[]

    A single input string, object, or a list of objects based on the span kind:

    1. LLM spans: accepts a string, or an object of the form {content: "...", role: "..."}, or a list of objects with the same signature.
    2. Embedding spans: accepts a string, list of strings, or an object of the form {text: "...", ...}, or a list of objects with the same signature.
    3. Other: any JSON serializable type
    metadata?: { [key: string]: any }

    Object of JSON serializable key-value metadata pairs relevant to the input/output operation described by the LLM Observability span.

    metrics?: { [key: string]: number }

    Object of JSON serializable key-value metrics (number) pairs, such as {input,output,total}Tokens

    outputData?:
        | string
        | Document
        | llmobs.Message
        | llmobs.Message[]
        | Document[]
        | { [key: string]: any }

    A single output string, object, or a list of objects based on the span kind:

    1. LLM spans: accepts a string, or an object of the form {content: "...", role: "..."}, or a list of objects with the same signature.
    2. Retrieval spans: An object containing any of the key value pairs {name: str, id: str, text: str, source: number} or a list of dictionaries with the same signature.
    3. Other: any JSON serializable type
    tags?: { [key: string]: any }

    Object of JSON serializable key-value tag pairs to set or update on the LLM Observability span regarding the span's context.