package promptkit import "fmt" // String returns a concise request summary without exposing the direct API key // or input and variable contents. Reflection-based formatting does not carry // this guarantee. func (r RunRequest) String() string { return r.redactedString() } // GoString returns a concise request summary without exposing the direct API // key or input and variable contents. Reflection-based formatting does not // carry this guarantee. func (r RunRequest) GoString() string { return r.redactedString() } func (r RunRequest) redactedString() string { return fmt.Sprintf( "promptkit.RunRequest{PromptID:%q PromptVersion:%q ProfileID:%q APIKeySet:%t Inputs:%d Vars:%d ExecutionSet:%t ValidationSet:%t}", r.PromptID, r.PromptVersion, r.ProfileID, r.APIKey != "", len(r.Inputs), len(r.Vars), r.Execution != nil, r.Validation != nil, ) } // String returns a concise request summary without exposing direct API keys or // rendered prompt content. Reflection-based formatting does not carry this // guarantee. func (r GenerateRequest) String() string { return r.redactedString() } // GoString returns a concise request summary without exposing direct API keys or // rendered prompt content. Reflection-based formatting does not carry this // guarantee. func (r GenerateRequest) GoString() string { return r.redactedString() } func (r GenerateRequest) redactedString() string { return fmt.Sprintf( "promptkit.GenerateRequest{Messages:%d Model:%q APIKeySet:%t StructuredOutputSet:%t ExtraParams:%d}", len(r.Prompt.Messages), r.Target.Model, r.APIKey != "", r.StructuredOutput != nil, len(r.Target.ExtraParams), ) }