TransformerOptimus / SuperAGI

<⚡️> SuperAGI - A dev-first open source autonomous AI agent framework. Enabling developers to build, manage & run useful autonomous agents quickly and reliably.
https://superagi.com/
MIT License
15.44k stars 1.86k forks source link

SuperAGI (v0.0.7) - cannot initialize app when organisation_id=None #703

Closed EpicApex closed 1 year ago

EpicApex commented 1 year ago

⚠️ Check for existing issues before proceeding. ⚠️

Do you use OpenAI GPT-3.5 or GPT-4?

GPT-3.5

Which area covers your issue best?

Installation and setup

Describe your issue.

Hello,

Description:

Trying to use SuperAGI v0.0.7 locally fails on organization_id = None

Note - I've used v0.0.5 successfully, the failure comes when upgrading to 0.0.7 ( Ofcourse this still recreates on a fresh clean git clone )

Issue

orgranization_id cannot be 'None' as toolkit requires it.

You can find organization_id in a couple of sections

The Problem

No organization_id can be input by the user in the config.yaml file - nor do we have a guidance in the installation guide on a static organization id ( without the first in the filter )

Issue is simple to recreate

1) git clone 2) set config.yaml with the relevant data including ENV: 'DEV' 3) set agent_executor.py to use pinecone 'free tier' replica set index memory = VectorFactory.get_vector_storage(VectorStoreType.PINECONE, "my-current-indexname-cosine", memory = VectorFactory.get_vector_storage("PineCone", "my-current-indexname-cosine",

My own env

Any help is appreciated <3

How to replicate your Issue?

1) git clone 2) set config.yaml with the relevant data including ENV: 'DEV' 3) set agent_executor.py to use pinecone 'free tier' replica set index memory = VectorFactory.get_vector_storage(VectorStoreType.PINECONE, "my-current-indexname-cosine", memory = VectorFactory.get_vector_storage("PineCone", "my-current-indexname-cosine",

Upload Error Log Content

superagi-backend-1 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl. superagi-backend-1 | INFO [alembic.runtime.migration] Will assume transactional DDL. superagi-backend-1 | INFO: Will watch for changes in these directories: ['/app'] superagi-backend-1 | INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit) superagi-backend-1 | INFO: Started reloader process [1] using WatchFiles superagi-gui-1 | - event compiled client and server successfully in 15.6s (651 modules) superagi-gui-1 | - wait compiling... superagi-gui-1 | - event compiled client and server successfully in 5.1s (651 modules) superagi-backend-1 | INFO: Started server process [26] superagi-backend-1 | INFO: Waiting for application startup. superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:148] - Running Startup tasks superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:152] - User(id=1, name='SuperAGI User', email='xxx@agi.com', password='xxx',organisation_id=None) superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:155] - None superagi-backend-1 | ERROR: Traceback (most recent call last): superagi-backend-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 677, in lifespan superagi-backend-1 | async with self.lifespan_context(app) as maybe_state: superagi-backend-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 566, in aenter superagi-backend-1 | await self._router.startup() superagi-backend-1 | File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 654, in startup superagi-backend-1 | await handler() superagi-backend-1 | File "/app/main.py", line 156, in startup_event superagi-backend-1 | register_toolkits(session, organisation) superagi-backend-1 | File "/app/superagi/helper/tool_helper.py", line 248, in register_toolkits superagi-backend-1 | logger.info(f"Toolkits Registered Successfully for Organisation ID : {organisation.id}!") superagi-backend-1 | AttributeError: 'NoneType' object has no attribute 'id' superagi-backend-1 | superagi-backend-1 | ERROR: Application startup failed. Exiting.

luciferlinx101 commented 1 year ago

Hey @EpicApex looks like you have changed the code and changed the default user. superagi-backend-1 | 2023-07-09 13:40:55 UTC - Super AGI - INFO - [/app/main.py:152] - User(id=1, name='SuperAGI User', email='[xxx@agi.com](mailto:xxx@agi.com)', password='xxx',organisation_id=None) For local uses we create a hardcoded user any reason you changed the default user?

Can you revert back to original and try again.

EpicApex commented 1 year ago

Hi @luciferlinx101,

I actually didnt know that there is a default settings.

Although I I assumed you made it static but just to make sure i've changed the credentials to 'xxx' by intention in this ticket only without changing any hardcoded code by you guys.

Any intakes after that is being cleared?

luciferlinx101 commented 1 year ago

Hey you can revert back to default and there shouldn't be any issue.

EpicApex commented 1 year ago

I think I wasnt clear before I'll try again.

Changes we're made only on this this "issue" page. (static changes)

No changes we're made to default 0.0.7v code, build was always erroneous. ( standard git clone )

Is there any more information you need?

coder5492 commented 1 year ago

Closing the issue for now. Please feel free to reopen it if you feel it's unresolved!