Update public configuration and inventory contracts
This commit is contained in:
@@ -268,12 +268,11 @@ func newNamespacedContractEngine(t *testing.T, client promptkit.LLMClient) *prom
|
||||
for _, namespace := range []string{"alpha", "beta"} {
|
||||
endpoint := "https://" + namespace + ".example/v1"
|
||||
input, err := promptkit.CollectionInput(namespace, configkit.Mapping(namespace+" resources", map[string]any{
|
||||
"backends": map[string]any{"backend": map[string]any{"endpoint": endpoint}},
|
||||
"profiles": map[string]any{"shared": map[string]any{
|
||||
"backends": []any{map[string]any{"id": "backend", "endpoint": endpoint}},
|
||||
"profiles": []any{map[string]any{"id": "shared",
|
||||
"backend": namespace + "/backend", "model": namespace + "-model",
|
||||
}},
|
||||
"prompts": map[string]any{"shared": map[string]any{
|
||||
"version": "1",
|
||||
"prompts": []any{map[string]any{"id": "shared",
|
||||
"default_profile": "root-only",
|
||||
"messages": []any{map[string]any{"role": "user", "content": "Hello"}},
|
||||
"output": map[string]any{"format": "text", "validation_mode": "none"},
|
||||
@@ -286,11 +285,10 @@ func newNamespacedContractEngine(t *testing.T, client promptkit.LLMClient) *prom
|
||||
inputs = append(inputs, input)
|
||||
}
|
||||
inputs = append(inputs, configkit.Input{Source: configkit.Mapping("root resources", map[string]any{
|
||||
"profiles": map[string]any{"root-only": map[string]any{
|
||||
"profiles": []any{map[string]any{"id": "root-only",
|
||||
"endpoint": "https://root.example/v1", "model": "root-model",
|
||||
}},
|
||||
"prompts": map[string]any{"root-only": map[string]any{
|
||||
"version": "1",
|
||||
"prompts": []any{map[string]any{"id": "root-only",
|
||||
"messages": []any{map[string]any{"role": "user", "content": "Root prompt"}},
|
||||
"output": map[string]any{"format": "text", "validation_mode": "none"},
|
||||
}},
|
||||
|
||||
Reference in New Issue
Block a user