feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -32,6 +32,7 @@ type ResponseGuardUsage struct {
|
||||
}
|
||||
|
||||
type ResponseGuardAttempt struct {
|
||||
Timing *UpstreamTiming `json:"-"`
|
||||
OnEvent func([]byte, bool) `json:"-"`
|
||||
OnClose func() `json:"-"`
|
||||
closeOnce sync.Once
|
||||
@@ -141,6 +142,9 @@ func (g *ResponseModelGuard) APIError() *types.NewAPIError {
|
||||
|
||||
// Only read the provider's declaration and numeric usage, never generated text.
|
||||
func (a *ResponseGuardAttempt) observe(payload []byte, stream bool) error {
|
||||
if stream {
|
||||
a.Timing.Mark("first_sse_data")
|
||||
}
|
||||
if a.OnEvent != nil {
|
||||
a.OnEvent(payload, stream)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user