8000 🐛 Bug Report: appwrite-assistant 1.4.2 Docker container doesn't start · Issue #6217 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🐛 Bug Report: appwrite-assistant 1.4.2 Docker container doesn't start #6217

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

Closed
2 tasks done
sorinteican opened this issue Sep 11, 2023 · 14 comments · Fixed by appwrite/assistant#12 or #6342
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@sorinteican
Copy link

👟 Reproduction steps

Upgrade from version 1.4.1 to 1.4.2

👍 Expected behavior

It should not restart indefinite.

👎 Actual Behavior

Node.js v18.17.1
Created a chunk of size 1521, +
which is longer than the specified 1000
Created a chunk of size 1521, +
which is longer than the specified 1000
file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/embeddings/openai.js:82
throw new Error("OpenAI or Azure OpenAI API key not found");
^

Error: OpenAI or Azure OpenAI API key not found
at new OpenAIEmbeddings (file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/embeddings/openai.js:82:19)
at file:///usr/src/app/embeddings.js:43:3

It keeps restarting constantly.

🎲 Appwrite version

Version 1.4.x

💻 Operating system

Linux

🧱 Your Environment

Distributor ID:Ubuntu
Description:Ubuntu 22.04.1 LTS
Release:22.04
Codename:jammy

Docker version 24.0.5, build ced0996

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@sorinteican sorinteican added the bug Something isn't working label Sep 11, 2023
@stnguyen90
Copy link
Contributor

@sorinteican, thanks for raising this issue! 🙏🏼 Did you configure the Appwrite Assistant with a valid OpenAI key?

@stnguyen90 stnguyen90 self-assigned this Sep 11, 2023
@sorinteican
Copy link
Author

Hi, thank you for sharing the configuration variable. No, I did not. I haven't read the documentation for this, but it should have a flag or something to disable it for users that don't use this feature.

@stnguyen90
Copy link
Contributor

@sorinteican, it should have been removed in 1.4.2. Would you please clear your cache and check again? For example, this is a screenshot of 1.4.2 where you can see the assistant prompt is not visible:
image

@punitdiwan
Copy link
punitdiwan commented Sep 15, 2023

@stnguyen90 I also face the same error while trying 1.4.2 first time last week. I was getting the open API key missing error in the environment variable.

I tried my old OpenAI key but it got expired it seems so I was not able to use it. Moreover I am not also interested in using any OpenAI assistant features.

As a quick fix I reverted back to 1.4.1 so that I can continue my work.

I would like to suggest that this setting should be managed from the console because many projects will have separate open AI key. Moreover if I am not wrong, open AI is chargeable.

@wernerm
Copy link
wernerm commented Sep 17, 2023

Same issue here, appwrite-assistant cannot start, so the console UI is also not accessible.

$ docker compose logs appwrite-assistant | tail -16
appwrite-assistant | Node.js v18.17.1
appwrite-assistant | Created a chunk of size 1521, +
appwrite-assistant | which is longer than the specified 1000
appwrite-assistant | Created a chunk of size 1521, +
appwrite-assistant | which is longer than the specified 1000
appwrite-assistant | file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/embeddings/openai.js:82
appwrite-assistant | throw new Error("OpenAI or Azure OpenAI API key not found");
appwrite-assistant | ^
appwrite-assistant |
appwrite-assistant | Error: OpenAI or Azure OpenAI API key not found
appwrite-assistant | at new OpenAIEmbeddings (file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/embeddings/openai.js:82:19)
appwrite-assistant | at file:///usr/src/app/embeddings.js:43:3
appwrite-assistant |
appwrite-assistant | Node.js v18.17.1

Re-installing 1.4.3 did not solve the problem.

@stnguyen90
Copy link
Contributor

@sorinteican Are you still having a problem or can this be closed now?

@punitdiwan, @wernerm, I'm not really sure what you mean...appwrite-assistant doesn't need to be running to access the Appwrite Console 🧐

