Elffuss BraidHub

kikocis/GraphRAG-SDK public

removed openai api key check
Changesetc1b0da01842ea9baeb1b4afef9c004a868e354c5c1ceca9c94dab95aa71a8d2b
AuthorRoi Lipman <roilipman@gmail.com> · 2024-06-08 00:34 +03:00
CommitterRoi Lipman <roilipman@gmail.com> · 2024-06-08 00:34 +03:00
Parents3e2e7f5f23d2

Browse the files at this changeset

1 file changed

modified graphrag_sdk/kg.py +0 −5
@@ -1,4 +1,3 @@
1-import os
21 import queue
32 from openai import OpenAI
43 import concurrent.futures
@@ -17,10 +16,6 @@
1716 import logging
1817 logger = logging.getLogger(__name__)
1918
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-
2419 class KnowledgeGraph(object):
2520 """Knowledge Graph model data as a network of entities and relations
2621 To create one it is best to provide a schema which will define the graph's ontology