Documentation
¶
Overview ¶
Package usage adds the headers LangSmith uses to count CLI usage: the CLI version, the command name as typed (never its arguments), and the coding agent running the CLI, if any.
Index ¶
Constants ¶
View Source
const ( CommandHeader = "X-LangSmith-CLI-Command" AgentHeader = "X-LangSmith-CLI-Agent" )
Variables ¶
This section is empty.
Functions ¶
func Option ¶
func Option() option.RequestOption
Option applies the usage headers to every request an SDK client sends.
func SetCommand ¶
SetCommand records the running command and detects the calling agent.
func SetVersion ¶
func SetVersion(version string)
SetVersion sets the CLI version reported in the User-Agent.
func WrapDefaultTransport ¶
func WrapDefaultTransport() (restore func())
WrapDefaultTransport tags requests sent through http.DefaultTransport, which the SDK uses by default, until restore is called. The SDK keeps a wrapped transport as-is, so the clone carries the SDK's response header timeout.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.