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

Issues setting up AutoGen Assistant #739

Closed
BeibinLi opened this issue Nov 21, 2023 · 7 comments
Closed

Issues setting up AutoGen Assistant #739

BeibinLi opened this issue Nov 21, 2023 · 7 comments
Assignees
Labels
proj-studio Related to AutoGen Studio.

Comments

@BeibinLi
Copy link
Collaborator

The readme file needs some updates, and I still cannot run it (Windows 10).

  1. Tell the user to install npm install -g gatsby-cli
  2. The "yarn build" will fail in Windows, and need to add a keyword "set " so that set PREFIX_PATH_VALUE=''
  3. Resolve the error cp: cannot stat 'public/': No such file or directory, under the samples/apps/autogen-assistant folder.
  4. Error while starting the server TypeError: issubclass() arg 1 must be a class
@victordibia
Copy link
Collaborator

victordibia commented Nov 23, 2023

Thanks for the notes.
I had not tested on Windows, so this is helpful.

  1. Added to readme in the autogenra branch .
  2. added note to readme for windows users
  3. I updated the readme again to add a note for windows users. the build command does a few things and assumes a linux environment e.g. it expects the results of the build to be in public folder and uses the cp command to copy this to a folder that the backend can serve.
  4. Can you share a stacktrace on the issubclass() arg 1 error?

By the way, were you able to get it running with pip install autogenra ?

Below edit was added to readme.


npm install -g gatsby-cli
npm install --global yarn
cd frontend
yarn install
yarn build

The yarn build command above will build the frontend ui and copy the build artifacts (which is in frontend/public) to the autogenra web ui folder. Note that you may have to run npm install --force --legacy-peer-deps to force resolve some peer dependencies.

Windows Users. If you are on windows machine, you may need to use the command below instead to build the frontend.

