Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
Erick Friis
2023-10-25 11:06:58 -07:00
committed by GitHub
parent 07c2649753
commit 47070b8314
31 changed files with 5549 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
"""
Development Scripts for Hub Packages
"""
from fastapi import FastAPI
from langserve.packages import add_package_route
from langchain_cli.utils.packages import get_package_root
def create_demo_server():
"""
Creates a demo server for the current hub package.
"""
app = FastAPI()
package_root = get_package_root()
add_package_route(app, package_root, "")
return app