@punitdiwan
Copy link

@stnguyen90 I will update to AppWrite 1.4.3 today. Hopefully it will work. I will update you on this ticket by today. I will update 1.4.1 instance directly by running AppWrite 1.4.3 installation

@wernerm
Copy link
wernerm commented Sep 19, 2023

@stnguyen90 @punitdiwan @sorinteican
I was on 1.4.1 and upgraded to 1.4.3. That started the problem: The appwrite-assistant service would not start and its logs showed the error that I have reported.

Because the appwrite-assistant service does not start, the web console is not usable. I left the value of the _APP_ASSISTANT_OPENAI_API_KEY key empty in .env. I have removed the network, containers and images and did a clean rebuild of 1.4.3 - but that did not fix the problem.

To get things running again, I downgraded back to version 1.4.1, which is running fine, so now we are using that version again in a self-hosted production environment.

So this problem has unfortunately not been resolved (for me at least). We decided to wait for 1.4.4 and trust/hope that it fixes things. because upgrading to 1.4.3 does not seem to be a straight-forward option (in our case).

@punitdiwan
Copy link

@stnguyen90 and @sorinteican @wernerm I have upgraded from 1.4.1 to 1.4.3.

I am able to access the system however, appwrite-assistant container is restating. I am using the free plan and I have regenerated a new OpenAI key. However, appwrite-assistant restarting continuously giving me the error message:

Error [InsufficientQuotaError]: You exceeded your current quota, please check your plan and billing details.
    at Object.onFailedAttempt (file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/util/async_caller.js:81:35)
    at RetryOperation._fn (/usr/src/app/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js:67:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.17.1
Created a chunk of size 1521, +
which is longer than the specified 1000
Created a chunk of size 1521, +
which is longer than the specified 1000
Started server on port: 3003
file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/util/async_caller.js:81
                    const error = new Error(data?.error?.message);
                           

I have stopped appwrite-assistant container and the Appwrite is working as before.

This is the expected behavior and we can close this issue from my end because all Appwrite basic services are up and serving well.

@wernerm
Copy link
wernerm commented Sep 19, 2023

This is the expected behavior and we can close this issue from my end because all Appwrite basic services are up and serving well.

@punitdiwan Why would you want to close the issue if you had to stop one of the (problematic) services? That's why issues exist, so we know something is not in order - in this case with the functionality added after 1.4.1 was released, causing it not to be backward compatible with existing deployments.

What is more, if the appwrite-assistant service is stopped... well... then you can't use it.

The error you are getting is because you need (paid) credits on your OpenAI subscription - so unfortunately simply adding an API key cannot be used as a workaround for the the problem, as it throws a new error, as you have reported.

@punitdiwan
Copy link

@punitdiwan Why would you want to close the issue if you had to stop one of the (problematic) services? That's why issues exist, so we know something is not in order - in this case the functionality added after 1.4.1 was released, causing it not to be backward compatible with existing deployments.

@wernerm Your point is valid. As it is backward compatible being a minor upgrade, I should not throw an error in the first place. when the OpenAI key is missing.

Not everyone wants to get a paid plan of OpenAI but still wants to use AppWrite without OpenAI features.

@stnguyen90
Copy link
Contributor
stnguyen90 commented Sep 19, 2023

For those of you who can't use Appwrite with appwrite-assistant running, would you please:

  1. try to clear your browser cache (and cloudflare or any other system that may cache the front end)
  2. share what you see when you try to access the console
  3. share the browser console logs

@punitdiwan
Copy link

For those of you who can't use Appwrite with appwrite-assistant running, would you please:

  1. try to clear your cache

@stnguyen90 Which cache? Are you asking to clear the browser cache?

If it’s a Appwrite cache, do you mean redis cache?

@stnguyen90
Copy link
Contributor

@punitdiwan browser cache.

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
No open projects
Status: Done
4 participants
0