Documentation
¶
Overview ¶
Package prompts provides read access to the prompts stored in Braintrust.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides methods for reading prompts.
type Prompt ¶
type Prompt struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
XactID string `json:"_xact_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description,omitempty"`
PromptData json.RawMessage `json:"prompt_data"`
Tags []string `json:"tags,omitempty"`
}
Prompt is a prompt row as Braintrust stores it.
PromptData is left as raw JSON so that this package stays pure transport: the prompt package decodes it into a renderable prompt. Keeping the dependency pointing that way means the prompt package can use this one.
type QueryParams ¶
type QueryParams struct {
// Project identity (either/or).
ProjectName string
ProjectID string
// Slug filters by prompt slug.
Slug string
// Version pins to a specific prompt version.
Version string
// Environment loads the prompt deployed to an environment (dev, staging,
// production). Ignored when Version is set.
Environment string
// Limit caps the number of results.
Limit int
}
QueryParams selects which prompts to return.