Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with full RAG and AI Agent capabilities.
https://anythingllm.com
MIT License
19.23k stars 2.1k forks source link

[Local development] LLM Preference not showing #1467

Closed Nabushika closed 2 months ago

Nabushika commented 3 months ago

How are you running AnythingLLM?

Local development

What happened?

Started testing anything-llm with a cloud llm, then started playing around with the settings - http://localhost:3000/settings/llm-preference is blank and there's an error in the console:

Uncaught TypeError: selectedLLMObject is undefined
    GeneralLLMPreference index.jsx:397
    React 12
    workLoop scheduler.development.js:266
    flushWork scheduler.development.js:239
    performWorkUntilDeadline scheduler.development.js:533
The above error occurred in the <GeneralLLMPreference> component:

GeneralLLMPreference@http://localhost:3000/src/pages/GeneralSettings/LLMPreference/index.jsx:310:39
div
UserMenu@http://localhost:3000/src/components/UserMenu/index.jsx:18:33
AdminRoute@http://localhost:3000/src/components/PrivateRoute/index.jsx:82:27
RenderedRoute@http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=ffa61513:3546:7
Routes@http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=ffa61513:3980:7
PfpProvider@http://localhost:3000/src/PfpContext.jsx:22:28
LogoProvider@http://localhost:3000/src/LogoContext.jsx:22:29
ContextWrapper@http://localhost:3000/src/AuthContext.jsx:25:37
Suspense
App
Router@http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=ffa61513:3928:7
BrowserRouter@http://localhost:3000/node_modules/.vite/deps/react-router-dom.js?v=ffa61513:4658:7

Are there known steps to reproduce?

Haven't tried to reproduce it yet, but the exact steps I took were:

timothycarambat commented 3 months ago

I see you are on Local Development - did you go through onboarding and/or have an LLM_PROVIDER value set in the env? for local dev this is server/.env.development when running in development and is server/.env in production

timothycarambat commented 3 months ago

If you are running development yarn dev:server and make a code change in the backend, it will hot reload the server and what ENV you may have saved will revert to whatever is in .env.development