mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-03 20:16:52 +00:00
17
libs/cli/langchain_cli/dev_scripts.py
Normal file
17
libs/cli/langchain_cli/dev_scripts.py
Normal 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
|
Reference in New Issue
Block a user