Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update 0.5.2 notebooks , latest graphrag, preparation UI #45

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,18 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bookworm",
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {}
}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// Uncomment and adjust the following lines as needed
// "forwardPorts": [8000],
// "postCreateCommand": "poetry install",
// "customizations": {
// "vscode": {
// "extensions": ["ms-python.python", "ms-python.vscode-pylance"]
// }
// },
// "remoteUser": "vscode"
}
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11.5'

- name: Install dependencies
run: |
Expand Down
11 changes: 6 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
# Apache License 2.0

Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.
1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
Expand Down Expand Up @@ -198,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Overview

<div align="left">
<a href="https://pypi.org/project/graphfleet/">
<img alt="Pepy Total Downlods" src="https://img.shields.io/pepy/dt/graphfleet">
</a>
<img alt="GitHub License" src="https://img.shields.io/github/license/qredence/graphfleet">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/qredence/graphfleet">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/qredence/graphfleet">
<img alt="X (formerly Twitter) Follow" src="https://img.shields.io/twitter/follow/agenticfleet">
<img alt="Discord" src="https://img.shields.io/discord/1053300403149733969?style=flat&label=discord">

</div>

Expand All @@ -21,10 +20,8 @@ GraphFleet is an advanced implementation of [GraphRAG from Microsoft](https://gi

GraphFleet uses knowledge graphs to provide substantial improvements in question-and-answer performance when reasoning about complex information. It addresses limitations of traditional RAG approaches:


## Roadmap


- [ ] Provide a FleetUI Design Kit and a quicker way of starting GraphFleet locally.
- [ ] Provide a Toddle interface ready to use for GraphFleet
- [ ] Add integrations of Composio
Expand Down Expand Up @@ -57,46 +54,51 @@ GraphFleet uses knowledge graphs to provide substantial improvements in question

### Prerequisites


- Python 3.11

- Poetry
- Make sure to have a virtual environment manager such as `virtualenv` installed


### Installation

1. Clone the repository:

``` bash
```bash
git clone https://github.com/Qredence/GraphFleet.git
cd GraphFleet
```

```

2. Simply run these in your terminal:
2. Install the dependencies:

``` bash
```bash
poetry shell
poetry install
```



### Usage

1. Configuration:
Environment Variables: Set up your environment variables in a .env file (refer to the .env.example file for available options). Key variables include:

Fill in the .env file in the root folder and the one in the graphfleet folder.

```bash
export GRAPHRAG_API_KEY="your_api_key_here"
export GRAPHRAG_API_BASE="your_api_base_url_here"
export GRAPHRAG_API_VERSION="your_api_version_here"
export GRAPHRAG_LLM_MODEL="your_llm_model_here"
export GRAPHRAG_DEPLOYMENT_NAME="your_deployment_name_here"
export GRAPHRAG_EMBEDDING_MODEL="your_embedding_model_here"
```

```sh
export GRAPHRAG_API_KEY="your_api_key_here"
export GRAPHRAG_API_BASE="<https://your-azure-openai-resource.openai.azure.com/>"
export GRAPHRAG_API_VERSION=""
export GRAPHRAG_DEPLOYMENT_NAME="your_deployment_name"
export GRAPHRAG_API_TYPE="azure_openai"
export GRAPHRAG_EMBEDDING_MODEL="text-embedding-ada-002"
export GRAPHRAG_LLM_MODEL="gpt-4"
export GRAPHRAG_DATA_PATH="./your_data_directory"
export GRAPHRAG_EMBEDDING_TYPE="azure_openai_embedding"
export GRAPHRAG_EMBEDDING_KEY="your_embedding_key_here"
export GRAPHRAG_EMBEDDING_ENDPOINT="<https://your-azure-openai-embedding-resource.openai.azure.com/>"
export GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME="your_embedding_deployment_name"

```


settings.yaml: Customize GraphFleet's behavior further by modifying the settings.yaml file within the graphfleet directory.

Expand All @@ -115,13 +117,11 @@ Jupyter Notebooks: Explore GraphFleet's capabilities with the provided notebooks
### Start the application API only

``` bash
uvicorn graphfleet.api.api:app --host 0.0.0.0 --port 8001
>> soon
```

Access the interface in your web browser at the provided URL <http://0.0.0.0:8001/docs> .



1. Data Indexing:

Jupyter Notebook Guide: Follow the instructions provided in the get-started-graphfleet.ipynb notebook to learn how to index your data with GraphFleet. This notebook provides a hands-on experience for setting up your knowledge base.
Expand All @@ -139,13 +139,13 @@ app.py (FastAPI Application): Run a Streamlit-powered web interface to interact
To run the API, save the code in a file named api.py and execute the following command in your terminal:

``` bash
uvicorn api:app --reload --port 8001
uvicorn app:main --reload --port 8001
```

### Start the application
### Start the application (Follow the get-started-graphfleet.ipynb notebook)

``` bash
streamlit run app.py # Access the interface in your web browser at the provided URL (usually http://localhost:8080).
### streamlit run app.py # Access the interface in your web browser at the provided URL (usually http://localhost:8080).
```

``` bash
Expand All @@ -158,7 +158,6 @@ For Global query mode :
python -m graphrag.query --root ./graphfleet --method global "What are the top main features of GraphRAG"
```


### Running the API only

To run the API, save the code in a file named api.py and execute the following command in your terminal:
Expand All @@ -170,11 +169,12 @@ uvicorn api:app --reload --port 8001

## Security

[Security](SECURITY.md)
For details about our security policy, please see [Security](SECURITY.md) or [Security](docs/SECURITY.md).

## License

[text](LICENSE)
This project is licensed under the Apache License 2.0. For the full license text, please see [License](LICENSE) or [License](docs/LICENSE).

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=Qredence/GraphFleet&type=Date)](https://star-history.com/#Qredence/GraphFleet&Date)
33 changes: 33 additions & 0 deletions cspell config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json
version: "0.2"
allowCompoundWords: true
dictionaryDefinitions:
- name: dictionary
path: "./dictionary.txt"
addWords: true
dictionaries:
- dictionary
ignorePaths:
- cspell.config.yaml
- node_modules
- _site
- /project-words.txt
- default_pipeline.yml
- .turbo
- output/
- dist/
- temp_azurite/
- __pycache__
- pyproject.toml
- entity_extraction.txt
- package.json
- tests/fixtures/
- docsite/data/
- docsite/nbdocsite_template/
- docsite/posts/query/notebooks/inputs/
- examples_notebooks/inputs/
- "*.csv"
- "*.parquet"
- "*.faiss"
- "*.ipynb"
- "*.log"
1 change: 1 addition & 0 deletions docs/LICENSE
1 change: 1 addition & 0 deletions docs/SECURITY.md
Loading