kikocis/GraphRAG-SDK public
Changesets · Branches · Tags · Compare
| Changeset | 3b7d9d2975718adacee5af668f2ef1b914c6185e1f4f45a93b71f7376eedf59a |
|---|---|
| Author | galshubeli <gal@falkordb.com> · 2024-09-19 11:14 +03:00 |
| Committer | galshubeli <gal@falkordb.com> · 2024-09-19 11:14 +03:00 |
| Parents | 52c83e5d8ac9 |
3 files changed
modified examples/movies/demo-movies.ipynb +15 −2
| @@ -9,6 +9,15 @@ | ||
| 9 | 9 | "The following example demonstrates the basic usage of this SDK to create a GraphRAG using URLs with auto-detected ontology." |
| 10 | 10 | ] |
| 11 | 11 | }, |
| 12 | + { | |
| 13 | + "cell_type": "code", | |
| 14 | + "execution_count": null, | |
| 15 | + "metadata": {}, | |
| 16 | + "outputs": [], | |
| 17 | + "source": [ | |
| 18 | + "!pip install graphrag_sdk" | |
| 19 | + ] | |
| 20 | + }, | |
| 12 | 21 | { |
| 13 | 22 | "cell_type": "code", |
| 14 | 23 | "execution_count": 1, |
| @@ -27,12 +36,16 @@ | ||
| 27 | 36 | ], |
| 28 | 37 | "source": [ |
| 29 | 38 | "from dotenv import load_dotenv\n", |
| 30 | - "\n", | |
| 31 | 39 | "from graphrag_sdk.source import URL\n", |
| 32 | 40 | "from graphrag_sdk import KnowledgeGraph, Ontology\n", |
| 33 | 41 | "from graphrag_sdk.models.openai import OpenAiGenerativeModel\n", |
| 34 | 42 | "from graphrag_sdk.model_config import KnowledgeGraphModelConfig\n", |
| 35 | - "load_dotenv()\n" | |
| 43 | + "\n", | |
| 44 | + "# Load environment variables\n", | |
| 45 | + "load_dotenv()\n", | |
| 46 | + "\n", | |
| 47 | + "# Configuration\n", | |
| 48 | + "# OPENAI_API_KEY = \"sk-\"# OpenAI API key\n" | |
| 36 | 49 | ] |
| 37 | 50 | }, |
| 38 | 51 | { |
modified examples/trip/demo_orchestrator_trip.ipynb +13 −1
| @@ -9,6 +9,15 @@ | ||
| 9 | 9 | "GraphRAG-SDK provides a powerful tool, enhanced by LLM technology, for building a Multi-Agent-Orchestrator RAG System. This example demonstrates how to create a knowledge graph-based multi-agent system from structured data and how to use the orchestrator to manage the agents and perform question answering." |
| 10 | 10 | ] |
| 11 | 11 | }, |
| 12 | + { | |
| 13 | + "cell_type": "code", | |
| 14 | + "execution_count": null, | |
| 15 | + "metadata": {}, | |
| 16 | + "outputs": [], | |
| 17 | + "source": [ | |
| 18 | + "!pip install graphrag_sdk" | |
| 19 | + ] | |
| 20 | + }, | |
| 12 | 21 | { |
| 13 | 22 | "cell_type": "code", |
| 14 | 23 | "execution_count": 1, |
| @@ -37,7 +46,10 @@ | ||
| 37 | 46 | ")\n", |
| 38 | 47 | "\n", |
| 39 | 48 | "# Load environment variables\n", |
| 40 | - "load_dotenv()" | |
| 49 | + "load_dotenv()\n", | |
| 50 | + "\n", | |
| 51 | + "# Configuration\n", | |
| 52 | + "# OPENAI_API_KEY = \"sk-\"# OpenAI API key" | |
| 41 | 53 | ] |
| 42 | 54 | }, |
| 43 | 55 | { |
modified examples/ufc/demo-ufc.ipynb +11 −0
| @@ -9,6 +9,15 @@ | ||
| 9 | 9 | "GraphRAG-SDK provides a powerful tool, enhanced by LLM technology, to build a Retrieval-Augmented Generation (RAG) system. This example demonstrates how to load UFC HTML files, automatically detect ontology based on 10% of the files, and create a Knowledge Graph (KG) to enable a question-answerable RAG system." |
| 10 | 10 | ] |
| 11 | 11 | }, |
| 12 | + { | |
| 13 | + "cell_type": "code", | |
| 14 | + "execution_count": null, | |
| 15 | + "metadata": {}, | |
| 16 | + "outputs": [], | |
| 17 | + "source": [ | |
| 18 | + "!pip install graphrag_sdk" | |
| 19 | + ] | |
| 20 | + }, | |
| 12 | 21 | { |
| 13 | 22 | "cell_type": "code", |
| 14 | 23 | "execution_count": 1, |
| @@ -34,6 +43,8 @@ | ||
| 34 | 43 | "from graphrag_sdk import KnowledgeGraph, Ontology\n", |
| 35 | 44 | "from graphrag_sdk.models.openai import OpenAiGenerativeModel\n", |
| 36 | 45 | "from graphrag_sdk.model_config import KnowledgeGraphModelConfig\n", |
| 46 | + "\n", | |
| 47 | + "# Load environment variables\n", | |
| 37 | 48 | "load_dotenv()\n", |
| 38 | 49 | "\n", |
| 39 | 50 | "# Configuration\n", |