Skip to content

Commit

Permalink
moved to community
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jun 27, 2024
1 parent 133b341 commit 8e259b6
Show file tree
Hide file tree
Showing 23 changed files with 449 additions and 54 deletions.
5 changes: 3 additions & 2 deletions docs/core_docs/docs/integrations/chat/chrome_ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import CodeBlock from "@theme/CodeBlock";
:::info
This feature is **experimental** and is subject to change.
:::

:::note
The `Built-in AI Early Preview Program` by Google is currently in beta. To apply for access or find more information, please visit [this link](https://developer.chrome.com/docs/ai/built-in).
:::
Expand All @@ -23,7 +24,7 @@ Once you've been granted access to the program, follow all steps to download the
Once downloaded, you can start using `ChatChromeAI` in the browser as follows:

```typescript
import { ChatChromeAI } from "langchain/experimental/chat_models/chrome_ai";
import { ChatChromeAI } from "@langchain/community/experimental/chat_models/chrome_ai";
import { HumanMessage } from "@langchain/core/messages";

const model = new ChatChromeAI({
Expand Down Expand Up @@ -55,4 +56,4 @@ for await (const chunk of await model.stream([message])) {
```

We also have a simple demo application which you can copy to instantly start running `ChatChromeAI` in your browser.
Navigate to the [README.md](https://github.com/langchain-ai/langchainjs/tree/main/langchain/src/experimental/chrome_ai/app/README.md) in the `./app` directory of the integration for more instructions.
Navigate to the [README.md](https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-community/src/experimental/chrome_ai/app/README.md) in the `./app` directory of the integration for more instructions.
1 change: 0 additions & 1 deletion environment_tests/test-exports-bun/src/entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export * from "langchain/experimental/babyagi";
export * from "langchain/experimental/generative_agents";
export * from "langchain/experimental/plan_and_execute";
export * from "langchain/experimental/chains/violation_of_expectations";
export * from "langchain/experimental/chat_models/chrome_ai";
export * from "langchain/experimental/masking";
export * from "langchain/experimental/prompts/custom_format";
export * from "langchain/evaluation";
Expand Down
1 change: 0 additions & 1 deletion environment_tests/test-exports-cf/src/entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export * from "langchain/experimental/babyagi";
export * from "langchain/experimental/generative_agents";
export * from "langchain/experimental/plan_and_execute";
export * from "langchain/experimental/chains/violation_of_expectations";
export * from "langchain/experimental/chat_models/chrome_ai";
export * from "langchain/experimental/masking";
export * from "langchain/experimental/prompts/custom_format";
export * from "langchain/evaluation";
Expand Down
1 change: 0 additions & 1 deletion environment_tests/test-exports-cjs/src/entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const experimental_babyagi = require("langchain/experimental/babyagi");
const experimental_generative_agents = require("langchain/experimental/generative_agents");
const experimental_plan_and_execute = require("langchain/experimental/plan_and_execute");
const experimental_chains_violation_of_expectations = require("langchain/experimental/chains/violation_of_expectations");
const experimental_chat_models_chrome_ai = require("langchain/experimental/chat_models/chrome_ai");
const experimental_masking = require("langchain/experimental/masking");
const experimental_prompts_custom_format = require("langchain/experimental/prompts/custom_format");
const evaluation = require("langchain/evaluation");
Expand Down
1 change: 0 additions & 1 deletion environment_tests/test-exports-esbuild/src/entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ import * as experimental_babyagi from "langchain/experimental/babyagi";
import * as experimental_generative_agents from "langchain/experimental/generative_agents";
import * as experimental_plan_and_execute from "langchain/experimental/plan_and_execute";
import * as experimental_chains_violation_of_expectations from "langchain/experimental/chains/violation_of_expectations";
import * as experimental_chat_models_chrome_ai from "langchain/experimental/chat_models/chrome_ai";
import * as experimental_masking from "langchain/experimental/masking";
import * as experimental_prompts_custom_format from "langchain/experimental/prompts/custom_format";
import * as evaluation from "langchain/evaluation";
Expand Down
1 change: 0 additions & 1 deletion environment_tests/test-exports-esm/src/entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ import * as experimental_babyagi from "langchain/experimental/babyagi";
import * as experimental_generative_agents from "langchain/experimental/generative_agents";
import * as experimental_plan_and_execute from "langchain/experimental/plan_and_execute";
import * as experimental_chains_violation_of_expectations from "langchain/experimental/chains/violation_of_expectations";
import * as experimental_chat_models_chrome_ai from "langchain/experimental/chat_models/chrome_ai";
import * as experimental_masking from "langchain/experimental/masking";
import * as experimental_prompts_custom_format from "langchain/experimental/prompts/custom_format";
import * as evaluation from "langchain/evaluation";
Expand Down
1 change: 0 additions & 1 deletion environment_tests/test-exports-vercel/src/entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export * from "langchain/experimental/babyagi";
export * from "langchain/experimental/generative_agents";
export * from "langchain/experimental/plan_and_execute";
export * from "langchain/experimental/chains/violation_of_expectations";
export * from "langchain/experimental/chat_models/chrome_ai";
export * from "langchain/experimental/masking";
export * from "langchain/experimental/prompts/custom_format";
export * from "langchain/evaluation";
Expand Down
1 change: 0 additions & 1 deletion environment_tests/test-exports-vite/src/entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export * from "langchain/experimental/babyagi";
export * from "langchain/experimental/generative_agents";
export * from "langchain/experimental/plan_and_execute";
export * from "langchain/experimental/chains/violation_of_expectations";
export * from "langchain/experimental/chat_models/chrome_ai";
export * from "langchain/experimental/masking";
export * from "langchain/experimental/prompts/custom_format";
export * from "langchain/evaluation";
Expand Down
4 changes: 0 additions & 4 deletions langchain/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,6 @@ experimental/chains/violation_of_expectations.cjs
experimental/chains/violation_of_expectations.js
experimental/chains/violation_of_expectations.d.ts
experimental/chains/violation_of_expectations.d.cts
experimental/chat_models/chrome_ai.cjs
experimental/chat_models/chrome_ai.js
experimental/chat_models/chrome_ai.d.ts
experimental/chat_models/chrome_ai.d.cts
experimental/masking.cjs
experimental/masking.js
experimental/masking.d.ts
Expand Down
1 change: 0 additions & 1 deletion langchain/langchain.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ export const config = {
"experimental/plan_and_execute": "experimental/plan_and_execute/index",
"experimental/chains/violation_of_expectations":
"experimental/chains/violation_of_expectations/index",
"experimental/chat_models/chrome_ai": "experimental/chrome_ai/chat_models",
"experimental/masking": "experimental/masking/index",
"experimental/prompts/custom_format": "experimental/prompts/custom_format",
"experimental/prompts/handlebars": "experimental/prompts/handlebars",
Expand Down
13 changes: 0 additions & 13 deletions langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,6 @@
"experimental/chains/violation_of_expectations.js",
"experimental/chains/violation_of_expectations.d.ts",
"experimental/chains/violation_of_expectations.d.cts",
"experimental/chat_models/chrome_ai.cjs",
"experimental/chat_models/chrome_ai.js",
"experimental/chat_models/chrome_ai.d.ts",
"experimental/chat_models/chrome_ai.d.cts",
"experimental/masking.cjs",
"experimental/masking.js",
"experimental/masking.d.ts",
Expand Down Expand Up @@ -2079,15 +2075,6 @@
"import": "./experimental/chains/violation_of_expectations.js",
"require": "./experimental/chains/violation_of_expectations.cjs"
},
"./experimental/chat_models/chrome_ai": {
"types": {
"import": "./experimental/chat_models/chrome_ai.d.ts",
"require": "./experimental/chat_models/chrome_ai.d.cts",
"default": "./experimental/chat_models/chrome_ai.d.ts"
},
"import": "./experimental/chat_models/chrome_ai.js",
"require": "./experimental/chat_models/chrome_ai.cjs"
},
"./experimental/masking": {
"types": {
"import": "./experimental/masking.d.ts",
Expand Down
1 change: 0 additions & 1 deletion langchain/src/load/import_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export * as experimental__babyagi from "../experimental/babyagi/index.js";
export * as experimental__generative_agents from "../experimental/generative_agents/index.js";
export * as experimental__plan_and_execute from "../experimental/plan_and_execute/index.js";
export * as experimental__chains__violation_of_expectations from "../experimental/chains/violation_of_expectations/index.js";
export * as experimental__chat_models__chrome_ai from "../experimental/chrome_ai/chat_models.js";
export * as experimental__masking from "../experimental/masking/index.js";
export * as experimental__prompts__custom_format from "../experimental/prompts/custom_format.js";
export * as evaluation from "../evaluation/index.js";
Expand Down
4 changes: 4 additions & 0 deletions libs/langchain-community/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,10 @@ experimental/chat_models/ollama_functions.cjs
experimental/chat_models/ollama_functions.js
experimental/chat_models/ollama_functions.d.ts
experimental/chat_models/ollama_functions.d.cts
experimental/chat_models/chrome_ai.cjs
experimental/chat_models/chrome_ai.js
experimental/chat_models/chrome_ai.d.ts
experimental/chat_models/chrome_ai.d.cts
chains/graph_qa/cypher.cjs
chains/graph_qa/cypher.js
chains/graph_qa/cypher.d.ts
Expand Down
1 change: 1 addition & 0 deletions libs/langchain-community/langchain.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ export const config = {
"experimental/hubs/makersuite/googlemakersuitehub":
"experimental/hubs/makersuite/googlemakersuitehub",
"experimental/chat_models/ollama_functions": "experimental/chat_models/ollama_functions",
"experimental/chat_models/chrome_ai": "experimental/chat_models/chrome_ai/chat_models",
// chains
"chains/graph_qa/cypher": "chains/graph_qa/cypher"
},
Expand Down
13 changes: 13 additions & 0 deletions libs/langchain-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3022,6 +3022,15 @@
"import": "./experimental/chat_models/ollama_functions.js",
"require": "./experimental/chat_models/ollama_functions.cjs"
},
"./experimental/chat_models/chrome_ai": {
"types": {
"import": "./experimental/chat_models/chrome_ai.d.ts",
"require": "./experimental/chat_models/chrome_ai.d.cts",
"default": "./experimental/chat_models/chrome_ai.d.ts"
},
"import": "./experimental/chat_models/chrome_ai.js",
"require": "./experimental/chat_models/chrome_ai.cjs"
},
"./chains/graph_qa/cypher": {
"types": {
"import": "./chains/graph_qa/cypher.d.ts",
Expand Down Expand Up @@ -4067,6 +4076,10 @@
"experimental/chat_models/ollama_functions.js",
"experimental/chat_models/ollama_functions.d.ts",
"experimental/chat_models/ollama_functions.d.cts",
"experimental/chat_models/chrome_ai.cjs",
"experimental/chat_models/chrome_ai.js",
"experimental/chat_models/chrome_ai.d.ts",
"experimental/chat_models/chrome_ai.d.cts",
"chains/graph_qa/cypher.cjs",
"chains/graph_qa/cypher.js",
"chains/graph_qa/cypher.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"webpack-cli": "^5.1.4"
},
"dependencies": {
"@langchain/openai": "file:../../../../../libs/langchain-openai",
"langchain": "file:../../../../"
"@langchain/community": "file:../../../../../",
"@langchain/openai": "file:../../../../../../langchain-openai"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChatChromeAI } from "langchain/experimental/chat_models/chrome_ai";
import { ChatChromeAI } from "@langchain/community/experimental/chat_models/chrome_ai";
import { encodingForModel } from "@langchain/core/utils/tiktoken";

const model = new ChatChromeAI();
Expand Down
Loading

0 comments on commit 8e259b6

Please sign in to comment.