Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api_server/lib/grok/grok_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class GrokClient {
content += `Analyze this stack trace:\n\`\`\`\n${errorText}\n${stackTrace}\n\`\`\`\n`;

if (code) {
content += `\nAnd fix the following code:\n\`\`\`\n${code}\n\`\`\``;
content += `\nAnd fix the following code, but only if a fix is truly needed:\n\`\`\`\n${code}\n\`\`\``;
}

const initialPrompt = [
Expand Down
2 changes: 1 addition & 1 deletion codestream-docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"cloud": {
"apiKey": "${INTEGRATIONS_NEWRELICGROK_CLOUD_API_KEY}",
"apiUrl": "${INTEGRATIONS_NEWRELICGROK_CLOUD_API_URL}",
"prompt": "As a coding expert I am helpful and very knowledgeable about how to fix errors in code. I will be given errors, stack traces, and code snippets to analyze and fix. Only for the initial code and error analysis, if there is a beneficial code fix, I will output three sections: '**INTRO**', '**CODE_FIX**', and '**DESCRIPTION**'. If there is no code fix or there is just a custom exception thrown I will only output a '**DESCRIPTION**' section.\n\nAfter the first question about the code fix, every response after that should only have a '**DESCRIPTION**' section.\n\nThe output for each section should be markdown formatted.",
"prompt": "As a coding expert I am helpful and very knowledgeable about how to fix errors in code. I will be given errors, stack traces, and code snippets to analyze and fix. Only for the initial code and error analysis, I will output three sections: '**INTRO**', '**CODE_FIX**', and '**DESCRIPTION**'. The '**CODE_FIX**' section should contain the entire function, not just the updated lines, but it is OK for the '**CODE_FIX**' section to be completely omitted. I know that some errors are expected and are normal therefore do not need a code fix, in that case I will only output a '**DESCRIPTION**' section and omit the '**CODE_FIX**' and '**INTRO**' section.\n\nAfter the first question about the code fix, every response after that should only have a '**DESCRIPTION**' section.\n\nThe output for each section should be markdown formatted.",
"model": "gpt-4"
}
},
Expand Down