kikocis/GraphRAG-SDK public
Changesets · Branches · Tags · Compare
| Changeset | c1b0da01842ea9baeb1b4afef9c004a868e354c5c1ceca9c94dab95aa71a8d2b |
|---|---|
| Author | Roi Lipman <roilipman@gmail.com> · 2024-06-08 00:34 +03:00 |
| Committer | Roi Lipman <roilipman@gmail.com> · 2024-06-08 00:34 +03:00 |
| Parents | 3e2e7f5f23d2 |
1 file changed
modified graphrag_sdk/kg.py +0 −5
| @@ -1,4 +1,3 @@ | ||
| 1 | -import os | |
| 2 | 1 | import queue |
| 3 | 2 | from openai import OpenAI |
| 4 | 3 | import concurrent.futures |
| @@ -17,10 +16,6 @@ | ||
| 17 | 16 | import logging |
| 18 | 17 | logger = logging.getLogger(__name__) |
| 19 | 18 | |
| 20 | -# Make sure OpenAI API key is set. | |
| 21 | -if "OPENAI_API_KEY" not in os.environ: | |
| 22 | - raise Exception("Missing 'OPENAI_API_KEY' environment variable, please make sure to set it: 'export OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>'") | |
| 23 | - | |
| 24 | 19 | class KnowledgeGraph(object): |
| 25 | 20 | """Knowledge Graph model data as a network of entities and relations |
| 26 | 21 | To create one it is best to provide a schema which will define the graph's ontology |