mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
4db8d82c55
Will run all CI because of _test change, but future PRs against CLI will only trigger the new CLI one Has a bunch of file changes related to formatting/linting. No mypy yet - coming soon
19 lines
399 B
Python
19 lines
399 B
Python
"""
|
|
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
|