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

Inconsistent behavior with %%ai openai-chat:gpt-4 and %%ai openai-chat:gpt-3.5-turbo #652

Closed
startakovsky opened this issue Feb 25, 2024 · 2 comments · Fixed by #653
Closed
Labels
bug Something isn't working

Comments

@startakovsky
Copy link
Contributor

startakovsky commented Feb 25, 2024

Description

Looks like I am getting an error when using the product as directed. See annotated screenshot below indicating:

  1. The failure of %%ai openai-chat:gpt-4
  2. The success of %%ai openai-chat:gpt-3.5-turbo
  3. The success of using the openai python library's chat.completions endpoint.
Error code: 404 - {'error': {'message': 'The model `gpt-4` does not exist or you do not have access to it. Learn more: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

Reproduce

image

@startakovsky startakovsky added the bug Something isn't working label Feb 25, 2024
@startakovsky
Copy link
Contributor Author

startakovsky commented Feb 25, 2024

Seems that this relies on this code from langchain, and it's deprecated. Wonder if that has to do with anything.

from langchain_community.chat_models import (
AzureChatOpenAI,
BedrockChat,
ChatAnthropic,
ChatOpenAI,
QianfanChatEndpoint,
)

Screenshots of ChatOpenAI and AzureChatOpenAI being deprecated from within the langchain_community module directory.

ChatOpenAI deprecation redirect to langchain_openai

image

AzureChatOpenAI deprecation to langchain_openai

image

@startakovsky
Copy link
Contributor Author

Yeah . . looks like the langchain link says the alternative (according to the kwargs passed to the deprecated decorator would be to do this:

from langchain_openai.chat_models import (
    AzureChatOpenAI,
    ChatOpenAI,
)

I must say this is strange because I would think langchain would be wanting to provide that consistency to its community, but I'm sure they had a good reason.

@dlqqq dlqqq added this to the Priority milestone Mar 7, 2024
@dlqqq dlqqq removed this from the Priority milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants