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] - LLM timeout causing Message passing to fail #35

Open
rootCircle opened this issue Sep 10, 2024 · 0 comments
Open

🐛 [BUG] - LLM timeout causing Message passing to fail #35

rootCircle opened this issue Sep 10, 2024 · 0 comments
Labels
bug Something isn't working gpt-engine Everything about the GPTEngine help wanted Extra attention is needed

Comments

@rootCircle
Copy link
Owner

rootCircle commented Sep 10, 2024

Description

In docFiller, we use API calls to interact with the language model (LLM). However, with web extensions using Manifest V3, direct API calls from content scripts are not allowed. Instead, content scripts need to communicate with a background service worker. The background worker listens for these messages, performs the API calls, and then sends the responses back to the content script.

A challenge arises when these API calls take a significant amount of time, especially with local Ollama models. This can result in errors due to message channels closing prematurely.

For more details on handling messaging between content scripts and background workers, see the Chrome documentation on content scripts, message passing, and background workers.

If you encounter issues with long-running tasks and message channels, check the Managing long-lived connections documentation.

Reproduction URL

https://github.com/rootCircle/docFiller

Reproduction steps

1. Have a lengthy prompt for the LLM.
2. Trying the LLM engine in constant.ts as Ollama, and try running the extension!
3. If the LLM takes long time to respond then this will fail and error out with the above said error

Screenshots

image

Logs

Error getting response: Error: Could not establish connection. Receiving end does not exist.

Browsers

Firefox

OS

Linux

@rootCircle rootCircle added bug Something isn't working help wanted Extra attention is needed gpt-engine Everything about the GPTEngine labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gpt-engine Everything about the GPTEngine help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant