Explain Code with OpenAI

Explain a code snippet with OpenAI

by @pixies

How to Use

Provide a code snippet, and OpenAI will generate an explanation.

Example from OpenAI examples


Inputs

Name Required Type Description
code unknown The code snippet to explain
language string Optional: provide the programming language to improve explanation quality
maxTokens integer The maximum length of the explanation measured in tokens. 64 tokens is approximately 2-4 sentences. The length of the code snippet plus this value cannot exceed 4000 tokens (approximately 3,000 words). Read more about tokens here: https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them
openaiapi @pixies/openai/openaiapi integration

Outputs

Name Required Type Description
explanation string The generated explanation

Related Tags