Skip to content

Commit

Permalink
Moved PythonInterpreterTool to tools/experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
mishushakov committed Nov 5, 2023
1 parent 00b1e7c commit e4c6c6d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
7 changes: 5 additions & 2 deletions langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@
"portkey-ai": "^0.1.11",
"prettier": "^2.8.3",
"puppeteer": "^19.7.2",
"pyodide": "0.24.1",
"pyodide": "^0.24.1",
"redis": "^4.6.6",
"release-it": "^15.10.1",
"replicate": "^0.18.0",
Expand Down Expand Up @@ -1012,7 +1012,7 @@
"playwright": "^1.32.1",
"portkey-ai": "^0.1.11",
"puppeteer": "^19.7.2",
"pyodide": "0.24.1",
"pyodide": "^0.24.1",
"redis": "^4.6.4",
"replicate": "^0.18.0",
"sonix-speech-recognition": "^2.1.1",
Expand Down Expand Up @@ -1277,6 +1277,9 @@
"puppeteer": {
"optional": true
},
"pyodide": {
"optional": true
},
"redis": {
"optional": true
},
Expand Down
2 changes: 1 addition & 1 deletion langchain/scripts/create-entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ const requiresOptionalDependency = [
"tools/sql",
"tools/webbrowser",
"tools/google_calendar",
"tools/pyinterpreter",
"tools/experimental/pyinterpreter",
"callbacks/handlers/llmonitor",
"chains/load",
"chains/sql_db",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { loadPyodide, PyodideInterface } from "pyodide";
import { Tool } from "./base.js";
import { Tool } from "../base.js";

export class PythonInterpreterTool extends Tool {
static lc_name() {
Expand Down
1 change: 0 additions & 1 deletion langchain/src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ export {
export { SearxngSearch } from "./searxng_search.js";
export { SearchApi, type SearchApiParameters } from "./searchapi.js";
export { formatToOpenAIFunction } from "./convert_to_openai.js";
export { PythonInterpreterTool } from "./pyinterpreter.js";
2 changes: 1 addition & 1 deletion langchain/src/tools/tests/pyinterpreter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { test, expect } from "@jest/globals";
import { StringOutputParser } from "../../schema/output_parser.js";
import { OpenAI } from "../../llms/openai.js";
import { PromptTemplate } from "../../prompts/index.js";
import { PythonInterpreterTool } from "../pyinterpreter.js";
import { PythonInterpreterTool } from "../experimental/pyinterpreter.js";

describe("Python Interpreter testsuite", () => {
test("fibonacci sequence", async () => {
Expand Down

0 comments on commit e4c6c6d

Please sign in to comment.