-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
groq[major]: ChatGroq (groq integration package) #4467
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,20 @@ | |||
import { ChatGroq } from "@langchain/groq"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there! I've reviewed the code and noticed that the addition explicitly accesses an environment variable using process.env
. I've flagged this for your review to ensure it aligns with our best practices. Let me know if you need further assistance!
@@ -0,0 +1,52 @@ | |||
import { ChatGroq } from "@langchain/groq"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey team, just a heads up that I've flagged a change in the PR that accesses an environment variable using process.env
. It's always good to review these changes to ensure proper handling of sensitive information. Keep up the great work!
@@ -0,0 +1,94 @@ | |||
{ |
There was a problem hiding this comment.
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 changes to the project's dependencies, including both peer and dev dependencies. I've flagged this for your review as it's important to ensure the compatibility and stability of the project. Keep up the great work!
@@ -0,0 +1,350 @@ | |||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there! 👋 This is a friendly flag to highlight that the recent changes in the code are accessing environment variables via process.env
and getEnvironmentVariable
. This is an important change that should be reviewed by the maintainers. Great work on the code! 🚀
For the python integration I was asked to add a provider doc page. I assume there's something similar for JS. Here's an example from my PR: |
const res = await chat.invoke([message]); | ||
``` | ||
|
||
## Development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice development section. I'm going to add this to the python readme.
const messagesMapped = convertMessagesToGroqParams(messages); | ||
|
||
if (params.stream) { | ||
console.log("streaming via _generate"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove log
LGTM! Remove that log and let's ship. |
At the moment, just the chat model page for JS! You're all good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this done for us.
apiKey, | ||
}); | ||
this.temperature = fields?.temperature ?? this.temperature; | ||
this.modelName = fields?.modelName ?? this.modelName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we pass the stream
here?
this.stream = fields?.stream ?? this.stream;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, the recommended way of streaming is via the .stream
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we deprecating the streaming
property as well (for other chat models)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bracesproul we should add this - there are niche but legit use cases for invoke with aggregating token information (a big one is agent streamLog
actually).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be in soon! https://github.com/langchain-ai/langchainjs/pull/4573/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appreciate the quick action as always!
No description provided.