Skip to content

Commit

Permalink
Example source run ID
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Mar 18, 2024
1 parent 2ddb313 commit 69670f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2786,6 +2786,8 @@ def create_examples(
inputs: Sequence[Mapping[str, Any]],
outputs: Optional[Sequence[Optional[Mapping[str, Any]]]] = None,
metadata: Optional[Sequence[Optional[Mapping[str, Any]]]] = None,
source_run_ids: Optional[Sequence[Optional[ID_TYPE]]] = None,
ids: Optional[Sequence[ID_TYPE]] = None,
dataset_id: Optional[ID_TYPE] = None,
dataset_name: Optional[str] = None,
**kwargs: Any,
Expand All @@ -2800,6 +2802,10 @@ def create_examples(
The output values for the examples.
metadata : Optional[Sequence[Optional[Mapping[str, Any]]]], default=None
The metadata for the examples.
source_run_ids : Optional[Sequence[Optional[ID_TYPE]]], default=None
The IDs of the source runs associated with the examples.
ids : Optional[Sequence[ID_TYPE]], default=None
The IDs of the examples.
dataset_id : Optional[ID_TYPE], default=None
The ID of the dataset to create the examples in.
dataset_name : Optional[str], default=None
Expand All @@ -2825,11 +2831,15 @@ def create_examples(
"outputs": out_,
"dataset_id": dataset_id,
"metadata": metadata_,
"id": id_,
"source_run_id": source_run_id_,
}
for in_, out_, metadata_ in zip(
for in_, out_, metadata_, id_, source_run_id_ in zip(
inputs,
outputs or [None] * len(inputs),
metadata or [None] * len(inputs),
ids or [None] * len(inputs),
source_run_ids or [None] * len(inputs),
)
]

Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langsmith"
version = "0.1.27"
version = "0.1.28"
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
authors = ["LangChain <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 69670f5

Please sign in to comment.