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

community[minor]: JinaAI embeddings integration #5842

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

AvaterClasher
Copy link
Contributor

Description

Implemented a new embedding integration that makes JinaAI's embedding models available on langchainjs. A new class named JinaEmbeddings is created, which wraps the inference API.

This PR includes an example and integration tests related to the newly implemented class. Apart from the new integration's configuration, the original open-source components are intentionally left unchanged to avoid introducing any breaking changes.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 21, 2024
Copy link

vercel bot commented Jun 21, 2024

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 Jun 25, 2024 4:12pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Jun 25, 2024 4:12pm

@dosubot dosubot bot added the auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features label Jun 21, 2024
@@ -0,0 +1,12 @@
import { JinaEmbeddings } from "@langchain/community/embeddings/jina";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! I've noticed that the recent code addition in jina.ts explicitly accesses an environment variable using process.env. I've flagged this for your review to ensure it aligns with our best practices for handling environment variables. Keep up the great work!

@@ -0,0 +1,11 @@
import { JinaEmbeddings } from "@langchain/community/embeddings/jina";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! This PR adds a new HTTP request using the embedQuery method to retrieve embeddings from the Jina API. I've flagged this for your review to ensure it aligns with our API usage guidelines. Let me know if you have any questions or need further clarification!

@@ -0,0 +1,11 @@
import { JinaEmbeddings } from "@langchain/community/embeddings/jina";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! I've flagged the recent change in the PR for maintainers to review, as it explicitly accesses an environment variable using process.env. This is an important security consideration, so it's good to double-check. Let me know if you need further assistance!

@@ -0,0 +1,125 @@
import { existsSync, readFileSync } from "fs";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! I noticed that this PR introduces a new HTTP request using the fetch function to make a POST request to the JINA_API_URL endpoint. I've flagged this change for your review to ensure it aligns with the project's requirements. Let me know if you have any questions or need further clarification!

@@ -0,0 +1,125 @@
import { existsSync, readFileSync } from "fs";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on the PR! I've flagged this change for review by the maintainers as it involves accessing environment variables using the getEnvironmentVariable function. Keep up the good work!

@jacoblee93
Copy link
Collaborator

Thank you!

@jacoblee93 jacoblee93 merged commit bbb7628 into langchain-ai:main Jun 25, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants