{"id":29016514,"url":"https://github.com/memgraph/bor","last_synced_at":"2025-06-25T22:30:32.852Z","repository":{"id":192535738,"uuid":"686971915","full_name":"memgraph/bor","owner":"memgraph","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-04T13:08:25.000Z","size":119,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-03-04T14:31:22.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memgraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-04T10:38:54.000Z","updated_at":"2023-12-17T22:52:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"87fe18e7-2a99-4095-b030-303fc9e093e9","html_url":"https://github.com/memgraph/bor","commit_stats":null,"previous_names":["memgraph/bor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/memgraph/bor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fbor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fbor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fbor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fbor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memgraph","download_url":"https://codeload.github.com/memgraph/bor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fbor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261962050,"owners_count":23236859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-25T22:30:31.973Z","updated_at":"2025-06-25T22:30:32.793Z","avatar_url":"https://github.com/memgraph.png","language":"Python","readme":"[![python](https://img.shields.io/badge/python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n[![fastapi](https://img.shields.io/badge/fastapi-009688?style=for-the-badge\u0026logo=fastapi\u0026logoColor=white)](https://fastapi.tiangolo.com/)\n\n[![openai](https://img.shields.io/badge/openai-412991?style=for-the-badge\u0026logo=openai\u0026logoColor=white)](https://openai.com/)\n[![docker](https://img.shields.io/badge/docker-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n\n# BOR - The Backend for ODIN and RUNE\n\n## Disclaimer\n\n\u003e **Warning**\n\u003e It is recommended that you have access to GPT-4 via the OpenAI API. GPT-3.5 will probably fail to make correct knowledge graphs from your data.\n\u003e Since we still don't have access to GPT-4 OpenAI API, although we made our account a month ago and generated \u003e1$ in billing a week ago,\n\u003e the `init_repo`, `update_file` and `add_file` endpoints are still untested. We initialized knowledge graphs manually, through ChatGPT.\n\u003e **Here be dragons.**\n\n## Installation\n\nYou can install and setup BOR and Memgraph using Docker or by running it manually.\n\n### Docker installation\n\nBefore you start, make sure you have a running [Docker](https://www.docker.com/) instance and [Docker compose](https://docs.docker.com/compose/install/) installed.\n\n1. Download BOR\n    - Clone the repository in your folder of choice:\n\n    ```\n    git clone https://github.com/memgraph/bor.git\n    ```\n    \n    - Navigate to the BOR root directory:\n    ```\n    cd bor\n    ```\n\n2. \n    You will need to set the ```OPENAI_API_KEY``` environment variable in a `.env` file in the BOR root directory to your OpenAI API key. It should look like this:\n\n    ```\n    OPENAI_API_KEY=YOUR_API_KEY\n    LLM_MODEL_NAME=gpt-4 # try with other models at your own risk\n    ```\n\n    Where YOUR_API_KEY is a key you can get [here](https://openai.com/).\n\n3.  \n    - Open your terminal or command prompt.\n    - Run:\n        ```docker compose up```\n\nThe installation process can take up to ten minutes. After successful installation, you can proceed to set up your frontend - [ODIN](https://github.com/memgraph/odin) or [RUNE](https://github.com/memgraph/rune).\n\n### Manual installation\n\nFor the manual installation make sure you have [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) and [Python](https://www.python.org/) installed on your system.\n\n1. Download BOR\n    - Clone the repository in your folder of choice:\n\n    ```\n    git clone https://github.com/memgraph/bor.git\n    ```\n    \n    - Navigate to the BOR root directory:\n    ```\n    cd bor\n    ```\n\n2. Create a new conda virtual environment using Python 3.9.16:\n    ```\n    conda create --name bor_env python=3.9.16\n    ```\n\n3. Activate the environment:\n    ```\n    source activate bor_env\n    ```\n\n4. To install all dependencies and setup all packages, run:\n\n    ```\n    pip install -e .\n    ```\n\n    This process might take a few minutes.\n\n5. You will need a `.env` file with your OpenAI API key. It should look like this:\n\n    ```\n    OPENAI_API_KEY=YOUR_API_KEY\n    MEMGRAPH_HOST=\"127.0.0.1\"\n    MEMGRAPH_PORT=7687\n    CHROMA_DATA_DIR=\"/path/to/dir/chroma\"\n    CHROMA_VECTOR_SPACE=\"cosine\"\n    EMBEDDING_MODEL_NAME=\"text-embedding-ada-002\"\n    LLM_MODEL_NAME=\"gpt-3.5-turbo-0613\"\n    LLM_MODEL_TEMPERATURE=0.2\n    ```\n\n    Where YOUR_API_KEY is your API key you can get [here](https://openai.com/). You can replace \"/path/to/dir/chroma\" with preferred path to an empty folder where BOR will store all embedding search data.\n\n6. If you don't have [Memgraph](https://memgraph.com/docs/memgraph/installation) installed, you can run:\n    - `bash core/run_memgraph_290.sh`\n\n7. Start the FastAPI backend by running: \n    - `bash core/run_server.sh`\n\n    Alternatively, you can just run the script directly in your conda environment:\n    - `uvicorn core.restapi.api:app --reload`\n\nAfter successful initialization, you can proceed to set up your frontend - [ODIN](https://github.com/memgraph/odin) or [RUNE](https://github.com/memgraph/rune).\n\n## Documentation\n\nWhen BOR is running, you can access the endpoint documentation at http://localhost:8000/docs#/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fbor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemgraph%2Fbor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fbor/lists"}