langchain-ai / opengpts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Langserver could not import module app.server

ZsomborHajzer opened this issue · comments

I am trying to use the tool lanchain and langserver, and create a api from a template. Steps I took:

  1. create server template
langchain app new my-app --package rag-conversation
  1. copy in the code provided in the cmd after the installation is ready
@app.get("/")
async def redirect_root_to_docs():
    return RedirectResponse("/docs")

add_routes(app, rag_conversation_chain, path="/rag-conversation")
  1. cd into my-app folder and run langchain serve in the cmd.
    After which the server cant seem to start and throws this error
INFO:     Will watch for changes in these directories: 
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [10212] using WatchFiles
ERROR:    Error loading ASGI app. Could not import module "app.server".

Does anyone know how to aproach this issue. There is no -v command option so this is all the information I have to go by.

@ZsomborHajzer I think this might be wrong repository for Langchain / Langserve related issue. Closing as unrelated to OpenGPTs.
If you think this is wrong, please re-raise the issue.