Skip to content

langchain integration not compatible with GPT 3.5 or GPT 4 #311

@mmoya91

Description

@mmoya91

Hello, I'm trying to use Azure's OpenAI service with spacy-llm via langchain given that the Azure integration is not currently supported

explosion/spaCy#12653

However, I noticed that the langchain model is using prompting structure that's consistent with openAI GPT-3 and prior rather than GPT-3.5 or GPT-4 which uses langchain.chat_models
https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/chat_models/base.py#L82

rather than langchain.llms
https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/llms/base.py#L158

In particular, this line seems to be referencing langchain.llms

["langchain.llms.base.BaseLLM", Iterable[Any]],

as a result, I'm getting the following error when I try considering a pinned updated version of langchain and GPT-4 or GPT-3.5

openai.error.InvalidRequestError: Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.ChatCompletion'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat/modelFeature: modelsthird partyThird-party software (integrations etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions