Documentation
¶
Index ¶
- Constants
- func BuildRunQueryParams(f *FilterFlags, isRoot bool, defaultLimit int) langsmith.RunQueryParams
- func ExitError(msg string)
- func ExitErrorf(format string, args ...any)
- func GetAPIKey() string
- func GetAPIURL() string
- func GetFormat() string
- func GetOAuthAccessToken() string
- func GetWorkspaceID() string
- func MustGetClient() *client.Client
- func NewRootCmd(rawVersion, displayVersion string) *cobra.Command
- func ResolveProject(flagValue string) string
- type FilterFlags
- type FlaggedTrace
Constants ¶
const UserFlaggedIssueKey = "langsmith_user_flagged_issue"
UserFlaggedIssueKey is the feedback key used to mark a trace as flagged for issues-agent review.
Variables ¶
This section is empty.
Functions ¶
func BuildRunQueryParams ¶
func BuildRunQueryParams(f *FilterFlags, isRoot bool, defaultLimit int) langsmith.RunQueryParams
BuildRunQueryParams builds RunQueryParams from FilterFlags.
func ExitError ¶ added in v0.2.15
func ExitError(msg string)
ExitError prints an error to stderr and exits.
func ExitErrorf ¶ added in v0.2.15
ExitErrorf prints a formatted error to stderr and exits.
func GetAPIKey ¶ added in v0.2.15
func GetAPIKey() string
GetAPIKey resolves the API key from flag → env → profile.
func GetAPIURL ¶ added in v0.2.15
func GetAPIURL() string
GetAPIURL resolves the API URL from flag → env → profile → default.
func GetOAuthAccessToken ¶ added in v0.2.26
func GetOAuthAccessToken() string
GetOAuthAccessToken resolves the access token from the active OAuth profile.
func GetWorkspaceID ¶ added in v0.2.26
func GetWorkspaceID() string
GetWorkspaceID resolves the workspace ID from env → profile.
func MustGetClient ¶ added in v0.2.15
MustGetClient creates a LangSmith client or exits with an error.
func NewRootCmd ¶
NewRootCmd creates the top-level `langsmith` command.
func ResolveProject ¶
ResolveProject resolves the project name from flag → env.
Types ¶
type FilterFlags ¶
type FilterFlags struct {
TraceIDs string
Limit int
Project string
LastNMinutes int
Since string
Before string
Cursor string
ErrorFlag bool
NoErrorFlag bool
Name string
RunType string
MinLatency float64
MaxLatency float64
MinTokens int
Tags string
Metadata string
RawFilter string
}
FilterFlags holds common filter flag values.
type FlaggedTrace ¶ added in v0.2.17
FlaggedTrace is a single user-flagged trace with its optional review comment.
func FetchFlaggedTraces ¶ added in v0.2.17
func FetchFlaggedTraces(ctx context.Context, c *client.Client, sessionID string, lastNMinutes int) []FlaggedTrace
FetchFlaggedTraces paginates /api/v1/feedback for the user-flagged issue feedback key on the given session and returns the set of flagged traces. Failures are logged to stderr and surfaced as partial results — callers get whatever was successfully fetched before the error.
If lastNMinutes > 0, only flagged traces created within the window are returned. Otherwise all flagged traces for the session are returned.
Source Files
¶
- auth.go
- dataset.go
- evaluator.go
- example.go
- experiment.go
- filters.go
- flagged.go
- helpers.go
- hub.go
- hub_delete.go
- hub_directory_sdk.go
- hub_get.go
- hub_init.go
- hub_list.go
- hub_parse.go
- hub_pull.go
- hub_push.go
- hub_repo_sdk.go
- insights.go
- issues.go
- login.go
- message.go
- profile.go
- project.go
- prompt.go
- root.go
- run.go
- sandbox.go
- sandbox_box.go
- sandbox_console.go
- sandbox_snapshot.go
- sandbox_ssh.go
- sandbox_tunnel.go
- skill.go
- thread.go
- trace.go
- trace_stats.go
- update.go
- workspace.go