-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session factory is not initialized #1280
Comments
Thanks for reporting @westonli-thu. I am looking into this issue now. |
@westonli-thu can you please share the code that you are trying to use? |
I tried to reproduce the issue on Google colab but it seems to be working fine. See Colab: https://colab.research.google.com/drive/1NMkAxTdHj-G4epFb9I6fMFX8tVPL7tn5?usp=sharing Code below: import os
os.environ['OPENAI_API_KEY'] = 'sk-xxx'
from embedchain import App
config = {
'app': {
"config": {
"id": "ec-app"
}
}
}
app = App.from_config(config=config)
app.add("https://www.forbes.com/profile/elon-musk")
app.chat("What is the net worth of Elon Musk?") |
I am have a similar error here is all I did from embedchain.config import BaseLlmConfig
from embedchain.llm.openai import OpenAILlm
from embedchain import App
from dotenv import load_dotenv
_ = load_dotenv()
base_llm_config = BaseLlmConfig(prompt=prompt)
llm = OpenAILlm(config=base_llm_config) ouput: File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\llm\openai.py:24, in OpenAILlm.init(self, config, tools) File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\llm\base.py:28, in BaseLlm.init(self, config) File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\memory\base.py:14, in ChatHistory.init(self) File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\core\db\database.py:84, in get_session() File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\core\db\database.py:40, in DatabaseManager.get_session(self) RuntimeError: Session factory is not initialized. Call setup_engine() first.` |
馃悰 Describe the bug
I try to use App.from_config(config={...}), and I got this issue:
RuntimeError: Session factory is not initialized. Call setup_engine() first.
Is there any setting I missed? I run on local MacBook, and the version of embedchain is 0.1.83
The text was updated successfully, but these errors were encountered: