nat.plugins.langchain.dataset_loader.langsmith#
Functions#
|
Fetch a dataset from LangSmith and return as a pandas DataFrame. |
Module Contents#
- load_langsmith_dataset(
- file_path,
- *,
- dataset_id: str | None = None,
- dataset_name: str | None = None,
- input_key: str = 'input',
- output_key: str = 'output',
- question_col: str = 'question',
- answer_col: str = 'answer',
- id_col: str = 'id',
- split: str | None = None,
- as_of: str | None = None,
- limit: int | None = None,
Fetch a dataset from LangSmith and return as a pandas DataFrame.
Prefers dataset_id over dataset_name when both are provided. The file_path argument is ignored — data comes from the LangSmith API, not the filesystem.
Loads dataset of format https://docs.langchain.com/langsmith/example-data-format