aldrin312 / AutoCommentingTool

BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Suggestion: Prompt Improvement #6

Closed Kannav02 closed 1 month ago

Kannav02 commented 1 month ago

your program would benefit greatly with the addition of a system prompt, as it might provide the AI agent with much more clarity on the tasks that you want to achieve, something similar to the prompt below

You are an AI assistant that adds clear and concise comments to JavaScript Functions

Also having a concise statement and providing clear instructions in the user call something similar to this

Add comments to the following snippet of code, explaining the function of the snippet and elaborating on complex logic 

Snippet 1 ( Reference Snippet )

export async function getGroqChatCompletion(data) {
    // Create a new chat completion request with the LLM model and the user message
  return groq.chat.completions.create({
    messages: [
      {
        role: "user",
        content: "Add comments to this function " + data,
      },
    ],
    model: "llama3-8b-8192",
  });
}
aldrin312 commented 1 month ago

I am aware of this. I need to figure out a prompt that will only output the commented files.

aldrin312 commented 1 month ago

Fixed prompt only output the source code now