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

Copilot Plugins in affine.js: "You have reached the limit of actions" error after a few interactions, despite having token balance. #8427

Open
1 task done
NuerSir opened this issue Oct 3, 2024 · 4 comments

Comments

@NuerSir
Copy link

NuerSir commented Oct 3, 2024

What happened?

Issue Body:

I've successfully integrated Copilot Plugins into affine.js and configured it with OpenAI. The "Ask AI" feature works initially, but after approximately 10 interactions, I consistently receive the error message: "You have reached the limit of actions in this workspace, please upgrade your plan."

This occurs despite having a sufficient token balance in my OpenAI account. I've verified that making direct requests to OpenAI using curl works without any issues.

Steps to reproduce:

  1. Integrate Copilot Plugins into affine.js and configure with OpenAI.
  2. Use the "Ask AI" feature to interact with Copilot.
  3. After approximately 10 interactions, the error message will appear.
    image

Expected behavior:

The "Ask AI" feature should continue to function as long as there is a sufficient token balance in the OpenAI account.

Actual behavior:

The "Ask AI" feature stops working after a limited number of interactions, regardless of token balance.

Additional information:

  • Direct requests to OpenAI using curl work without any issues.
  • This issue only occurs when using Copilot Plugins in affine.js.

Possible causes:

  • Does AFFINE have a limit on the number of free times here? What do I need to do?

Request:

Please investigate this issue and provide a solution.

Distribution version

Linux

What browsers are you seeing the problem on if you're using web version?

No response

Are you self-hosting?

  • Yes

Relevant log output

{
    "errors": [
        {
            "message": "You have reached the limit of actions in this workspace, please upgrade your plan.",
            "locations": [
                {
                    "line": 3,
                    "column": 3
                }
            ],
            "path": [
                "createCopilotSession"
            ],
            "extensions": {
                "status": 402,
                "code": "Payment Required",
                "type": "QUOTA_EXCEEDED",
                "name": "COPILOT_QUOTA_EXCEEDED",
                "message": "You have reached the limit of actions in this workspace, please upgrade your plan.",
                "stacktrace": "copilot_quota_exceeded: You have reached the limit of actions in this workspace, please upgrade your plan.\n    at ChatSessionService.checkQuota (file:///app/dist/plugins/copilot/session.js:430:19)\n    at async CopilotResolver.createCopilotSession (file:///app/dist/plugins/copilot/resolver.js:414:13)"
            }
        }
    ],
    "data": null
}

Anything else?

No response

@affine-issue-bot
Copy link

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day.
Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

@forehalo
Copy link
Member

forehalo commented Oct 8, 2024

we are pushing the adaptation of ai for selfhost instances, but we haven't make it 100% ready. please be patient.

@NuerSir
Copy link
Author

NuerSir commented Oct 9, 2024

we are pushing the adaptation of ai for selfhost instances, but we haven't make it 100% ready. please be patient.

@forehalo After modifying Copilot, it works and the output results meet my expectations. However, AFFINE should have usage restrictions. I hope you can tell me where to modify to remove this restriction. Thank you very much.

@NuerSir
Copy link
Author

NuerSir commented Oct 10, 2024

we are pushing the adaptation of ai for selfhost instances, but we haven't make it 100% ready. please be patient.

@forehalo After modifying Copilot, it works and the output results meet my expectations. However, AFFINE should have usage restrictions. I hope you can tell me where to modify to remove this restriction. Thank you very much.

Please forgive my carelessness. I read the code and found the limitation in the features table. It can be used normally now. I hope AFFINE itself can have a more friendly and open way to access more LLM. I will look forward to it.

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

No branches or pull requests

2 participants