From f0d112254b83ac80b4b976a39aac3236cda95270 Mon Sep 17 00:00:00 2001 From: Deshraj Yadav Date: Sun, 5 Nov 2023 16:34:36 -0800 Subject: [PATCH] [version] bump package version and minor cleanup (#909) --- embedchain/pipeline.py | 31 ------------------------------- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/embedchain/pipeline.py b/embedchain/pipeline.py index 34e78f6e..7278f6e9 100644 --- a/embedchain/pipeline.py +++ b/embedchain/pipeline.py @@ -7,7 +7,6 @@ import uuid import requests import yaml -from fastapi import FastAPI, HTTPException from embedchain import Client from embedchain.config import PipelineConfig @@ -396,33 +395,3 @@ class Pipeline(EmbedChain): yaml_path=yaml_path, auto_deploy=auto_deploy, ) - - def start(self, host="0.0.0.0", port=8000): - app = FastAPI() - - @app.post("/add") - async def add_document(data_value: str, data_type: str = None): - """ - Add a document to the pipeline. - """ - try: - document = {"data_value": data_value, "data_type": data_type} - self.add(document) - return {"message": "Document added successfully"} - except Exception as e: - raise HTTPException(status_code=500, detail=str(e)) - - @app.post("/query") - async def query_documents(query: str, num_documents: int = 3): - """ - Query for similar documents in the pipeline. - """ - try: - results = self.search(query, num_documents) - return results - except Exception as e: - raise HTTPException(status_code=500, detail=str(e)) - - import uvicorn - - uvicorn.run(app, host=host, port=port) diff --git a/pyproject.toml b/pyproject.toml index 55aa75d6..1497222e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "embedchain" -version = "0.0.91" +version = "0.0.92" description = "Data platform for LLMs - Load, index, retrieve and sync any unstructured data" authors = [ "Taranjeet Singh ",