[Refactor] Remove usage of 'Pipeline' in favor of 'App' (#1246)
This commit is contained in:
@@ -61,7 +61,7 @@ For example, you can create an Elon Musk bot using the following code:
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
import os
|
import os
|
||||||
from embedchain import Pipeline as App
|
from embedchain import App
|
||||||
|
|
||||||
# Create a bot instance
|
# Create a bot instance
|
||||||
os.environ["OPENAI_API_KEY"] = "YOUR API KEY"
|
os.environ["OPENAI_API_KEY"] = "YOUR API KEY"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Following is an example of how to use the dropbox loader:
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
import os
|
import os
|
||||||
from embedchain import Pipeline as App
|
from embedchain import App
|
||||||
|
|
||||||
os.environ["DROPBOX_ACCESS_TOKEN"] = "sl.xxx"
|
os.environ["DROPBOX_ACCESS_TOKEN"] = "sl.xxx"
|
||||||
os.environ["OPENAI_API_KEY"] = "sk-xxx"
|
os.environ["OPENAI_API_KEY"] = "sk-xxx"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ The first time you use the loader, you will be prompted to enter your Google acc
|
|||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from embedchain import Pipeline as App
|
from embedchain import App
|
||||||
|
|
||||||
app = App()
|
app = App()
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ from dotenv import load_dotenv
|
|||||||
from fastapi import FastAPI, responses
|
from fastapi import FastAPI, responses
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from embedchain import Pipeline
|
from embedchain import App
|
||||||
|
|
||||||
load_dotenv(".env")
|
load_dotenv(".env")
|
||||||
|
|
||||||
app = FastAPI(title="Embedchain FastAPI App")
|
app = FastAPI(title="Embedchain FastAPI App")
|
||||||
embedchain_app = Pipeline()
|
embedchain_app = App()
|
||||||
|
|
||||||
|
|
||||||
class SourceModel(BaseModel):
|
class SourceModel(BaseModel):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from dotenv import load_dotenv
|
|||||||
from fastapi import Body, FastAPI, responses
|
from fastapi import Body, FastAPI, responses
|
||||||
from modal import Image, Secret, Stub, asgi_app
|
from modal import Image, Secret, Stub, asgi_app
|
||||||
|
|
||||||
from embedchain import Pipeline
|
from embedchain import App
|
||||||
|
|
||||||
load_dotenv(".env")
|
load_dotenv(".env")
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ stub = Stub(
|
|||||||
)
|
)
|
||||||
|
|
||||||
web_app = FastAPI()
|
web_app = FastAPI()
|
||||||
embedchain_app = Pipeline(name="embedchain-modal-app")
|
embedchain_app = App(name="embedchain-modal-app")
|
||||||
|
|
||||||
|
|
||||||
@web_app.post("/add")
|
@web_app.post("/add")
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
from fastapi import FastAPI, responses
|
from fastapi import FastAPI, responses
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from embedchain import Pipeline
|
from embedchain import App
|
||||||
|
|
||||||
app = FastAPI(title="Embedchain FastAPI App")
|
app = FastAPI(title="Embedchain FastAPI App")
|
||||||
embedchain_app = Pipeline()
|
embedchain_app = App()
|
||||||
|
|
||||||
|
|
||||||
class SourceModel(BaseModel):
|
class SourceModel(BaseModel):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "embedchain"
|
name = "embedchain"
|
||||||
version = "0.1.74"
|
version = "0.1.75"
|
||||||
description = "Simplest open source retrieval(RAG) framework"
|
description = "Simplest open source retrieval(RAG) framework"
|
||||||
authors = [
|
authors = [
|
||||||
"Taranjeet Singh <taranjeet@embedchain.ai>",
|
"Taranjeet Singh <taranjeet@embedchain.ai>",
|
||||||
|
|||||||
Reference in New Issue
Block a user