GPTAssistantAgent to use code interpreter.
Requirements
AG2 requiresPython>=3.9. To run this notebook example, please
install:
Set your API Endpoint
Theconfig_list_from_json
function loads a list of configurations from an environment variable or
a json file.
Learn more about configuring LLMs for agents here.
Perform Tasks Using Code Interpreter
We demonstrate task solving usingGPTAssistantAgent with code
interpreter. Pass code_interpreter in tools parameter to enable
GPTAssistantAgent with code interpreter. It will write code and
automatically execute it in a sandbox. The agent will receive the
results from the sandbox environment and act accordingly.