Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr-agent /improve ERROR", "no": 40, Failed to parse AI prediction #461

Closed
flavienmerlin opened this issue Nov 19, 2023 · 9 comments
Closed
Labels
bug 🐛 Something is working

Comments

@flavienmerlin
Copy link

Hello I am running the PR agent on kubernetes with githubapp,
The /improve or /improve --extended, will not work on first try it will take at least 3 time writing it in the comment in order to work properly, I am getting the following error :

{"text": "AI response\n", "record": {"elapsed": {"repr": "0:17:03.142755", "seconds": 1023.142755}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "account", "server_type": "github_app", "api_url": "https://api.github.com/repos/account/codiumai-pragent-poc/pulls/5", "response": "- relevant file: src/app.py\n  suggestion content: The print statement is outside any function and will be executed when the module is imported. If you want to print the joke when the application starts, you should put the print statement inside the if __name__ == '__main__': block.\n  existing code: |\n    print(joke)\n    if __name__ == '__main__':\n        app.run(\"0.0.0.0\",debug=True)\n  relevant lines start: 24\n  relevant lines end: 26\n  improved code: |\n    if __name__ == '__main__':\n        print(joke)\n        app.run(\"0.0.0.0\",debug=True)", "messages": [{"role": "system", "content": "You are a language model called PR-Code-Reviewer, that specializes in suggesting code improvements for Pull Request (PR).\nYour task is to provide meaningful and actionable code suggestions, to improve the new code presented in a PR (the '+' lines in the diff).\n\nExample for a PR Diff input:\n'\n## src/file1.py\n\n@@ -12,3 +12,5 @@ def func1():\n__new hunk__\n12  code line that already existed in the file...\n13  code line that already existed in the file....\n14 +new code line1 added in the PR\n15 +new code line2 added in the PR\n16  code line that already existed in the file...\n__old hunk__\n code line that already existed in the file...\n-code line that was removed in the PR\n code line that already existed in the file...\n\n\n@@ ... @@ def func2():\n__new hunk__\n...\n__old hunk__\n...\n\n\n## src/file2.py\n...\n'\n\nSpecific instructions:\n- Provide up to 4 code suggestions. Try to provide diverse and insightful suggestions.\n- Prioritize suggestions that address major problems, issues and bugs in the code.\n  As a second priority, suggestions should focus on best practices, code readability, maintainability, enhancments, performance, and other aspects.\n- Don't suggest to add docstring, type hints, or comments.\n- Suggestions should refer only to code from the '__new hunk__' sections, and focus on new lines of code (lines starting with '+').\n- Avoid making suggestions that have already been implemented in the PR code. For example, if you want to add logs, or change a variable to const, or anything else, make sure it isn't already in the '__new hunk__' code.\n- For each suggestion, make sure to take into consideration also the context, meaning the lines before and after the relevant code.\n- Provide the exact line numbers range (inclusive) for each issue.\n- Assume there is additional relevant code, that is not included in the diff.\n\nYou must use the following YAML schema to format your answer:\n```yaml\nCode suggestions:\n  type: array\n  minItems: 1\n  maxItems: 4\n  uniqueItems: true\n  items:\n    relevant file:\n      type: string\n      description: the relevant file full path\n    suggestion content:\n      type: string\n      description: |-\n        a concrete suggestion for meaningfully improving the new PR code.\n    existing code:\n      type: string\n      description: |-\n        a code snippet showing the relevant code lines from a '__new hunk__' section.\n        It must be contiguous, correctly formatted and indented, and without line numbers.\n    relevant lines start:\n      type: integer\n      description: |-\n        The relevant line number from a '__new hunk__' section where the suggestion starts (inclusive).\n        Should be derived from the hunk line numbers, and correspond to the 'existing code' snippet above.\n    relevant lines end:\n      type: integer\n      description: |-\n        The relevant line number from a '__new hunk__' section where the suggestion ends (inclusive).\n        Should be derived from the hunk line numbers, and correspond to the 'existing code' snippet above.\n    improved code:\n      type: string\n      description: |-\n        a new code snippet that can be used to replace the relevant lines in '__new hunk__' code.\n        Replacement suggestions should be complete, correctly formatted and indented, and without line numbers.\n```\n\nExample output:\n```yaml\nCode suggestions:\n  - relevant file: |-\n        src/file1.py\n    suggestion content: |-\n        Add a docstring to func1()\n    existing code: |-\n        def func1():\n    relevant lines start: 12\n    relevant lines end: 12\n    improved code: |-\n        ...\n```\n\n\nEach YAML output MUST be after a newline, indented, with block scalar indicator ('|-').\nDon't repeat the prompt in the answer, and avoid outputting the 'type' and 'description' fields."}, {"role": "user", "content": "PR Info:\n\nTitle: 'adding print for debug'\n\nBranch: 'feature/print-joke'\n\nDescription: 'None'\n\n\nThe PR Diff:\n```## src/app.py\n\n@@ -15,13 +15,12 @@ def hello_world_and_joke():\n\n__new hunk__\n15      \n16      # Return \"Hello, World!\" and the  joke\n17      return render_template('index.html', joke=joke)\n18  \n19  \n20  # Health check\n21  @app.route('/health')\n22  def health():\n23      return 'Im Healthy :)', 200\n24 +print(joke)\n25  if __name__ == '__main__':\n26      app.run(\"0.0.0.0\",debug=True)\n\n__old hunk__\n     \n     # Return \"Hello, World!\" and the  joke\n     return render_template('index.html', joke=joke)\n-print(joke)\n \n \n # Health check\n @app.route('/health')\n def health():\n     return 'Im Healthy :)', 200\n-\n if __name__ == '__main__':\n     app.run(\"0.0.0.0\",debug=True)\n```\n\nResponse (should be a valid YAML, and nothing else):\n```yaml"}], "finish_reason": "stop", "model": "gpt-4", "usage": {"prompt_tokens": 1106, "completion_tokens": 144, "total_tokens": 1250}}, "file": {"name": "ai_handler.py", "path": "/app/pr_agent/algo/ai_handler.py"}, "function": "chat_completion", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 124, "message": "AI response", "module": "ai_handler", "name": "pr_agent.algo.ai_handler", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 140159441308544, "name": "MainThread"}, "time": {"repr": "2023-11-19 10:12:44.450900+00:00", "timestamp": 1700388764.4509}}}
{"text": "Failed to parse AI prediction: mapping values are not allowed here\n  in \"<unicode string>\", line 2, column 247:\n     ... de the if __name__ == '__main__': block.\n                                         ^\n", "record": {"elapsed": {"repr": "0:17:03.143513", "seconds": 1023.143513}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "account", "server_type": "github_app", "api_url": "https://api.github.com/repos/account/codiumai-pragent-poc/pulls/5"}, "file": {"name": "utils.py", "path": "/app/pr_agent/algo/utils.py"}, "function": "load_yaml", "level": {"icon": "❌", "name": "ERROR", "no": 40}, "line": 294, "message": "Failed to parse AI prediction: mapping values are not allowed here\n  in \"<unicode string>\", line 2, column 247:\n     ... de the if __name__ == '__main__': block.\n

Thanks

@mrT23
Copy link
Collaborator

mrT23 commented Nov 19, 2023

Hi @flavienmerlin
There is no 100% success when working with LLMs.
Sometimes, they won't follow precisely the prompt format given them, and parsing the output will fail.

In case that happens, we have a fallback mechanism, where we try to parse their output manually.
your case is similar to:
#373 (comment)

in this PR i added also your case to the list of fallback cases:
https://github.com/Codium-ai/pr-agent/pull/462/files#diff-fb8a7882f94de24824cadff85752e0e24b5024886e1263bf6df225eda90a3a86

try again your PR, and let me know if it helped.

@mrT23 mrT23 changed the title Pr-egent /improve ERROR", "no": 40 Pr-egent /improve ERROR", "no": 40, Failed to parse AI prediction Nov 19, 2023
@mrT23
Copy link
Collaborator

mrT23 commented Nov 19, 2023

/similar_issue

Copy link
Contributor

@mrT23 mrT23 added the bug 🐛 Something is working label Nov 19, 2023
@flavienmerlin
Copy link
Author

Hi @mrT23, Thanks for the answer,
I tried with the new pushed code, it seems to be better now I get that error only on the first try, the second time /improve will give me an answer.

{"text": "Failed to parse AI prediction: mapping values are not allowed here\n  in \"<unicode string>\", line 2, column 214:\n     ... de the if __name__ == '__main__': block.\n                                         ^\n", "record": {"elapsed": {"repr": "0:10:31.549246", "seconds": 631.549246}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "account", "server_type": "github_app", "api_url": "https://api.github.com/repos/account/codiumai-pragent-poc/pulls/23"}, "file": {"name": "utils.py", "path": "/app/pr_agent/algo/utils.py"}, "function": "load_yaml", "level": {"icon": "❌", "name": "ERROR", "no": 40}, "line": 294, "message": "Failed to parse AI prediction: mapping values are not allowed here\n  in \"<unicode string>\", line 2, column 214:\n     ... de the if __name__ == '__main__': block.\n                                         ^", "module": "utils", "name": "pr_agent.algo.utils", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:26.394212+00:00", "timestamp": 1700464766.394212}}}

@mrT23
Copy link
Collaborator

mrT23 commented Nov 20, 2023

@flavienmerlin
The error message doesn't necessarily indicate the output is wrong. it means we are trying the fallback mode
can you share the full log ?

@flavienmerlin
Copy link
Author

@mrT23 you can find the log below :

{"text": "Handling comment because of event=issue_comment and action=created\n", "record": {"elapsed": {"repr": "0:10:15.096323", "seconds": 615.096323}, "exception": null, "extra": {}, "file": {"name": "github_app.py", "path": "/app/pr_agent/servers/github_app.py"}, "function": "handle_request", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 107, "message": "Handling comment because of event=issue_comment and action=created", "module": "github_app", "name": "__main__", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:09.941289+00:00", "timestamp": 1700464749.941289}}}
{"text": "Generating code suggestions for PR...\n", "record": {"elapsed": {"repr": "0:10:18.205695", "seconds": 618.205695}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "pr_code_suggestions.py", "path": "/app/pr_agent/tools/pr_code_suggestions.py"}, "function": "run", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 56, "message": "Generating code suggestions for PR...", "module": "pr_code_suggestions", "name": "pr_agent.tools.pr_code_suggestions", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:13.050661+00:00", "timestamp": 1700464753.050661}}}
{"text": "Preparing PR review...\n", "record": {"elapsed": {"repr": "0:10:18.206185", "seconds": 618.206185}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "pr_code_suggestions.py", "path": "/app/pr_agent/tools/pr_code_suggestions.py"}, "function": "run", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 60, "message": "Preparing PR review...", "module": "pr_code_suggestions", "name": "pr_agent.tools.pr_code_suggestions", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:13.051151+00:00", "timestamp": 1700464753.051151}}}
{"text": "Getting PR diff...\n", "record": {"elapsed": {"repr": "0:10:18.208705", "seconds": 618.208705}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "pr_code_suggestions.py", "path": "/app/pr_agent/tools/pr_code_suggestions.py"}, "function": "_prepare_prediction_extended", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 171, "message": "Getting PR diff...", "module": "pr_code_suggestions", "name": "pr_agent.tools.pr_code_suggestions", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:13.053671+00:00", "timestamp": 1700464753.053671}}}
{"text": "Getting multi AI predictions...\n", "record": {"elapsed": {"repr": "0:10:18.511933", "seconds": 618.511933}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "pr_code_suggestions.py", "path": "/app/pr_agent/tools/pr_code_suggestions.py"}, "function": "_prepare_prediction_extended", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 175, "message": "Getting multi AI predictions...", "module": "pr_code_suggestions", "name": "pr_agent.tools.pr_code_suggestions", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:13.356899+00:00", "timestamp": 1700464753.356899}}}
{"text": "Processing chunk 1 of 1\n", "record": {"elapsed": {"repr": "0:10:18.512088", "seconds": 618.512088}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "pr_code_suggestions.py", "path": "/app/pr_agent/tools/pr_code_suggestions.py"}, "function": "_prepare_prediction_extended", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 178, "message": "Processing chunk 1 of 1", "module": "pr_code_suggestions", "name": "pr_agent.tools.pr_code_suggestions", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:13.357054+00:00", "timestamp": 1700464753.357054}}}
{"text": "AI response\n", "record": {"elapsed": {"repr": "0:10:31.548334", "seconds": 631.548334}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23", "response": "- relevant file: src/app.py\n  suggestion content: The print statement is outside any function and will be executed on import. If you want to print the joke when the script is run, move the print statement inside the if __name__ == '__main__': block.\n  existing code: |\n    print(joke)\n    if __name__ == '__main__':\n        app.run(\"0.0.0.0\",debug=True)\n  relevant lines start: 24\n  relevant lines end: 26\n  improved code: |\n    if __name__ == '__main__':\n        print(joke)\n        app.run(\"0.0.0.0\",debug=True)", "messages": [{"role": "system", "content": "You are a language model called PR-Code-Reviewer, that specializes in suggesting code improvements for Pull Request (PR).\nYour task is to provide meaningful and actionable code suggestions, to improve the new code presented in a PR (the '+' lines in the diff).\n\nExample for a PR Diff input:\n'\n## src/file1.py\n\n@@ -12,3 +12,5 @@ def func1():\n__new hunk__\n12  code line that already existed in the file...\n13  code line that already existed in the file....\n14 +new code line1 added in the PR\n15 +new code line2 added in the PR\n16  code line that already existed in the file...\n__old hunk__\n code line that already existed in the file...\n-code line that was removed in the PR\n code line that already existed in the file...\n\n\n@@ ... @@ def func2():\n__new hunk__\n...\n__old hunk__\n...\n\n\n## src/file2.py\n...\n'\n\nSpecific instructions:\n- Provide up to 8 code suggestions. Try to provide diverse and insightful suggestions.\n- Prioritize suggestions that address major problems, issues and bugs in the code.\n  As a second priority, suggestions should focus on best practices, code readability, maintainability, enhancments, performance, and other aspects.\n- Don't suggest to add docstring, type hints, or comments.\n- Suggestions should refer only to code from the '__new hunk__' sections, and focus on new lines of code (lines starting with '+').\n- Avoid making suggestions that have already been implemented in the PR code. For example, if you want to add logs, or change a variable to const, or anything else, make sure it isn't already in the '__new hunk__' code.\n- For each suggestion, make sure to take into consideration also the context, meaning the lines before and after the relevant code.\n- Provide the exact line numbers range (inclusive) for each issue.\n- Assume there is additional relevant code, that is not included in the diff.\n\nYou must use the following YAML schema to format your answer:\n```yaml\nCode suggestions:\n  type: array\n  minItems: 1\n  maxItems: 8\n  uniqueItems: true\n  items:\n    relevant file:\n      type: string\n      description: the relevant file full path\n    suggestion content:\n      type: string\n      description: |-\n        a concrete suggestion for meaningfully improving the new PR code.\n    existing code:\n      type: string\n      description: |-\n        a code snippet showing the relevant code lines from a '__new hunk__' section.\n        It must be contiguous, correctly formatted and indented, and without line numbers.\n    relevant lines start:\n      type: integer\n      description: |-\n        The relevant line number from a '__new hunk__' section where the suggestion starts (inclusive).\n        Should be derived from the hunk line numbers, and correspond to the 'existing code' snippet above.\n    relevant lines end:\n      type: integer\n      description: |-\n        The relevant line number from a '__new hunk__' section where the suggestion ends (inclusive).\n        Should be derived from the hunk line numbers, and correspond to the 'existing code' snippet above.\n    improved code:\n      type: string\n      description: |-\n        a new code snippet that can be used to replace the relevant lines in '__new hunk__' code.\n        Replacement suggestions should be complete, correctly formatted and indented, and without line numbers.\n```\n\nExample output:\n```yaml\nCode suggestions:\n  - relevant file: |-\n        src/file1.py\n    suggestion content: |-\n        Add a docstring to func1()\n    existing code: |-\n        def func1():\n    relevant lines start: 12\n    relevant lines end: 12\n    improved code: |-\n        ...\n```\n\n\nEach YAML output MUST be after a newline, indented, with block scalar indicator ('|-').\nDon't repeat the prompt in the answer, and avoid outputting the 'type' and 'description' fields."}, {"role": "user", "content": "PR Info:\n\nTitle: 'add print for debug'\n\nBranch: 'feature/print-joke'\n\nDescription: 'None'\n\n\nThe PR Diff:\n```## src/app.py\n\n@@ -15,13 +15,12 @@ def hello_world_and_joke():\n\n__new hunk__\n15      \n16      # Return \"Hello, World!\" and the  joke\n17      return render_template('index.html', joke=joke)\n18  \n19  \n20  # Health check\n21  @app.route('/health')\n22  def health():\n23      return 'Im Healthy :)', 200\n24 +print(joke)\n25  if __name__ == '__main__':\n26      app.run(\"0.0.0.0\",debug=True)\n\n__old hunk__\n     \n     # Return \"Hello, World!\" and the  joke\n     return render_template('index.html', joke=joke)\n-print(joke)\n \n \n # Health check\n @app.route('/health')\n def health():\n     return 'Im Healthy :)', 200\n-\n if __name__ == '__main__':\n     app.run(\"0.0.0.0\",debug=True)\n```\n\nResponse (should be a valid YAML, and nothing else):\n```yaml"}], "finish_reason": "stop", "model": "azure/gpt-4", "usage": {"prompt_tokens": 1106, "completion_tokens": 140, "total_tokens": 1246}}, "file": {"name": "ai_handler.py", "path": "/app/pr_agent/algo/ai_handler.py"}, "function": "chat_completion", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 124, "message": "AI response", "module": "ai_handler", "name": "pr_agent.algo.ai_handler", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:26.393300+00:00", "timestamp": 1700464766.3933}}}
{"text": "Failed to parse AI prediction: mapping values are not allowed here\n  in \"<unicode string>\", line 2, column 214:\n     ... de the if __name__ == '__main__': block.\n                                         ^\n", "record": {"elapsed": {"repr": "0:10:31.549246", "seconds": 631.549246}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "utils.py", "path": "/app/pr_agent/algo/utils.py"}, "function": "load_yaml", "level": {"icon": "❌", "name": "ERROR", "no": 40}, "line": 294, "message": "Failed to parse AI prediction: mapping values are not allowed here\n  in \"<unicode string>\", line 2, column 214:\n     ... de the if __name__ == '__main__': block.\n                                         ^", "module": "utils", "name": "pr_agent.algo.utils", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:26.394212+00:00", "timestamp": 1700464766.394212}}}
{"text": "Successfully parsed AI prediction after removing 11 lines\n", "record": {"elapsed": {"repr": "0:10:31.553610", "seconds": 631.55361}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "utils.py", "path": "/app/pr_agent/algo/utils.py"}, "function": "try_fix_yaml", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 320, "message": "Successfully parsed AI prediction after removing 11 lines", "module": "utils", "name": "pr_agent.algo.utils", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:26.398576+00:00", "timestamp": 1700464766.398576}}}
{"text": "Ranking Suggestions...\n", "record": {"elapsed": {"repr": "0:10:31.553886", "seconds": 631.553886}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "pr_code_suggestions.py", "path": "/app/pr_agent/tools/pr_code_suggestions.py"}, "function": "run", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 72, "message": "Ranking Suggestions...", "module": "pr_code_suggestions", "name": "pr_agent.tools.pr_code_suggestions", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:26.398852+00:00", "timestamp": 1700464766.398852}}}
{"text": "Failed to generate code suggestions for PR, error: 'existing code'\n", "record": {"elapsed": {"repr": "0:10:31.553966", "seconds": 631.553966}, "exception": null, "extra": {"action": "created", "event": "issue_comment", "sender": "flavienmerlin", "server_type": "github_app", "api_url": "https://api.github.com/repos/flavienmerlin/codiumai-pragent-poc/pulls/23"}, "file": {"name": "pr_code_suggestions.py", "path": "/app/pr_agent/tools/pr_code_suggestions.py"}, "function": "run", "level": {"icon": "❌", "name": "ERROR", "no": 40}, "line": 81, "message": "Failed to generate code suggestions for PR, error: 'existing code'", "module": "pr_code_suggestions", "name": "pr_agent.tools.pr_code_suggestions", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:26.398932+00:00", "timestamp": 1700464766.398932}}}
{"text": "event or action does not require handling\n", "record": {"elapsed": {"repr": "0:10:31.555645", "seconds": 631.555645}, "exception": null, "extra": {}, "file": {"name": "github_app.py", "path": "/app/pr_agent/servers/github_app.py"}, "function": "handle_request", "level": {"icon": "ℹ️", "name": "INFO", "no": 20}, "line": 185, "message": "event or action does not require handling", "module": "github_app", "name": "__main__", "process": {"id": 1, "name": "MainProcess"}, "thread": {"id": 139983841098624, "name": "MainThread"}, "time": {"repr": "2023-11-20 07:19:26.400611+00:00", "timestamp": 1700464766.400611}}}

let me know if you need more logs, Thanks

@mrT23
Copy link
Collaborator

mrT23 commented Nov 20, 2023

thanks, the full log helped.
i will continue to work on the fallback mechanism
#464

@flavienmerlin
Copy link
Author

HI @mrT23 I built a new docker image with the changed you made on this PR #464
It seems to work well now.

Thank you.

@mrT23
Copy link
Collaborator

mrT23 commented Nov 21, 2023

great.
share more problems if you face them

@mrT23 mrT23 closed this as completed Nov 21, 2023
@flavienmerlin flavienmerlin changed the title Pr-egent /improve ERROR", "no": 40, Failed to parse AI prediction Pr-agent /improve ERROR", "no": 40, Failed to parse AI prediction Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something is working
Projects
None yet
Development

No branches or pull requests

2 participants