-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding debug support for request and response. #56
Comments
There isn't anything right now but I'm open to it. Do you have a specific use case in mind? |
Yes. For debugging Having something like this will help a lot. $response = Prism::text()
->using(Provider::Anthropic, 'claude-3-sonnet')
->withSystemPrompt(view('prompts.system'))
->withPrompt('Explain quantum computing to a 5-year-old.')
->generate()
->dumpRawResponse(); // will dump response in array format
$response = Prism::text()
->using(Provider::Anthropic, 'claude-3-sonnet')
->withSystemPrompt(view('prompts.system'))
->withPrompt('Explain quantum computing to a 5-year-old.')
->generate()
->ddRawResponse(); // will die& dump response in array format
$response = Prism::text()
->using(Provider::Anthropic, 'claude-3-sonnet')
->withSystemPrompt(view('prompts.system'))
->withPrompt('Explain quantum computing to a 5-year-old.')
->ddRawRequest(); //Will dump request payload and url in array format
What do you think ? (Similar to this ) |
I think this is totally doable. I'm working my way through a pretty major refactor in preparation for structured output / object support. I'll try and keep this in mind and we can circle back to it. Going to leave this issue open as a reference. |
Hi there. I'd like to also suggest callbacks, which would allow for logging of requests/responses. Or perhaps the middleware in the roadmap will allow for this? |
I think extension of this is to have a system architected in a such way where so we can integration with system like Langfuse or debuggeres where we can log the request and response asynchornously. https://api.reference.langfuse.com/#get-/api/public/comments |
Is there a way to get Raw Json response from the ProviderResponse ?
Also It will be great to see what Request is being sent from the prism to different provider ?
The text was updated successfully, but these errors were encountered: