Comments (4)
Thanks for reporting @westonli-thu. I am looking into this issue now.
from embedchain.
@westonli-thu can you please share the code that you are trying to use?
from embedchain.
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?")
from embedchain.
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:
`---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[11], line 4
2 _ = load_dotenv()
3 base_llm_config = BaseLlmConfig(prompt=prompt)
----> 4 llm = OpenAILlm(config=base_llm_config)
File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\llm\openai.py:24, in OpenAILlm.init(self, config, tools)
18 def init(
19 self,
20 config: Optional[BaseLlmConfig] = None,
21 tools: Optional[Union[Dict[str, Any], Type[BaseModel], Callable[..., Any], BaseTool]] = None,
22 ):
23 self.tools = tools
---> 24 super().init(config=config)
File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\llm\base.py:28, in BaseLlm.init(self, config)
25 else:
26 self.config = config
---> 28 self.memory = ChatHistory()
29 self.is_docs_site_instance = False
30 self.online = False
File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\memory\base.py:14, in ChatHistory.init(self)
13 def init(self) -> None:
---> 14 self.db_session = get_session()
File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\core\db\database.py:84, in get_session()
83 def get_session() -> SQLAlchemySession:
---> 84 return database_manager.get_session()
File ~\anaconda3\envs\langchats\lib\site-packages\embedchain\core\db\database.py:40, in DatabaseManager.get_session(self)
38 """Provides a session for database operations."""
39 if not self._session_factory:
---> 40 raise RuntimeError("Session factory is not initialized. Call setup_engine() first.")
41 return self._session_factory()
RuntimeError: Session factory is not initialized. Call setup_engine() first.`
from embedchain.
Related Issues (20)
- Cohere integration not working HOT 2
- Add support for embedding model from Cohere HOT 3
- AttributeError: type object 'App' has no attribute 'from_config' HOT 3
- Integrate Infinity Framework for Enhanced Embedding Inference Speed
- DOC: Following Quick Start and Im facing a lot of issues HOT 9
- PDF File requires extra dependencies. Install with pip install --upgrade "embedchain[dataloaders]" HOT 2
- DOC: Following Quick Start with Hugging Face and no answer HOT 1
- DOC: Following Quick Start with Hugging Face and error (Python 3.12.2, embedchain 0.1.84) HOT 2
- Add support to pass Callback Handlers HOT 1
- Try to share app.config.id with two programs with no success with huggingface (embedchain 0.1.88)
- data source model uses "type" not "data_type" HOT 2
- Introduction of alembic caused regression HOT 2
- Facing issue with quick start guide HOT 2
- Add support for providing certificate files for the websites HOT 1
- query returns the prompt and document? HOT 3
- [qdrant] is not a valid point ID, valid values are either an unsigned in
- Add support for Azure AI Search Vector Store
- Unable to install embedchain on manjaro HOT 1
- Request to make where clause optional in queries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embedchain.