mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 03:26:17 +00:00
Confirm sys.path includes current dir for app serve (#12851)
- Make sure sys.path is set properly for langchain app serve - bump
This commit is contained in:
@@ -4,6 +4,7 @@ Manage LangChain apps
|
||||
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
|
||||
@@ -219,6 +220,9 @@ def serve(
|
||||
Starts the LangServe app.
|
||||
"""
|
||||
|
||||
# add current dir as first entry of path
|
||||
sys.path.append(str(Path.cwd()))
|
||||
|
||||
app_str = app if app is not None else "app.server:app"
|
||||
host_str = host if host is not None else "127.0.0.1"
|
||||
|
||||
|
Reference in New Issue
Block a user