Skip to content

Rendered prompt does not show equivalent JSON payload when calling OpenAI API directly #6817

Closed Answered by dmytrostruk
vicperdana asked this question in Q&A
Discussion options

You must be logged in to vote

@vicperdana

Is the rendered prompt being 'translated' to the acceptable JSON payload before passing to OpenAI?

That's correct.

If, so how do we view the raw request made to OpenAI?

You can define DelegatingHandler, which you can inject in HttpClient and pass that HttpClient when you register Azure/OpenAI chat completion service.

Examples of logging handler:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sophialagerkranspandey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants