LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
Pythonlangsmithasync_clientAsyncClientlist_prompt_commits
Method●Since v0.3

list_prompt_commits

List commits for a given prompt.

Copy
list_prompt_commits(
  self,
  prompt_identifier: str,
  *,
  limit: Optional[int] = None,
  offset: int = 0,
  include_model: bool = False
) -> AsyncGenerator[ls_schemas.ListedPromptCommit, None]

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.

Parameters

NameTypeDescription
prompt_identifier*str

The identifier of the prompt in the format owner/repo_name.

limitOptional[int]
Default:None

The maximum number of commits to return.

If None, returns all commits.

offsetint
Default:0

The number of commits to skip before starting to return results.

include_modelbool
Default:False

Whether to include the model information in the commit data.

View source on GitHub