feat: Add Code Interpreter Plugin (#837)

* feat: Add Code Interpreter Plugin

Adds a Simple Code Interpreter Plugin.
## Features:
- Runs code using local Python Environment

## Issues
- Code execution is not sandboxed.

* Add Docker Sandbox for Python Server
This commit is contained in:
Ronith 2023-08-28 18:43:50 +05:30 committed by GitHub
parent e2397076a2
commit 3797ec6082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 150 additions and 0 deletions

View file

@ -7,6 +7,7 @@ const { Calculator } = require('langchain/tools/calculator');
const { WebBrowser } = require('langchain/tools/webbrowser');
const {
availableTools,
CodeInterpreter,
AIPluginTool,
GoogleSearchAPI,
WolframAlphaAPI,
@ -76,6 +77,7 @@ const loadToolWithAuth = async (user, authFields, ToolConstructor, options = {})
const loadTools = async ({ user, model, functions = null, tools = [], options = {} }) => {
const toolConstructors = {
calculator: Calculator,
codeinterpreter: CodeInterpreter,
google: GoogleSearchAPI,
wolfram: functions ? StructuredWolfram : WolframAlphaAPI,
'dall-e': OpenAICreateImage,