Update public preparation and execution fixtures
This commit is contained in:
@@ -247,11 +247,12 @@ func newBackendCapacityEngine(
|
||||
promptID, content = "input-prompt", `{{input "input"}}`
|
||||
inputs = []any{map[string]any{"name": "input", "required": true}}
|
||||
}
|
||||
backend := map[string]any{"endpoint": "http://backend.example/v1", "concurrency_limit": limit}
|
||||
backend := map[string]any{"id": "limited", "endpoint": "http://backend.example/v1", "concurrency_limit": limit}
|
||||
if queueCapacity != nil {
|
||||
backend["queue_capacity"] = *queueCapacity
|
||||
}
|
||||
definition := map[string]any{
|
||||
"id": promptID,
|
||||
"default_profile": "profile",
|
||||
"messages": []any{map[string]any{"role": "user", "content": content}},
|
||||
"output": map[string]any{"format": "text", "validation_mode": "none"},
|
||||
@@ -265,9 +266,9 @@ func newBackendCapacityEngine(
|
||||
}
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Main: &configkit.Input{
|
||||
Source: configkit.Mapping("capacity fixture", map[string]any{
|
||||
"backends": map[string]any{"limited": backend},
|
||||
"profiles": map[string]any{"profile": map[string]any{"backend": "limited", "model": "model"}},
|
||||
"prompts": map[string]any{promptID: promptDefinitionWithVersion("1", definition)},
|
||||
"backends": []any{backend},
|
||||
"profiles": []any{map[string]any{"id": "profile", "backend": "limited", "model": "model"}},
|
||||
"prompts": []any{definition},
|
||||
}),
|
||||
}}}, options...)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user