Documentation
¶
Index ¶
Constants ¶
View Source
const (
BASE_URL = "https://api.smith.langchain.com/api/v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
APIKey string // API key for LangSmith
// contains filtered or unexported fields
}
func NewClient ¶
NewClient creates a new LangSmith client The client requires an API key to authenticate requests. You can get an API key by signing up for a LangSmith account at https://smith.langchain.com The API key can be passed as an argument to the function or set as an environment variable LANGSMITH_API_KEY
func (*Client) PostRun ¶
func (c *Client) PostRun(input *RunPayload) error
func (*Client) Run ¶
func (c *Client) Run(input *RunPayload) error
func (*Client) RunSingle ¶
func (c *Client) RunSingle(input *RunPayload) error
type PatchPayload ¶
type PostPayload ¶
type PostPayload struct {
ID string `json:"id"`
Name string `json:"name"`
RunType RunType `json:"run_type"`
StartTime time.Time `json:"start_time"`
Inputs map[string]interface{} `json:"inputs"`
SessionName string `json:"session_name"`
Tags []string `json:"tags,omitempty"`
ParentId string `json:"parent_run_id,omitempty"`
Extras map[string]interface{} `json:"extra,omitempty"`
Events []Event `json:"events,omitempty"`
}
type RunPayload ¶
type RunPayload struct {
RunID string `json:"id"`
Name string `json:"name"`
RunType RunType `json:"run_type"`
StartTime time.Time `json:"start_time"`
Inputs map[string]interface{} `json:"inputs"`
ParentID string `json:"parent_run_id"`
SessionName string `json:"session_name"`
Tags []string `json:"tags"`
Outputs map[string]interface{} `json:"outputs"`
EndTime time.Time `json:"end_time"`
Extras map[string]interface{} `json:"extra"`
Events []Event `json:"events"`
}
type RunType ¶
type RunType int
func (RunType) MarshalJSON ¶
MarshalJSON customizes the JSON output for RunType
type SimplePayload ¶
type SimplePayload struct {
ID string `json:"id"`
Name string `json:"name"`
RunType RunType `json:"run_type"`
StartTime time.Time `json:"start_time"`
Inputs map[string]interface{} `json:"inputs"`
SessionName string `json:"session_name"`
Tags []string `json:"tags,omitempty"`
ParentId string `json:"parent_run_id,omitempty"`
Extras map[string]interface{} `json:"extra,omitempty"`
Events []Event `json:"events,omitempty"`
Outputs map[string]interface{} `json:"outputs"`
EndTime time.Time `json:"end_time"`
}
Click to show internal directories.
Click to hide internal directories.