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

Fix anthropic sdk import #7334

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Conversation

brichet
Copy link
Contributor

@brichet brichet commented Dec 9, 2024

This PR fixes an error when importing ChatAnthropic, due to missing declaration file.

Fixes #7332

Copy link

vercel bot commented Dec 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Dec 9, 2024 11:25am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Dec 9, 2024 11:25am

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. auto:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Dec 9, 2024
@jacoblee93
Copy link
Collaborator

Thank you - CC @bracesproul

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Dec 9, 2024
@bracesproul
Copy link
Member

hey @brichet thank you for doing this! I tested locally with the tsconfig that's inside our examples directory and I wasn't able to reproduce this error. We should still merge your PR since those imports look safer, but could you also send me your tsconfig from the project that this error occurred in? There might be some config we could change in our CI to hopefully catch issues like this in the future.

Thank you!

@jacoblee93 jacoblee93 merged commit c5c1ac1 into langchain-ai:main Dec 9, 2024
32 checks passed
@jacoblee93
Copy link
Collaborator

Thanks @brichet, it's live in @langchain/anthropic@0.3.9

Please see @bracesproul's note above as we'd love to get our CI up to speed on things like this

@brichet brichet deleted the fix_anthropic_import branch December 10, 2024 07:48
@brichet
Copy link
Contributor Author

brichet commented Dec 10, 2024

Thanks for merging it so quickly.
Sorry for the lack of context, this error occurs in this PR, I needed to add a "types" module to avoid it.

The tsconfig in this repo has no exclusion.

syntaxsec pushed a commit to aks-456/langchainjs that referenced this pull request Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PRs that are ready to be merged as-is size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error importing @langchain/anthropic
3 participants