RETRIEVAL_DOCUMENTS (src/utils.ts)

openinference · js/packages/openinference-instrumentation-langchain-v0/src/utils.ts · typescript · Apache-2.0
ai

Utility module for formatting LangChain run attributes for OpenInference observability standards.

// Source: https://github.com/Arize-ai/openinference | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type { Run } from "@langchain/core/tracers/base";
import type { Attributes } from "@opentelemetry/api";
import { diag } from "@opentelemetry/api";
import { isAttributeValue } from "@opentelemetry/core";

import { withSafety } from "@arizeai/openinference-core";
import {
  MimeType,
  OpenInferenceSpanKind,
  RetrievalAttributePostfixes,
  SemanticAttributePrefixes,
  SemanticConventions,
} from "@arizeai/openinference-semantic-conventions";

import type {
  LLMMessage,
  LLMMessageFunctionCall,
  LLMMessagesAttributes,
  LLMMessageToolCalls,
  LLMParameterAttributes,
  Promp

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key