Skip to content

Commit

Permalink
fix: improve GRAPHRAG key passing (#384) #none
Browse files Browse the repository at this point in the history
  • Loading branch information
taprosoft authored Oct 11, 2024
1 parent 497cb40 commit 15c7916
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libs/ktem/ktem/index/file/graph/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,11 @@ def _build_graph_search(self):
text_unit_df = pd.read_parquet(f"{INPUT_DIR}/{TEXT_UNIT_TABLE}.parquet")
text_units = read_indexer_text_units(text_unit_df)

embedding_model = os.getenv("GRAPHRAG_EMBEDDING_MODEL")
embedding_model = os.getenv(
"GRAPHRAG_EMBEDDING_MODEL", "text-embedding-3-small"
)
text_embedder = OpenAIEmbedding(
api_key=os.getenv("OPENAI_API_KEY"),
api_key=os.getenv("GRAPHRAG_API_KEY"),
api_base=None,
api_type=OpenaiApiType.OpenAI,
model=embedding_model,
Expand Down

0 comments on commit 15c7916

Please sign in to comment.