mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-05 09:25:14 +03:00
fix some stuff (#12292)
Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
1 parent
6ce276e099
commit
9ce38726a2
21 files changed
+17
-3033
No files matched your search
File renamed without changes.
+12
-2
@@ -16,8 +16,6 @@ Install a package
|
||||
|
||||
`langchain serve add extraction-summary`
|
||||
|
||||
(Activate virtualenv)
|
||||
|
||||
Install langserve
|
||||
|
||||
`pip install "langserve[all]"`
|
||||
@@ -38,6 +36,18 @@ app = FastAPI()
|
||||
add_routes(app, chain)
|
||||
```
|
||||
|
||||
Set env vars
|
||||
|
||||
```shell
|
||||
export OPENAI_API_KEY=...
|
||||
```
|
||||
```shell
|
||||
export LANGCHAIN_TRACING_V2=true
|
||||
export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
|
||||
export LANGCHAIN_API_KEY="<your-api-key>"
|
||||
export LANGCHAIN_PROJECT="extraction-summary"
|
||||
```
|
||||
|
||||
Run the app
|
||||
|
||||
`python app/server.py`
|
||||
@@ -1,3 +1,4 @@
|
||||
DEFAULT_GIT_REPO = "https://github.com/langchain-ai/langchain.git"
|
||||
DEFAULT_GIT_REF = "langserve-templates"
|
||||
DEFAULT_GIT_SUBDIRECTORY = "templates"
|
||||
DEFAULT_GIT_REF = "master"
|
||||
@@ -30,7 +30,7 @@ def new(
|
||||
destination_dir = Path.cwd() / name if name != "." else Path.cwd()
|
||||
|
||||
# copy over template from ../package_template
|
||||
project_template_dir = Path(__file__).parent.parent.parent / "package_template"
|
||||
project_template_dir = Path(__file__).parents[1] / "package_template"
|
||||
shutil.copytree(project_template_dir, destination_dir, dirs_exist_ok=name == ".")
|
||||
|
||||
package_name_split = computed_name.split("/")
|
||||
|
||||
@@ -42,7 +42,7 @@ def new(
|
||||
Create a new LangServe application.
|
||||
"""
|
||||
# copy over template from ../project_template
|
||||
project_template_dir = Path(__file__).parent.parent.parent / "project_template"
|
||||
project_template_dir = Path(__file__).parents[1] / "project_template"
|
||||
destination_dir = Path.cwd() / name if name != "." else Path.cwd()
|
||||
shutil.copytree(project_template_dir, destination_dir, dirs_exist_ok=name == ".")
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -13,8 +13,8 @@ fastapi = "^0.104.0"
|
||||
sse-starlette = "^1.6.5"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
langchain-cli = {git = "https://github.com/langchain-ai/langchain.git", rev = "erick/cli", subdirectory = "libs/cli"}
|
||||
poethepoet = "^0.24.1"
|
||||
langchain-cli = ">=0.0.1rc2"
|
||||
|
||||
[tool.langserve]
|
||||
export_module = "__package_name__.chain"
|
||||
File renamed without changes.
File renamed without changes.
Whitespace-only changes.
File renamed without changes.
Whitespace-only changes.
+1
-1
@@ -11,7 +11,7 @@ sse-starlette = "^1.6.5"
|
||||
tomli-w = "^1.0.0"
|
||||
uvicorn = "^0.23.2"
|
||||
fastapi = "^0.103.2"
|
||||
langserve = {git = "https://github.com/langchain-ai/langserve"}
|
||||
langserve = ">=0.0.16"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
poethepoet = "^0.24.1"
|
||||
@@ -67,7 +67,6 @@ def parse_dependency_string(package_string: str) -> DependencySource:
|
||||
raise NotImplementedError("url dependencies are not supported yet")
|
||||
else:
|
||||
# it's a default git repo dependency
|
||||
gitstring = DEFAULT_GIT_REPO
|
||||
subdirectory = str(Path(DEFAULT_GIT_SUBDIRECTORY) / package_string)
|
||||
return DependencySource(
|
||||
git=gitstring, ref=DEFAULT_GIT_REF, subdirectory=subdirectory
|
||||
|
||||
Generated
-1452
File diff suppressed because it is too large.
Load diff
Generated
-1570
File diff suppressed because it is too large.
Load diff
@@ -4,10 +4,6 @@ version = "0.0.3"
|
||||
description = "CLI for interacting with LangChain"
|
||||
authors = ["Erick Friis <erick@langchain.dev>"]
|
||||
readme = "README.md"
|
||||
include = [
|
||||
{path="project_template/**/*", format="wheel"},
|
||||
{path="package_template/**/*", format="wheel"}
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.8.1,<4.0"
|
||||
|
||||
Reference in new issue
Block a user