saloon icon indicating copy to clipboard operation
saloon copied to clipboard

Debugging middleware results in empty body

Open ddebowczyk opened this issue 1 year ago • 1 comments

Turning on debug mode on when interacting with OpenAI API (and other LLM provider APIs) results in empty body for any subsequent code - body is read by Saloon Debugger class, but then cannot be accessed anymore.

I think the reason is that the response body is unseekable and is not (and / or can not) be rewinded.

Is there any standard way of handling debugging in case of unseekable response streams?

ddebowczyk avatar Aug 12 '24 06:08 ddebowczyk

Might be related: https://github.com/guzzle/guzzle/issues/1582

ddebowczyk avatar Aug 12 '24 06:08 ddebowczyk