langsmith.client.Client.list_prompt_commits#
- Client.list_prompt_commits(prompt_identifier: str, *, limit: int | None = None, offset: int = 0, include_model: bool = False) Iterator[ListedPromptCommit][source]#
List commits for a given prompt.
- Parameters:
prompt_identifier (str) – The identifier of the prompt in the format ‘owner/repo_name’.
limit (Optional[int], optional) – The maximum number of commits to return. If None, returns all commits. Defaults to None.
offset (int, optional) – The number of commits to skip before starting to return results. Defaults to 0.
include_model (bool, optional) – Whether to include the model information in the commit data. Defaults to False.
- Returns:
An iterator of ListedPromptCommit objects representing the commits.
- Return type:
Iterator[ls_schemas.ListedPromptCommit]
- Yields:
ls_schemas.ListedPromptCommit – A ListedPromptCommit object for each commit.
Note
This method uses pagination to retrieve commits. It will make multiple API calls if necessary to retrieve all commits or up to the specified limit.