Skip to content

Backend: Create a new /explain endpoint to generate code explanations #19

@dineshsutihar

Description

@dineshsutihar

Is your feature request related to a problem?

The extension is great at translating code, but users (especially learners) might also want to understand what the code does.

Describe the solution you'd like

Create a new API endpoint, for example, /explain. This endpoint will receive a code snippet. The worker will then call the Gemini API with a different, specialized prompt, asking it to provide a concise, natural-language explanation of the code's function, its inputs, and its outputs.

Additional context

This requires significant prompt engineering to get a consistently good explanation from the AI. The frontend would also need to be updated later to add an "Explain" button to the UI, but the first step is creating this backend capability.

Metadata

Metadata

Assignees

Labels

AIfeature/issues related to Artificial IntelligencebackendFeature/issues related to backend workflowfeatureNew feature requestoptionalissue/feature is not important for now but later can be used

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions