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

Not working on GitLab #34

Open
ybloch opened this issue Apr 17, 2023 · 5 comments
Open

Not working on GitLab #34

ybloch opened this issue Apr 17, 2023 · 5 comments

Comments

@ybloch
Copy link

ybloch commented Apr 17, 2023

I tried the extension on Gitlab's MR and I got the Error from OpenAI:

Status: 413
{"detail":{"message":"The message you submitted was too long, please reload the conversation and submit something shorter.","code":"message_length_exceeds_limit"}}

From looking at the payload of the request and also at the code itself, it seems that the tool does not capture the code well, it sends too many lines (not only code) in one single request

@ybloch ybloch changed the title Not working on GitLab (also on GitHub) Not working on GitLab Apr 17, 2023
@nickveenhof
Copy link
Collaborator

Is the MR you tried it on public? I think the context/description of the MR might have been too big. The patches itself are truncated already but the description is not.

@ybloch
Copy link
Author

ybloch commented Apr 18, 2023

@nickveenhof I tried on private...
So I had another test on a public repo, and I got a JS error:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getAttribute')
    at popup.js:2:290946

this is the random repo I tested:
https://gitlab.com/Amppatil/home/-/merge_requests/1/diffs

@webstercharly
Copy link

webstercharly commented Apr 18, 2023

It is not an issue of private vs public, here is a public PR/MR I tested on and get the same error as this issue:
https://github.com/vercel/satori/pull/287/files
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117832/diffs

POST https://chat.openai.com/backend-api/conversation HTTP/1.1
Host: chat.openai.com
Connection: keep-alive
Content-Length: 31273

I have tried it on a number of private PRs and they work fine up to a certain size.

HTTP/1.1 413 Payload Too Large
Date: Tue, 18 Apr 2023 10:57:01 GMT
Content-Type: application/json
Content-Length: 163
Connection: keep-alive

{"detail":{"message":"The message you submitted was too long, please reload the conversation and submit something shorter.","code":"message_length_exceeds_limit"}}

From my understand of ChatGPT you'd want to count the number of token's in the message before sending and consider sending multiple messages to the Chat asking for it to wait for a certain command before responding. Then there will be an issue with the Chat only able to remember so many previous messages / tokens, but it ultimately means multiple api calls.

@webstercharly
Copy link

webstercharly commented Apr 18, 2023

@nickveenhof I tried on private... So I had another test on a public repo, and I got a JS error:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getAttribute')
    at popup.js:2:290946

this is the random repo I tested: https://gitlab.com/Amppatil/home/-/merge_requests/1/diffs

You are getting this error because document.querySelector('.description textarea').getAttribute('data-value') cannot be found so is returning null on the querySelection.

The assumption of a description is an issue as not all MR in GitLab will render a description textarea, so that is a bug

@nickveenhof
Copy link
Collaborator

Does this bug still exist in the latest dev version? We also just pushed out a new version to the chrome store

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants