Skip to content

fix: replace deprecated ChatResponse import with V2ChatResponse alias…#147

Open
Henning Kubatzsch (Henning-Kubatzsch) wants to merge 1 commit into
langchain-ai:mainfrom
Henning-Kubatzsch:fix/chatresponse-v2chatresponse-import
Open

fix: replace deprecated ChatResponse import with V2ChatResponse alias…#147
Henning Kubatzsch (Henning-Kubatzsch) wants to merge 1 commit into
langchain-ai:mainfrom
Henning-Kubatzsch:fix/chatresponse-v2chatresponse-import

Conversation

@Henning-Kubatzsch
Copy link
Copy Markdown

This PR addresses issue #146 by replacing the import of the deprecated ChatResponse type with V2ChatResponse aliased as ChatResponse.
This change ensures compatibility with Cohere SDK versions >= 5.0, where ChatResponse is no longer exposed directly.

All references remain as ChatResponse to minimize downstream impact while aligning with the updated SDK structure.

@Henning-Kubatzsch
Copy link
Copy Markdown
Author

Namespace ChatResponse V2ChatResponse
cohere ✅ <class 'V2ChatResponse'> ✅ <class 'V2ChatResponse'>
cohere.types ✅ <class 'V2ChatResponse'> (Alias) ⚠️ typing.Annotated[...] (Union)
cohere.v2.types ⚠️ typing.Annotated[...] (Union) ✅ <class 'V2ChatResponse'>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant