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
⌘I

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithresourcescommitsCommitsResource
Class●Since v0.15

CommitsResource

Copy
CommitsResource(
    self,
    client: Langsmith,
)

Bases

SyncAPIResource

Methods

View source on GitHub
method
with_raw_response
method
with_streaming_response
method
create
method
retrieve
method
list

This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.

For more information, see https://www.github.com/langchain-ai/langsmith-python#accessing-raw-response-data-eg-headers

An alternative to .with_raw_response that doesn't eagerly read the response body.

For more information, see https://www.github.com/langchain-ai/langsmith-python#with_streaming_response

Creates a new commit in a repository.

Requires authentication and write access to the repository.

Retrieves a specific commit by hash, tag, or "latest" for a repository.

This endpoint supports both authenticated and unauthenticated access. Authenticated users can access private repos, while unauthenticated users can only access public repos. Commit resolution logic:

  • "latest" or empty: Get the most recent commit
  • Less than 8 characters: Only check for tags
  • 8 or more characters: Prioritize commit hash over tag, check both

List commits for a repository, newest first, with pagination support.

This endpoint supports both authenticated and unauthenticated access. Authenticated users can access private repositories; unauthenticated users can only access public repositories. The include_stats parameter controls whether download and view statistics are computed (defaults to true).