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

[BUG]: stuck on Generating the commit message #259

Open
zhiyue opened this issue Sep 13, 2023 · 14 comments
Open

[BUG]: stuck on Generating the commit message #259

zhiyue opened this issue Sep 13, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@zhiyue
Copy link

zhiyue commented Sep 13, 2023

Opencommit Version

3.0.3

Node Version

v18.7.0

NPM Version

9.8.1

What OS are you seeing the problem on?

Other Linux Distro

What happened?

stuck on
image

Expected Behavior

normal output

Current Behavior

stuck

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

@zhiyue zhiyue added the bug Something isn't working label Sep 13, 2023
@zhiyue zhiyue changed the title [Bug]: stuck on Generating the commit message Sep 13, 2023
@zhiyue zhiyue changed the title stuck on Generating the commit message [BUG]: stuck on Generating the commit message Sep 13, 2023
@FrancoLab
Copy link

FrancoLab commented Sep 13, 2023

Same here.
Screenshot 2023-09-13 at 12 16 17

@juanmav
Copy link

juanmav commented Sep 14, 2023

Hi, just to confirm I'm having the same problem as @zhiyue and @FrancoLab

@di-sukharev
Copy link
Owner

will get to it soon, thanks for creating the ticket!

@dtellez-wm
Copy link

Same problem on windows 10
image

@FrancoLab
Copy link

has this been resolved?

@martineziortz
Copy link

Same issue here. Please let me know if this has been resolved.

@gustawx
Copy link

gustawx commented Nov 2, 2023

I have the same issue, reinstall didn'help. Strange thing is that it worked fine and started to hang without making any changes in the system or config. Node 20.9.0, Windows 10

@di-sukharev
Copy link
Owner

Not yet resolved guys, if anyone have time to look into it — much appreciated <3

@gustawx
Copy link

gustawx commented Nov 8, 2023

@di-sukharev I made some tests and this is what I came up with:

  1. the problem happens when it goes inside of if (res >= MAX_REQUEST_TOKENS) {..., in \node_modules\opencommit\out\cli.js line 22105
  2. it goes in to above if when OCO_OPENAI_MAX_TOKENS is too large. I think people (like me) think that it's being used to specify max number of allowed tokens in the request TO openai but this is max token for the response FROM openai. When I set OCO_OPENAI_MAX_TOKENS to e.g. 500 all works fine again.
  3. I also found one hardcoded value that could be problematic. In the same file cli.js DEFAULT_MODEL_TOKEN_LIMIT is set to 4096, currently I use gpt-4 which has max allowed of 8192 tokens so: a) the value is not correct and b) it may change over time anyway and I think it also depends on openai subscription so would be good to have it configurable.
  4. there is also one line that I don't understand=> const MAX_REQUEST_TOKENS = DEFAULT_MODEL_TOKEN_LIMIT - ADJUSTMENT_FACTOR - INIT_MESSAGES_PROMPT_LENGTH - config6?.OCO_OPENAI_MAX_TOKENS why to subsctract OCO_OPENAI_MAX_TOKENS? Basically here was the problem (at least in my case) because DEFAULT_MODEL_TOKEN_LIMIT is hardcoded to 4096 and I set it to 8192 (currently allowed limit for gpt-4) so the result is negative and it was going insied of this if from point 1. (there is still some issue in that if expression)

Unfortunatelly I don't have time to debug this deeper and implement fix but I think it would be good to have simply a check that OCO_OPENAI_MAX_TOKENS can't be larger than DEFAULT_MODEL_TOKEN_LIMIT

Copy link

Stale issue message

@di-sukharev
Copy link
Owner

reopening, will take a look at this

@aldinokemal
Copy link

I'm using Azure with gpt-4o model getting stuck on generating the commit message. However, when I switch to gpt-35-turbo it's working

image

@RazeBerry
Copy link

RazeBerry commented Aug 22, 2024

Same problem here using Claude 3.5 Sonnet! What is even more strange is that when I log on Anthropic console, it does not show OpenCommit has made a call at all! Also maybe the issue is I deleted bunch of useless files from my repo and the OCO is trying to feed it into the Claude?

Edit: I think yeah feeding CSV in there is a problem

  Results_Version3/Bangladesh_clean_extracted.csv
  Results_Version3/Bangladesh_processed.csv
  Results_Version3/Mexico_SectionA_results_with_synthesis.csv
  Results_Version3/Mexico_clean_extracted.csv
  Results_Version3/Mexico_processed.csv
  Results_Version3/Poland_SectionA_results_20240813_173116_with_synthesis.csv
  Results_Version3/Poland_clean_extracted.csv
  Results_Version3/Poland_processed.csv
  Results_Version3/Switzerland_SectionA_results_20240814_133840_with_synthesis.csv
  Results_Version3/Switzerland_clean_extracted.csv
  Results_Version3/Switzerland_processed.csv
  ui/__pycache__/streamlit_app.cpython-311.pyc
  ui/streamlit_app.py
│
○  Generating the commit message

@AndreasBBS
Copy link

I've had this issue in the past then it somehow resolved and now all of a sudden I'm having it again. My main problem with it is getting left out in the blue without an error message or being able to enable some verbose flag that might give me some insight of what's going on. Just stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants