workspace
No long description provided.
Installation
dagger install github.com/vito/daggerverse/botsbuildingbots/workspace@ac90240ed0651b92328d78dea13ae96d8791e1c3
Entrypoint
Return Type
Workspace !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
attempts | Integer ! | 2 | No description provided |
systemPrompt | String ! | "" | No description provided |
Example
func (m *myModule) example(attempts int, systemPrompt string) *Workspace {
return dag.
Workspace(attempts, systemPrompt)
}
Types
Workspace π
systemPrompt() π
The current system prompt.
Return Type
String !
Example
func (m *myModule) example(ctx context.Context, attempts int, systemPrompt string) string {
return dag.
Workspace(attempts, systemPrompt).
SystemPrompt(ctx)
}
findings() π
Observations made throughout running evaluations.
Return Type
[String ! ] !
Example
func (m *myModule) example(ctx context.Context, attempts int, systemPrompt string) []string {
return dag.
Workspace(attempts, systemPrompt).
Findings(ctx)
}
withSystemPrompt() π
Set the system prompt for future evaluations.
Return Type
Workspace !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
prompt | String ! | - | No description provided |
Example
func (m *myModule) example(attempts int, systemPrompt string, prompt string) *Workspace {
return dag.
Workspace(attempts, systemPrompt).
WithSystemPrompt(prompt)
}
backoff() π
Backoff sleeps for the given duration in seconds.
Use this if youβre getting rate limited and have nothing better to do.
Return Type
Workspace !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
seconds | Integer ! | - | No description provided |
Example
func (m *myModule) example(attempts int, systemPrompt string, seconds int) *Workspace {
return dag.
Workspace(attempts, systemPrompt).
Backoff(seconds)
}
evalNames() π
The list of possible evals you can run.
Return Type
[String ! ] !
Example
func (m *myModule) example(ctx context.Context, attempts int, systemPrompt string) []string {
return dag.
Workspace(attempts, systemPrompt).
EvalNames(ctx)
}
knownModels() π
The list of models that you can run evaluations against.
Return Type
[String ! ] !
Example
func (m *myModule) example(ctx context.Context, attempts int, systemPrompt string) []string {
return dag.
Workspace(attempts, systemPrompt).
KnownModels(ctx)
}
recordFinding() π
Record an interesting finding after performing evaluations.
Return Type
Workspace !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
finding | String ! | - | No description provided |
Example
func (m *myModule) example(attempts int, systemPrompt string, finding string) *Workspace {
return dag.
Workspace(attempts, systemPrompt).
RecordFinding(finding)
}
evaluate() π
Run an evaluation and return its report.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
eval | String ! | - | The evaluation to run. |
model | String ! | "" | The model to evaluate. |
Example
func (m *myModule) example(ctx context.Context, attempts int, systemPrompt string, eval string, model string) string {
return dag.
Workspace(attempts, systemPrompt).
Evaluate(ctx, eval, model)
}