This is an example agent, powered by OpenAI, that can perform question answering using data retrieved from widgets on OpenBB Workspace. It specifically demonstrates how to handle PDF data.
Here's how to get your agent up and running:
Ensure you have poetry, a tool for dependency management and packaging in Python, as well as your OpenAI API key.
-
Clone this repository to your local machine.
-
Set the OpenAI API key as an environment variable in your .bashrc or .zshrc file:
# in .zshrc or .bashrc export OPENAI_API_KEY=<your-api-key>
-
Install the necessary dependencies:
poetry install --no-root4.Start the API server:
cd 35-vanilla-agent-pdf
poetry run uvicorn vanilla_agent_pdf.main:app --port 7777 --reloadThis command runs the FastAPI application, making it accessible on your network.
The example agent has a small, basic test suite to ensure it's working correctly. As you develop your agent, you are highly encouraged to expand these tests.
You can run the tests with:
pytest testsOnce the API server is running, you can view the documentation and interact with the API by visiting: http://localhost:7777/docs