Document loader integration with LangSmith.

Load
import { LangSmithLoader } from '@langchain/core/document_loaders/langsmith';
import { Client } from 'langsmith';

const langSmithClient = new Client({
apiKey: process.env.LANGSMITH_API_KEY,
})

const loader = new LangSmithLoader({
datasetId: "9a3b36f7-b308-40a5-9b46-6613853b6330",
limit: 1,
});

const docs = await loader.load();
[
  {
    pageContent: '{\n  "input_key_str": "string",\n  "input_key_bool": true\n}',
    metadata: {
      id: '8523d9e9-c123-4b23-9b46-21021nds289e',
      created_at: '2024-08-19T17:09:14.806441+00:00',
      modified_at: '2024-08-19T17:09:14.806441+00:00',
      name: '#8517 @ brace-test-dataset',
      dataset_id: '9a3b36f7-b308-40a5-9b46-6613853b6330',
      source_run_id: null,
      metadata: [Object],
      inputs: [Object],
      outputs: [Object]
    }
  }
]

Hierarchy (view full)

Constructors

Properties

asOf?: string | Date
client: Client
contentKey: string[]
datasetId?: string
datasetName?: string
exampleIds?: string[]
filter?: string
formatContent: ((content: any) => string)
inlineS3Urls?: boolean
limit?: number
metadata?: KVMap
offset?: number
splits?: string[]

Methods