File tree 4 files changed +7
-5
lines changed
4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 108
108
"@ai-sdk/openai" : " ^1.0.15" ,
109
109
"@upstash/qstash" : " ^2.7.20" ,
110
110
"ai" : " ^4.0.30" ,
111
- "langchain" : " ^0.3.11" ,
112
111
"zod" : " ^3.24.1"
113
112
},
114
113
"directories" : {
Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ export const convertLangchainTool = (langchainTool: LangchainTool): AISDKTool =>
99
99
return tool ( {
100
100
description : langchainTool . description ,
101
101
parameters : langchainTool . schema ,
102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
- execute : async ( param : any ) => langchainTool . invoke ( param ) ,
102
+ execute : async ( ...param : unknown [ ] ) => langchainTool . invoke ( ...param ) ,
104
103
} ) ;
105
104
} ;
Original file line number Diff line number Diff line change 1
1
import type { CoreTool , generateText } from "ai" ;
2
- import type { Tool } from "langchain/tools" ;
3
2
import { Agent } from "./agent" ;
4
3
5
4
export type AISDKTool = CoreTool ;
6
- export type LangchainTool = Tool ;
5
+ export type LangchainTool = {
6
+ description : string ;
7
+ schema : AISDKTool [ "parameters" ] ;
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
+ invoke : ( ...params : any [ ] ) => any ;
10
+ } ;
7
11
8
12
type GenerateTextParams = Parameters < typeof generateText > [ 0 ] ;
9
13
You can’t perform that action at this time.
0 commit comments