langchainjs icon indicating copy to clipboard operation
langchainjs copied to clipboard

community[minor]: feat: Layerup Security integration

Open JamsheedMistri opened this issue 10 months ago • 8 comments

Description: adds integration with Layerup Security. Docs can be found here. Integrates directly with our TypeScript SDK.

Note: all methods for our product require a paid API key, so I only included 1 test which checks for an invalid API key response. I have tested extensively locally.

Twitter handle: @layerup_

JamsheedMistri avatar Mar 30 '24 00:03 JamsheedMistri

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

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2024 0:23am
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 21, 2024 0:23am

vercel[bot] avatar Mar 30 '24 00:03 vercel[bot]

Thanks, see comments and don't forget to run yarn format + yarn lint

jacoblee93 avatar Apr 03 '24 05:04 jacoblee93

Thanks for your patience! Small typing issue, I would fix but I can't make edits here.

jacoblee93 avatar Apr 05 '24 22:04 jacoblee93

Seems like you need to run yarn again to update the lockfile

I am happy to polish this up if you give me push access to the branch

jacoblee93 avatar Apr 09 '24 00:04 jacoblee93

Seems like you need to run yarn again to update the lockfile

I am happy to polish this up if you give me push access to the branch

I tried this but it didn't do anything. Added you to the repo!

JamsheedMistri avatar Apr 09 '24 00:04 JamsheedMistri

I think there's something wrong with the SDK types:

Error: @langchain/community:build: ../../node_modules/@layerup/layerup-security/types.ts(1,44): error TS2307: Cannot find module 'openai/resources' or its corresponding type declarations.

jacoblee93 avatar Apr 11 '24 20:04 jacoblee93

@jacoblee93 Looks like some parts of the repo had the @layerup/layerup-security SDK on version 1.5.6, which had a types import bug for OpenAI. I just bumped the remaining imports from 1.5.6 to 1.5.9 which should fix the issue.

JamsheedMistri avatar Apr 15 '24 19:04 JamsheedMistri

Still failing with:

Cannot find module 'openai/resources' or its corresponding type declarations.

You should also run yarn to update the lockfile if you update an SDK version

jacoblee93 avatar Apr 15 '24 22:04 jacoblee93

Thank you!

jacoblee93 avatar May 21 '24 00:05 jacoblee93