-
Notifications
You must be signed in to change notification settings - Fork 42
fix: lock langchain version #391
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,10 @@ | ||||||||||||||||||||||||||||||||||||||||||
| import { createMiddleware } from 'langchain'; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| type createMiddlewareParams = Parameters<typeof createMiddleware>['0']; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| export abstract class TeggAgentMiddleware implements createMiddlewareParams { | ||||||||||||||||||||||||||||||||||||||||||
| name; | ||||||||||||||||||||||||||||||||||||||||||
| constructor() { | ||||||||||||||||||||||||||||||||||||||||||
| this.name = this.constructor.name; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Signature (TypeScript, simplified): import { AgentMiddleware } from "langchain"; declare function createMiddleware<
References: LangChain createMiddleware docs and AgentMiddleware/type refs. [1][2][3] Sources 🏁 Script executed: # Search the codebase for any imports or usage of createMiddleware
rg "createMiddleware" --type ts --type tsx -B 2 -A 2
# Look for langchain imports in the codebase
rg "from 'langchain'" --type ts --type tsx | head -20
# Check if there's a package.json to see langchain version
cat package.json | grep -A 5 -B 5 langchainRepository: eggjs/tegg Length of output: 164 TypeScript implementation error: class cannot safely implement The config object expected by Remove the Suggested approach import { createMiddleware } from 'langchain';
-type createMiddlewareParams = Parameters<typeof createMiddleware>['0'];
+export type CreateMiddlewareParams = Parameters<typeof createMiddleware>[0];
-export abstract class TeggAgentMiddleware implements createMiddlewareParams {
- name;
+export abstract class TeggAgentMiddleware {
+ public readonly name: string;
constructor() {
this.name = this.constructor.name;
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
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.
While you've pinned the versions for
@langchain/core,@langchain/langgraph, andlangchain, other langchain-related dependencies like@langchain/community(line 43) and@langchain/openai(line 46) are still using version ranges. For consistency and to fully achieve the goal of locking langchain versions, consider pinning these as well.