Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAlpha VantageApifyArXivAWS LambdaShell (bash)Bearly Code InterpreterBing SearchBrave SearchChatGPT PluginsDall-E Image GeneratorDataForSeoDuckDuckGo SearchEden AIEleven Labs Text2SpeechFile SystemGolden QueryGoogle DriveGoogle PlacesGoogle SearchGoogle SerperGradioGraphQLHuggingFace Hub ToolsHuman as a toolIFTTT WebHooksLemon AgentMetaphor SearchNuclia UnderstandingOpenWeatherMapPubMedRequestsSceneXplainSearch ToolsSearchApiSearxNG SearchSerpAPITwilioWikipediaWolfram AlphaYahoo Finance NewsYouTubeZapier Natural Language ActionsAgents and toolkitsMemoryCallbacksChat loadersComponentsToolsBearly Code InterpreterBearly Code InterpreterBearly Code Interpreter allows for remote execution of code. This makes it perfect for a code sandbox for agents, to allow for safe implementation of things like Code InterpreterIn this notebook, we will create an example of an agent that uses Bearly to interact with datafrom langchain.chat_models import ChatOpenAIfrom langchain.tools import BearlyInterpreterToolfrom langchain.agents import initialize_agent, AgentTypeInitialize the interpreterbearly_tool = BearlyInterpreterTool(api_key="...")Let's add some files to the the sandboxbearly_tool.add_file(    source_path="sample_data/Bristol.pdf",     target_path="Bristol.pdf",     description="")bearly_tool.add_file(    source_path="sample_data/US_GDP.csv",     target_path="US_GDP.csv",     description="")Create a Tool object now. This is necessary, because we added the files, and we want the tool description to reflect thattools = [bearly_tool.as_tool()]tools[0].name    'bearly_interpreter'print(tools[0].description)    Evaluates python code in a sandbox environment. The environment resets on every execution. You must
Bearly Code Interpreter allows for remote execution of code. This makes it perfect for a code sandbox for agents, to allow for safe implementation of things like Code Interpreter
Bearly Code Interpreter allows for remote execution of code. This makes it perfect for a code sandbox for agents, to allow for safe implementation of things like Code Interpreter ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAlpha VantageApifyArXivAWS LambdaShell (bash)Bearly Code InterpreterBing SearchBrave SearchChatGPT PluginsDall-E Image GeneratorDataForSeoDuckDuckGo SearchEden AIEleven Labs Text2SpeechFile SystemGolden QueryGoogle DriveGoogle PlacesGoogle SearchGoogle SerperGradioGraphQLHuggingFace Hub ToolsHuman as a toolIFTTT WebHooksLemon AgentMetaphor SearchNuclia UnderstandingOpenWeatherMapPubMedRequestsSceneXplainSearch ToolsSearchApiSearxNG SearchSerpAPITwilioWikipediaWolfram AlphaYahoo Finance NewsYouTubeZapier Natural Language ActionsAgents and toolkitsMemoryCallbacksChat loadersComponentsToolsBearly Code InterpreterBearly Code InterpreterBearly Code Interpreter allows for remote execution of code. This makes it perfect for a code sandbox for agents, to allow for safe implementation of things like Code InterpreterIn this notebook, we will create an example of an agent that uses Bearly to interact with datafrom langchain.chat_models import ChatOpenAIfrom langchain.tools import BearlyInterpreterToolfrom langchain.agents import initialize_agent, AgentTypeInitialize the interpreterbearly_tool = BearlyInterpreterTool(api_key="...")Let's add some files to the the sandboxbearly_tool.add_file(    source_path="sample_data/Bristol.pdf",     target_path="Bristol.pdf",     description="")bearly_tool.add_file(    source_path="sample_data/US_GDP.csv",     target_path="US_GDP.csv",     description="")Create a Tool object now. This is necessary, because we added the files, and we want the tool description to reflect thattools = [bearly_tool.as_tool()]tools[0].name    'bearly_interpreter'print(tools[0].description)    Evaluates python code in a sandbox environment. The environment resets on every execution. You must