Implement Phase 9 structured LLM adapter spike
This commit is contained in:
@@ -13,9 +13,15 @@ import (
|
||||
|
||||
type fakeLLMClient struct{}
|
||||
|
||||
func (f *fakeLLMClient) CompleteStructured(ctx context.Context, req StructuredCompletionRequest) (StructuredCompletionResponse, error) {
|
||||
func (f *fakeLLMClient) CompleteStructured(ctx context.Context, req StructuredCompletionRequest, out any) (StructuredCompletionResponse, error) {
|
||||
_ = ctx
|
||||
_ = req
|
||||
if out != nil {
|
||||
switch target := out.(type) {
|
||||
case *map[string]any:
|
||||
*target = map[string]any{"ok": true}
|
||||
}
|
||||
}
|
||||
return StructuredCompletionResponse{Content: json.RawMessage(`{"ok":true}`)}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user