LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmith_openapi_clientdefault
Class●Since v0.8

default

API Client for interfacing with the LangChain API.

Copy
class Langsmith

Constructors

constructor
constructor

Properties

property
annotationQueues: AnnotationQueues
property
apiKey: string | null
property
baseURL: string
property
commits: Commits
property
datasets: Datasets
property
evaluators: Evaluators
property
examples: Examples
property
feedback: Feedback
property
fetchOptions: MergedRequestInit | undefined
property
idempotencyHeader: string
property
info: Info
property
logger: Logger
property
logLevel: LogLevel | undefined
property
maxRetries: number
property
onlineEvaluators: OnlineEvaluators
property
public: Public
property
repos: Repos
property
runs: Runs
property
sandboxes: Sandboxes
property
sessions: Sessions
property
settings: Settings
property
tenantID: string | null
property
timeout: number
property
workspaces: Workspaces
property
APIConnectionError: typeof APIConnectionError
property
APIConnectionTimeoutError: typeof APIConnectionTimeoutError
property
APIError: typeof APIError
property
APIUserAbortError: typeof APIUserAbortError
property
AuthenticationError: typeof AuthenticationError
property
BadRequestError: typeof BadRequestError
property
ConflictError: typeof ConflictError
property
DEFAULT_TIMEOUT: number
property
InternalServerError: typeof InternalServerError
property
Langsmith: typeof Langsmith
property
LangsmithError: typeof LangsmithError
property
NotFoundError: typeof NotFoundError
property
PermissionDeniedError: typeof PermissionDeniedError
property
RateLimitError: typeof RateLimitError
property
toFile: (value: ToFileInput | PromiseLike<ToFileInput>, name?: string | null, options?: FilePropertyBag) => Promise<File>
property
UnprocessableEntityError: typeof UnprocessableEntityError

Methods

method
apiKeyAuth
method
authHeaders
method
buildRequest→ Promise<__type>
method
buildURL→ string
method
defaultIdempotencyKey
method
defaultQuery
method
delete→ APIPromise<Rsp>
method
fetchWithTimeout→ Promise<Response>
method
get→ APIPromise<Rsp>
method
getAPIList→ PagePromise<PageClass, Item>
method
makeStatusError
method
patch→ APIPromise<Rsp>
method
post→ APIPromise<Rsp>
method
prepareOptions
method
prepareRequest
method
put→ APIPromise<Rsp>
method
request→ APIPromise<Rsp>
method
requestAPIList→ PagePromise<PageClass, Item>
method
stringifyQuery
method
tenantIDAuth
method
validateHeaders
method
withOptions→ this

Create a new client instance re-using the same options given to the current client with optional overriding.

View source on GitHub