Skip to content

Commit

Permalink
feat(fix security vulnerability; update to langchain = "^0.0.308"):
Browse files Browse the repository at this point in the history
  • Loading branch information
msoedov committed Oct 5, 2023
1 parent 8ffd221 commit ed8bb32
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 140 deletions.
3 changes: 2 additions & 1 deletion examples/ex12.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from langchain import LLMChain, PromptTemplate
from langchain.chains import LLMChain
from langchain.llms import OpenAI
from langchain.output_parsers import PydanticOutputParser
from langchain.prompts import PromptTemplate
from pydantic import BaseModel, Field, validator


Expand Down
3 changes: 2 additions & 1 deletion examples/ex3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

from langchain import LLMMathChain, OpenAI
from langchain.chains import LLMMathChain
from langchain.llms import OpenAI

os.environ["OPENAI_API_KEY"] = os.environ.get("OPENAI_API_KEY", "sk-********")

Expand Down
2 changes: 1 addition & 1 deletion examples/ex4.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os

from langchain import PromptTemplate
from langchain.chains import LLMChain, LLMRequestsChain, SequentialChain
from langchain.llms import OpenAI
from langchain.prompts import PromptTemplate

os.environ["OPENAI_API_KEY"] = os.environ.get("OPENAI_API_KEY", "sk-********")

Expand Down
2 changes: 1 addition & 1 deletion examples/ex7_agent.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from langchain import LLMMathChain
from langchain.agents.tools import Tool
from langchain.chains import LLMMathChain
from langchain.chat_models import ChatOpenAI
from langchain.llms import OpenAI
from langchain_experimental.plan_and_execute import (
Expand Down
2 changes: 1 addition & 1 deletion examples/ex9_double_chain.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from langchain import LLMMathChain
from langchain.chains import LLMMathChain
from langchain.llms import OpenAI

os.environ["OPENAI_API_KEY"] = os.environ.get("OPENAI_API_KEY", "sk-********")
Expand Down
250 changes: 126 additions & 124 deletions poetry.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[tool.poetry]
name = "langcorn"
version = "0.0.17"
version = "0.0.18"
description = "A Python package creating rest api interface for LangChain"
authors = ["Alexander Miasoiedov <[email protected]>"]
maintainers = ["Alexander Miasoiedov <[email protected]>"]
repository = "https://github.com/msoedov/langcorn"
license = "MIT"
readme = "Readme.md"
keywords = ["nlp", "langchain", "openai", "gpt", "fastapi", "llm"]
keywords = ["nlp", "langchain", "openai", "gpt", "fastapi", "llm", "llmops"]
packages = [{ include = "langcorn", from = "." }]


Expand All @@ -16,24 +16,24 @@ langcorn = "langcorn.__main__:entrypoint"

[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.101.0"
fastapi = "^0.103.2"
uvicorn = "^0.23.2"
langchain = "^0.0.283"
openai = "^0.28.0"
langchain = "^0.0.308"
openai = "^0.28.1"
fire = "^0.5.0"
loguru = "^0.7.0"
loguru = "^0.7.2"
bs4 = "0.0.1" # required for ex4.py
langchain-experimental = "^0.0.14"
certifi = "^2023.7.22"

[tool.poetry.group.dev.dependencies]
black = "^23.7.0"
black = "^23.9.1"
mypy = "^1.5.1"
httpx = "^0.24.1"
pytest = "^7.4.1"
types-requests = "^2.31.0.1"
httpx = "^0.25.0"
pytest = "^7.4.2"
pre-commit = "^3.4.0"
chromadb = "^0.3.2.6" # required for ex8.py
numexpr = "^2.6.1"
chromadb = "^0.3.2.6" # required for ex8.py

[tool.ruff]
line-length = 120
Expand Down

1 comment on commit ed8bb32

@vercel
Copy link

@vercel vercel bot commented on ed8bb32 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

langcorn – ./

langcorn-git-main-msoedov.vercel.app
langcorn-msoedov.vercel.app
langcorn.vercel.app

Please sign in to comment.