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

Deprecate old Anthropic and OpenAI providers in favor of "chat" versions of each #394

Open
JasonWeill opened this issue Sep 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@JasonWeill
Copy link
Collaborator

Problem

See #391 and #308. In LangChain, the old Anthropic and OpenAI providers have been deprecated in favor of ChatAnthropic and ChatOpenAI respectively. The old providers remain for compatibility reasons.

Proposed Solution

Un-suppress warnings when users use the old providers, and guide them to use the new chat providers.

Alternatively, redirect anthropic and openai requests to the same models in their chat counterparts.

Update the documentation to reflect this change.

@JasonWeill JasonWeill added the enhancement New feature or request label Sep 22, 2023
@haesleinhuepf
Copy link

Hi, I'd like to second this is an issue. At the moment, %%ai chatgpt... causes this warning and it would be great if it wasn't there.

C:\Users\rober\miniconda3\envs\t311\Lib\site-packages\langchain_community\llms\openai.py:1057: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use: from langchain_community.chat_models import ChatOpenAI
warnings.warn(

image

@JasonWeill
Copy link
Collaborator Author

Pull request #551 addresses the warning you've seen above.

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

No branches or pull requests

2 participants