gatsby clean && rmdir /s /q ..\\autogenra\\web\\ui && (set \"PREFIX_PATH_VALUE=\" || ver>nul) && gatsby build --prefix-paths && xcopy /E /I /Y public ..\\autogenra\\web\\ui

@mbadawy1
Copy link

Hi, Yes. I am running into this problem running windows 11. I am not sure how to fix it.

By the way, were you able to get it running with pip install autogenra ?

I tried that and it did not work

@mbadawy1
Copy link

mbadawy1 commented Nov 25, 2023

I am trying to use this app. I think its supposed to be UI to interact with Autogen. I have followed the steps, up until

"yarn build" in the frontend folder. When I run the command I get

(autogen) PS C:\VScode\MS_Autogen2\autogen\samples\apps\autogen-assistant\frontend> yarn build
yarn run v1.22.21
$ gatsby clean && rm -rf ../autogenra/web/ui  && PREFIX_PATH_VALUE='' gatsby build --prefix-paths && cp -r  public/ ../autogenra/web/ui
info Deleting .cache, public, C:\VScode\MS_Autogen2\autogen\samples\apps\autogen-assistant\frontend\node_modules\.cache\babel-loader, C:\VScode\MS_Autogen2\autogen\samples\apps\autogen-assistant\frontend\node_modules\.cache\terser-webpack-plugin    
info Successfully deleted directories

'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

So I tried using Git Bash

But I ran Into something else,

$ yarn build
yarn run v1.22.21
$ gatsby clean && rm -rf ../autogenra/web/ui  && PREFIX_PATH_VALUE='' gatsby build --prefix-paths && cp -r  public/ ../autogenra/web/ui
info Deleting .cache, public, C:\VScode\MS_Autogen2\autogen\samples\apps\autogen
-assistant\frontend\node_modules\.cache\babel-loader,
C:\VScode\MS_Autogen2\autogen\samples\apps\autogen-assistant\frontend\node_modul
es\.cache\terser-webpack-plugin
info Successfully deleted directories

'PREFIX_PATH_VALUE' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any clue on how to tackle this?

@mbadawy1
Copy link

mbadawy1 commented Nov 25, 2023

npm install --global yarn
cd frontend
yarn install
yarn build

i did these steps, I think my issue is with

  1. The "yarn build" will fail in Windows, and need to add a keyword "set " so that set PREFIX_PATH_VALUE=''

i dont know where to add the word set.

edit:
Okay, I searched the files in the autogen dir and added "set" to the package.json file and then ran the 'yarn build command again in git bash

yarn run v1.22.21
$ gatsby clean && rm -rf ../autogenra/web/ui  && set PREFIX_PATH_VALUE='' gatsby build --prefix-paths && cp -r  public/ ../autogenra/web/ui
info Deleting .cache, public, C:\VScode\MS_Autogen2\autogen\samples\apps\autogen
-assistant\frontend\node_modules\.cache\babel-loader,
C:\VScode\MS_Autogen2\autogen\samples\apps\autogen-assistant\frontend\node_modul
es\.cache\terser-webpack-plugin
info Successfully deleted directories

cp: cannot stat 'public/': No such file or directory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is the error I got next and thats where my limited knowledge carries me.

@victordibia
Copy link
Collaborator

Hi @mbadawy1 ,

The UI build process is currently designed for use in a linux environment. I am working on updated documentation to provide direction for windows users - that work is in the branch here .

There are two ways to use the app:

Pip install autogenra

Create a new conda environment.
pip uninstall autogenra (to double check there is no previous installation)
pip install autogenra

This should install from the built pypi version and autogenra ui should work correctly.

Build UI

For windows, please try the command below instead of running yarn build.

gatsby clean && rmdir /s /q ..\autogenra\web\ui && (set "PREFIX_PATH_VALUE=" || ver>nul) && gatsby build --prefix-paths && xcopy /E /I /Y public ..\autogenra\web\ui

Thanks again for trying this out, your feedback is most appreciated.

github-merge-queue bot pushed a commit that referenced this issue Dec 2, 2023
* improve template for files, integreate files in db

* ui update, improvements to file display grid

* add new global skill for image generation

* update readme to address #739

* utils.py refactor, separate db uitls for ease of development

* db utils

* add support for sessions both in backend api and ui

* improve implementation for session support

* add early v1 support for a gallery and publishing to a gallery

* rewrite logic for file storage representation. Store only file references on in db

* update generate image logic

* update ui layout

* fix light dark mode bug

* v1 support for showing items added to gallery

* remove viewer as it is merged in gallery

* formatting updates

* QOL refactoring

* readme and general updates

* add example notebook on assistant api

* imporve naming conventions and formatting

* readme update

* Update samples/apps/autogen-assistant/pyproject.toml

Co-authored-by: Chi Wang <[email protected]>

* Update samples/apps/autogen-assistant/notebooks/tutorial.ipynb

Co-authored-by: Chi Wang <[email protected]>

---------

Co-authored-by: Chi Wang <[email protected]>
@sonichi sonichi added the ra-oss label Dec 3, 2023
@report2model
Copy link

I was having the same issue as stated by others. Running the below instead of yarn build, results in a successful build and works as it should on Windows 10.

gatsby clean && rm -rf ..\\autogenra\\web\\ui && (set \"PREFIX_PATH_VALUE=\" || ver>nul) && gatsby build --prefix-paths && cp -r public ..\\autogenra\\web\\ui

If you are installing from source you may need to

pip uninstall autogenra

and

pip install autogenra

victordibia added a commit that referenced this issue Dec 6, 2023
rlam3 pushed a commit to rlam3/autogen that referenced this issue Dec 19, 2023
* improve template for files, integreate files in db

* ui update, improvements to file display grid

* add new global skill for image generation

* update readme to address microsoft#739

* utils.py refactor, separate db uitls for ease of development

* db utils

* add support for sessions both in backend api and ui

* improve implementation for session support

* add early v1 support for a gallery and publishing to a gallery

* rewrite logic for file storage representation. Store only file references on in db

* update generate image logic

* update ui layout

* fix light dark mode bug

* v1 support for showing items added to gallery

* remove viewer as it is merged in gallery

* formatting updates

* QOL refactoring

* readme and general updates

* add example notebook on assistant api

* imporve naming conventions and formatting

* readme update

* Update samples/apps/autogen-assistant/pyproject.toml

Co-authored-by: Chi Wang <[email protected]>

* Update samples/apps/autogen-assistant/notebooks/tutorial.ipynb

Co-authored-by: Chi Wang <[email protected]>

---------

Co-authored-by: Chi Wang <[email protected]>
@victordibia victordibia added proj-studio Related to AutoGen Studio. and removed ra-oss labels Feb 4, 2024
@victordibia
Copy link
Collaborator

Closing this due to inactivity.

References

whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
* improve template for files, integreate files in db

* ui update, improvements to file display grid

* add new global skill for image generation

* update readme to address microsoft#739

* utils.py refactor, separate db uitls for ease of development

* db utils

* add support for sessions both in backend api and ui

* improve implementation for session support

* add early v1 support for a gallery and publishing to a gallery

* rewrite logic for file storage representation. Store only file references on in db

* update generate image logic

* update ui layout

* fix light dark mode bug

* v1 support for showing items added to gallery

* remove viewer as it is merged in gallery

* formatting updates

* QOL refactoring

* readme and general updates

* add example notebook on assistant api

* imporve naming conventions and formatting

* readme update

* Update samples/apps/autogen-assistant/pyproject.toml

Co-authored-by: Chi Wang <[email protected]>

* Update samples/apps/autogen-assistant/notebooks/tutorial.ipynb

Co-authored-by: Chi Wang <[email protected]>

---------

Co-authored-by: Chi Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proj-studio Related to AutoGen Studio.
Projects
None yet
Development

No branches or pull requests

5 participants