File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
packages/langbase/src/langbase Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -922,15 +922,11 @@ export class Langbase {
922922 private async webSearch (
923923 options : ToolWebSearchOptions ,
924924 ) : Promise < ToolWebSearchResponse [ ] > {
925- const apiKey = options . apiKey ? options . apiKey : null ;
926- apiKey && delete options . apiKey ;
927925 return this . request . post ( {
928926 endpoint : '/v1/tools/web-search' ,
929927 body : options ,
930928 headers : {
931- ...( apiKey && {
932- 'LB-WEB-SEARCH-KEY' : apiKey ,
933- } ) ,
929+ 'LB-WEB-SEARCH-KEY' : options . apiKey ,
934930 } ,
935931 } ) ;
936932 }
@@ -944,15 +940,11 @@ export class Langbase {
944940 private async webCrawl (
945941 options : ToolCrawlOptions ,
946942 ) : Promise < ToolCrawlResponse [ ] > {
947- const apiKey = options . apiKey ? options . apiKey : null ;
948- apiKey && delete options . apiKey ;
949943 return this . request . post ( {
950944 endpoint : '/v1/tools/crawl' ,
951945 body : options ,
952946 headers : {
953- ...( apiKey && {
954- 'LB-CRAWL-KEY' : apiKey ,
955- } ) ,
947+ 'LB-CRAWL-KEY' : options . apiKey ,
956948 } ,
957949 } ) ;
958950 }
You can’t perform that action at this time.
0 commit comments