Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to langchain-0.1.0 #569

Closed
JasonWeill opened this issue Jan 9, 2024 · 1 comment · Fixed by #572
Closed

Upgrade to langchain-0.1.0 #569

JasonWeill opened this issue Jan 9, 2024 · 1 comment · Fixed by #572
Labels
enhancement New feature or request

Comments

@JasonWeill
Copy link
Collaborator

Problem

LangChain 0.1.0 is now available, the first version of LangChain after the 0.0.x series. Starting with 0.1.x, semantic versioning means that a patch release is not necessarily a breaking change.

LangChain 0.0.350 has a constraint on openai version 0.x, meaning that our fix for #543 is failing in its conda-forge feedstock (conda-forge/jupyter-ai-feedstock#12) despite the fix working locally. Jupyter AI 2.9.0 is available on PyPI (to install using pip) but not on Conda-Forge (to install using conda). In Conda-Forge, LangChain 0.1.0 is constrained to openai 1.x.

Proposed Solution

Upgrade Jupyter AI to use LangChain 0.1.x. Upgrade any other dependencies.

Additional context

@JasonWeill JasonWeill added the enhancement New feature or request label Jan 9, 2024
@JasonWeill
Copy link
Collaborator Author

After upgrading to LangChain 0.1.0, and also upgrading to langchain-core>=0.1.7,<0.2, loading the chat UI produces an unhandled error similar to that seen in #555, fixed in #558 by @dlqqq:

[W 2024-01-08 16:27:11.251 ServerApp] wrote error: 'Unhandled error'
    Traceback (most recent call last):
      File "/opt/miniconda3/envs/jupyter-ai-jl4/lib/python3.11/site-packages/tornado/web.py", line 1784, in _execute
        result = method(*self.path_args, **self.path_kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/miniconda3/envs/jupyter-ai-jl4/lib/python3.11/site-packages/tornado/web.py", line 3290, in wrapper
        return method(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jweill/git/jupyter-ai/packages/jupyter-ai/jupyter_ai/handlers.py", line 305, in get
        ListProvidersEntry(
      File "/opt/miniconda3/envs/jupyter-ai-jl4/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in __init__
        raise validation_error
    pydantic.v1.error_wrappers.ValidationError: 1 validation error for ListProvidersEntry
    name
      str type expected (type=type_error.str)

@JasonWeill JasonWeill linked a pull request Jan 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant