From 9fa368b11482c20a45d03f968f77aba010be3693 Mon Sep 17 00:00:00 2001 From: Deshraj Yadav Date: Tue, 6 Feb 2024 19:00:33 -0800 Subject: [PATCH] [Refactor] Remove usage of 'Pipeline' in favor of 'App' (#1246) --- README.md | 2 +- docs/components/data-sources/dropbox.mdx | 2 +- docs/components/data-sources/google-drive.mdx | 2 +- embedchain/deployment/fly.io/app.py | 4 ++-- embedchain/deployment/modal.com/app.py | 4 ++-- embedchain/deployment/render.com/app.py | 4 ++-- pyproject.toml | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ae2e4310..23b3e399 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ For example, you can create an Elon Musk bot using the following code: ```python import os -from embedchain import Pipeline as App +from embedchain import App # Create a bot instance os.environ["OPENAI_API_KEY"] = "YOUR API KEY" diff --git a/docs/components/data-sources/dropbox.mdx b/docs/components/data-sources/dropbox.mdx index de9dff41..bb2800bf 100644 --- a/docs/components/data-sources/dropbox.mdx +++ b/docs/components/data-sources/dropbox.mdx @@ -22,7 +22,7 @@ Following is an example of how to use the dropbox loader: ```python import os -from embedchain import Pipeline as App +from embedchain import App os.environ["DROPBOX_ACCESS_TOKEN"] = "sl.xxx" os.environ["OPENAI_API_KEY"] = "sk-xxx" diff --git a/docs/components/data-sources/google-drive.mdx b/docs/components/data-sources/google-drive.mdx index ed0482ed..3cb06c7b 100644 --- a/docs/components/data-sources/google-drive.mdx +++ b/docs/components/data-sources/google-drive.mdx @@ -19,7 +19,7 @@ The first time you use the loader, you will be prompted to enter your Google acc ```python -from embedchain import Pipeline as App +from embedchain import App app = App() diff --git a/embedchain/deployment/fly.io/app.py b/embedchain/deployment/fly.io/app.py index 75539a65..003543c4 100644 --- a/embedchain/deployment/fly.io/app.py +++ b/embedchain/deployment/fly.io/app.py @@ -2,12 +2,12 @@ from dotenv import load_dotenv from fastapi import FastAPI, responses from pydantic import BaseModel -from embedchain import Pipeline +from embedchain import App load_dotenv(".env") app = FastAPI(title="Embedchain FastAPI App") -embedchain_app = Pipeline() +embedchain_app = App() class SourceModel(BaseModel): diff --git a/embedchain/deployment/modal.com/app.py b/embedchain/deployment/modal.com/app.py index eeba6d0a..9ad15a85 100644 --- a/embedchain/deployment/modal.com/app.py +++ b/embedchain/deployment/modal.com/app.py @@ -2,7 +2,7 @@ from dotenv import load_dotenv from fastapi import Body, FastAPI, responses from modal import Image, Secret, Stub, asgi_app -from embedchain import Pipeline +from embedchain import App load_dotenv(".env") @@ -18,7 +18,7 @@ stub = Stub( ) web_app = FastAPI() -embedchain_app = Pipeline(name="embedchain-modal-app") +embedchain_app = App(name="embedchain-modal-app") @web_app.post("/add") diff --git a/embedchain/deployment/render.com/app.py b/embedchain/deployment/render.com/app.py index 659e9a9c..00d29bf3 100644 --- a/embedchain/deployment/render.com/app.py +++ b/embedchain/deployment/render.com/app.py @@ -1,10 +1,10 @@ from fastapi import FastAPI, responses from pydantic import BaseModel -from embedchain import Pipeline +from embedchain import App app = FastAPI(title="Embedchain FastAPI App") -embedchain_app = Pipeline() +embedchain_app = App() class SourceModel(BaseModel): diff --git a/pyproject.toml b/pyproject.toml index e74a5076..cb0c488c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "embedchain" -version = "0.1.74" +version = "0.1.75" description = "Simplest open source retrieval(RAG) framework" authors = [ "Taranjeet Singh ",