Arize Phoenix TS
    Preparing search index...
    • Log multiple session annotations in a single request.

      Each annotation can be of type "LLM", "CODE", or "HUMAN" and can include a label, score, and metadata. If an identifier is provided and an annotation with that identifier already exists, it will be updated.

      Parameters

      Returns Promise<{ id: string }[]>

      The IDs of the created or updated annotations

      const results = await logSessionAnnotations({
      sessionAnnotations: [
      {
      sessionId: "123abc",
      name: "quality_score",
      label: "good",
      score: 0.95,
      annotatorKind: "LLM",
      identifier: "custom_id_123",
      metadata: {
      model: "gpt-4"
      }
      },
      {
      sessionId: "456def",
      name: "sentiment",
      label: "positive",
      score: 0.8,
      annotatorKind: "CODE"
      }
      ]
      });