Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(path visibility: ModuleNotFoundError: No module named 'examples'): #17

Merged
merged 1 commit into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion langcorn/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class T:
def server(self, *lc: str, port=8718, auth_token=""):
sys.path.append(os.path.dirname(__file__))
sys.path.append(os.path.dirname("."))
app = api.create_service(*lc, auth_token=auth_token)
config = uvicorn.Config(app, port=port, log_level="info")
server = uvicorn.Server(config)
Expand Down
2 changes: 1 addition & 1 deletion langcorn/server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async def handler(request: request_cls, http_request: Request):

def create_service(*lc_apps, auth_token: str = "", app: FastAPI = None):
# Make local modules discoverable
sys.path.append(os.path.dirname(__file__))
sys.path.append(os.path.dirname("."))
logger.info("Creating service")
app = app or FastAPI()
endpoints = ["/docs"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langcorn"
version = "0.0.8"
version = "0.0.9"
description = "A Python package creating rest api interface for LangChain"
authors = ["Alexander Miasoiedov <msoedov@gmail.com>"]
maintainers = [
Expand Down