AGiXT
AGiXT copied to clipboard
Error when go to agent
Description
In new version there is an error when user go to agent page (http://localhost:3000/agent/Agent-LLM)

Promise {
Steps to Reproduce the Bug
- Run frontend
- Run backend
- Go to http://localhost:3000/agent/Agent-LLM
Expected Behavior
Goes to page without error
Actual Behavior
Error occurs
Additional Context / Screenshots
No response
Operating System
- [ ] Microsoft Windows
- [X] Apple MacOS
- [ ] Linux
- [ ] Android
- [ ] iOS
- [ ] Other
Python Version
- [ ] Python <= 3.9
- [ ] Python 3.10
- [X] Python 3.11
Environment Type - Connection
- [X] Local
- [ ] Remote
Environment Type - Container
- [ ] Using Docker
- [X] Not Using Docker
Acknowledgements
- [X] My issue title is concise, descriptive, and in title casing.
- [X] I have searched the existing issues to make sure this bug has not been reported yet.
- [X] I am using the latest version of Agent-LLM.
- [X] I have provided enough information for the maintainers to reproduce and diagnose the issue.
Search for: await axios.get(`/api/provider`) and replace with: axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/provider`) https://github.com/search?q=repo%3AJosh-XT%2FAgent-LLM%20%60%2Fapi&type=code
What file is this "axios.get('/api/provider') located in?
- frontend/components/systems/agent/tabs/AgentConfigure.js
- frontend/pages/provider/[provider].js
- frontend/pages/provider/index.js
Sadly, the same error comes up.
Search for: await axios.get(
/api/provider
) and replace with: axios.get(${process.env.NEXT_PUBLIC_API_URI ?? '[http://localhost:7437'}/api/provider
](http://localhost:7437'%7D/api/provider%60)) https://github.com/search?q=repo%3AJosh-XT%2FAgent-LLM%20%60%2Fapi&type=code
frontend/components/systems/agent/tabs/AgentConfigure.js
frontend/pages/provider/[provider].js
frontend/pages/provider/index.js
I experience the same issue as the OP and unfortunately this fix didn't work either, I appreciate the effort
there is another line: console.log(axios.get("/api/provider")); in frontend/pages/_app.js Maybe that is causing the error to display on console? The project still does not work fully for me with oobabooga web-ui. I was able to access the agents page and add an agent after this, however when sending a message to the agent, it does not show up in the dialogbox, only the console. Also, sometimes the buttons on the UI are either unresponsive or quite slow. After applying the above fixes, try navigating to: http://localhost:3000/agent and see if it works. For reference, I'm using the following params: AI_PROVIDER=oobabooga AI_MODEL=default AI_PROVIDER_URI=http://127.0.0.1:7860
on Node v16.18.1 and python 3.11.3 (virtualenv)
frontend/pages/api/provider/index.js
line 16 change:
await axios.get(${process.env.API_URI}/api/provider
).then((response) => {
to
await axios.get(${process.env.NEXT_PUBLIC_API_URI}/api/provider
).then((response) => {
Not sure how to create a PR for this. First timer!