create-langchain-integration
Advanced tools
Comparing version 0.0.11 to 0.0.12
{ | ||
"name": "langchain-integration", | ||
"version": "0.0.0", | ||
"description": "Sample integration for LangChain.js", | ||
"description": "Sample INTEGRATION_SHORT_NAME integration for LangChain.js", | ||
"type": "module", | ||
@@ -15,3 +15,3 @@ "engines": { | ||
}, | ||
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-INTEGRATION_NAME/", | ||
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/INTEGRATION_NAME/", | ||
"scripts": { | ||
@@ -35,4 +35,4 @@ "build": "yarn turbo:command build:internal --filter=@langchain/INTEGRATION_NAME", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@langchain/core": ">0.1.0 <0.3.0" | ||
"peerDependencies": { | ||
"@langchain/core": ">=0.3.0 <0.4.0" | ||
}, | ||
@@ -43,3 +43,4 @@ "devDependencies": { | ||
"@swc/jest": "^0.2.29", | ||
"@langchain/scripts": "^0.0.23", | ||
"@langchain/core": "workspace:*", | ||
"@langchain/scripts": ">=0.1.0 <0.2.0", | ||
"@tsconfig/recommended": "^1.0.3", | ||
@@ -69,3 +70,7 @@ "@typescript-eslint/eslint-plugin": "^6.12.0", | ||
".": { | ||
"types": "./index.d.ts", | ||
"types": { | ||
"import": "./index.d.ts", | ||
"require": "./index.d.cts", | ||
"default": "./index.d.ts" | ||
}, | ||
"import": "./index.js", | ||
@@ -80,4 +85,5 @@ "require": "./index.cjs" | ||
"index.js", | ||
"index.d.ts" | ||
"index.d.ts", | ||
"index.d.cts" | ||
] | ||
} | ||
} |
@@ -19,2 +19,8 @@ import { type BaseMessage } from "@langchain/core/messages"; | ||
// Uncomment if implementing tool calling | ||
// import { | ||
// type BindToolsInput, | ||
// } from "@langchain/core/language_models/chat_models"; | ||
/** | ||
@@ -28,6 +34,6 @@ * Input to chat model class. | ||
*/ | ||
export class ChatIntegration< | ||
CallOptions extends BaseLanguageModelCallOptions = BaseLanguageModelCallOptions | ||
> | ||
extends SimpleChatModel<CallOptions> | ||
export class ChatIntegration | ||
// Extend BaseLanguageModelCallOptions and pass it as the generic here | ||
// to support typing for additional runtime parameters for your integration | ||
extends SimpleChatModel<BaseLanguageModelCallOptions> | ||
implements ChatIntegrationInput | ||
@@ -103,2 +109,18 @@ { | ||
/** | ||
* Implement to support tool calling. | ||
* You must also pass the bound tools into your actual chat completion call. | ||
* See {@link ../../langchain-cerberas/src/chat_model.ts} for | ||
* an example. | ||
*/ | ||
// override bindTools( | ||
// tools: BindToolsInput[], | ||
// kwargs?: Partial<this["ParsedCallOptions"]> | ||
// ): Runnable<BaseLanguageModelInput, AIMessageChunk, BaseLanguageModelCallOptions> { | ||
// return this.bind({ | ||
// tools: tools.map((tool) => convertToIntegrationFormat(tool)), | ||
// ...kwargs, | ||
// }); | ||
// } | ||
/** @ignore */ | ||
@@ -105,0 +127,0 @@ _combineLLMOutput() { |
{ | ||
"name": "create-langchain-integration", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"repository": { | ||
@@ -12,3 +12,3 @@ "type": "git", | ||
"dev": "ncc build ./index.ts -w -o dist/", | ||
"build": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register && cp ./template/.eslintrc.cjs ./template/.prettierrc ./template/.release-it.json ./dist/template", | ||
"build": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register && cp ./template/.env.example ./template/.eslintrc.cjs ./template/.prettierrc ./template/.release-it.json ./dist/template", | ||
"format": "prettier --config .prettierrc --write \"./helpers\"", | ||
@@ -15,0 +15,0 @@ "format:check": "prettier --config .prettierrc --check \"./helpers\"", |
{ | ||
"name": "langchain-integration", | ||
"version": "0.0.0", | ||
"description": "Sample integration for LangChain.js", | ||
"description": "Sample INTEGRATION_SHORT_NAME integration for LangChain.js", | ||
"type": "module", | ||
@@ -15,3 +15,3 @@ "engines": { | ||
}, | ||
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-INTEGRATION_NAME/", | ||
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/INTEGRATION_NAME/", | ||
"scripts": { | ||
@@ -35,4 +35,4 @@ "build": "yarn turbo:command build:internal --filter=@langchain/INTEGRATION_NAME", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@langchain/core": ">0.1.0 <0.3.0" | ||
"peerDependencies": { | ||
"@langchain/core": ">=0.3.0 <0.4.0" | ||
}, | ||
@@ -43,3 +43,4 @@ "devDependencies": { | ||
"@swc/jest": "^0.2.29", | ||
"@langchain/scripts": "^0.0.23", | ||
"@langchain/core": "workspace:*", | ||
"@langchain/scripts": ">=0.1.0 <0.2.0", | ||
"@tsconfig/recommended": "^1.0.3", | ||
@@ -69,3 +70,7 @@ "@typescript-eslint/eslint-plugin": "^6.12.0", | ||
".": { | ||
"types": "./index.d.ts", | ||
"types": { | ||
"import": "./index.d.ts", | ||
"require": "./index.d.cts", | ||
"default": "./index.d.ts" | ||
}, | ||
"import": "./index.js", | ||
@@ -80,4 +85,5 @@ "require": "./index.cjs" | ||
"index.js", | ||
"index.d.ts" | ||
"index.d.ts", | ||
"index.d.cts" | ||
] | ||
} | ||
} |
@@ -8,7 +8,7 @@ # @langchain/<ADD_PACKAGE_NAME_HERE> | ||
```bash npm2yarn | ||
npm install @langchain/<ADD_PACKAGE_NAME_HERE> | ||
npm install @langchain/<ADD_PACKAGE_NAME_HERE> @langchain/core | ||
``` | ||
This package, along with the main LangChain package, depends on [`@langchain/core`](https://npmjs.com/package/@langchain/core/). | ||
If you are using this package with other LangChain packages, you should make sure that all of the packages depend on the same instance of @langchain/core. | ||
If you are using this package with other LangChain packages, you should make sure that all of the packages depend on the same instance of `@langchain/core`. | ||
You can do so by adding appropriate field to your project's `package.json` like this: | ||
@@ -22,13 +22,13 @@ | ||
"@langchain/<ADD_PACKAGE_NAME_HERE>": "^0.0.0", | ||
"langchain": "0.0.207" | ||
"@langchain/core": "^0.3.0" | ||
}, | ||
"resolutions": { | ||
"@langchain/core": "0.1.5" | ||
"@langchain/core": "^0.3.0" | ||
}, | ||
"overrides": { | ||
"@langchain/core": "0.1.5" | ||
"@langchain/core": "^0.3.0" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"@langchain/core": "0.1.5" | ||
"@langchain/core": "^0.3.0" | ||
} | ||
@@ -35,0 +35,0 @@ } |
@@ -19,2 +19,8 @@ import { type BaseMessage } from "@langchain/core/messages"; | ||
// Uncomment if implementing tool calling | ||
// import { | ||
// type BindToolsInput, | ||
// } from "@langchain/core/language_models/chat_models"; | ||
/** | ||
@@ -28,6 +34,6 @@ * Input to chat model class. | ||
*/ | ||
export class ChatIntegration< | ||
CallOptions extends BaseLanguageModelCallOptions = BaseLanguageModelCallOptions | ||
> | ||
extends SimpleChatModel<CallOptions> | ||
export class ChatIntegration | ||
// Extend BaseLanguageModelCallOptions and pass it as the generic here | ||
// to support typing for additional runtime parameters for your integration | ||
extends SimpleChatModel<BaseLanguageModelCallOptions> | ||
implements ChatIntegrationInput | ||
@@ -103,2 +109,18 @@ { | ||
/** | ||
* Implement to support tool calling. | ||
* You must also pass the bound tools into your actual chat completion call. | ||
* See {@link ../../langchain-cerberas/src/chat_model.ts} for | ||
* an example. | ||
*/ | ||
// override bindTools( | ||
// tools: BindToolsInput[], | ||
// kwargs?: Partial<this["ParsedCallOptions"]> | ||
// ): Runnable<BaseLanguageModelInput, AIMessageChunk, BaseLanguageModelCallOptions> { | ||
// return this.bind({ | ||
// tools: tools.map((tool) => convertToIntegrationFormat(tool)), | ||
// ...kwargs, | ||
// }); | ||
// } | ||
/** @ignore */ | ||
@@ -105,0 +127,0 @@ _combineLLMOutput() { |
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
523579
70
3192
4