Simple FastAPI server using BAML and Neo4j to parse incoming data and upload as a graph to Neo4j.
Open this project up in VSCode (we recommend only opening this folder, and not at the root, or VSCode may not detect the python environment and you may not get type completions for BAML functions).
Ensure your settings.json
has:
{
"python.analysis.typeCheckingMode": "basic"
}
- Run
poetry run baml-cli generate
- Run
poetry install
- Copy the .env.sample file to .env
- Add your OpenAI and Neo4j credentials to the .env file
- Run
poetry run baml-cli generate
to create/update baml client files - Run
poetry run uvicorn baml_neo4j_fastapi.app:app --reload
- Curl the endpoint to test:
Or run http://localhost:8000/docs to run FastAPIs interactive docs.
curl -X GET -H "Content-Type: application/json" http://localhost:8000/resume_to_graph