1212
1313from graphrag .cache .pipeline_cache import PipelineCache
1414from graphrag .callbacks .workflow_callbacks import WorkflowCallbacks
15- from graphrag .config .models .graph_rag_config import GraphRagConfig
1615from graphrag .index .operations .embed_text .strategies .typing import TextEmbeddingStrategy
1716from graphrag .utils .embeddings import create_collection_name
1817from graphrag .vector_stores .base import BaseVectorStore , VectorStoreDocument
@@ -43,7 +42,6 @@ async def embed_text(
4342 embed_column : str ,
4443 strategy : dict ,
4544 embedding_name : str ,
46- config : GraphRagConfig ,
4745 id_column : str = "id" ,
4846 title_column : str | None = None ,
4947):
@@ -98,7 +96,6 @@ async def embed_text(
9896 vector_store_config = vector_store_workflow_config ,
9997 id_column = id_column ,
10098 title_column = title_column ,
101- config = config ,
10299 )
103100
104101 return await _text_embed_in_memory (
@@ -107,7 +104,6 @@ async def embed_text(
107104 cache = cache ,
108105 embed_column = embed_column ,
109106 strategy = strategy ,
110- config = config ,
111107 )
112108
113109
@@ -117,14 +113,13 @@ async def _text_embed_in_memory(
117113 cache : PipelineCache ,
118114 embed_column : str ,
119115 strategy : dict ,
120- config : GraphRagConfig ,
121116):
122117 strategy_type = strategy ["type" ]
123118 strategy_exec = load_strategy (strategy_type )
124119 strategy_args = {** strategy }
125120
126121 texts : list [str ] = input [embed_column ].to_numpy ().tolist ()
127- result = await strategy_exec (texts , callbacks , cache , strategy_args , config )
122+ result = await strategy_exec (texts , callbacks , cache , strategy_args )
128123
129124 return result .embeddings
130125
@@ -137,7 +132,6 @@ async def _text_embed_with_vector_store(
137132 strategy : dict [str , Any ],
138133 vector_store : BaseVectorStore ,
139134 vector_store_config : dict ,
140- config : GraphRagConfig ,
141135 id_column : str = "id" ,
142136 title_column : str | None = None ,
143137):
@@ -182,7 +176,7 @@ async def _text_embed_with_vector_store(
182176 texts : list [str ] = batch [embed_column ].to_numpy ().tolist ()
183177 titles : list [str ] = batch [title ].to_numpy ().tolist ()
184178 ids : list [str ] = batch [id_column ].to_numpy ().tolist ()
185- result = await strategy_exec (texts , callbacks , cache , strategy_args , config )
179+ result = await strategy_exec (texts , callbacks , cache , strategy_args )
186180 if result .embeddings :
187181 embeddings = [
188182 embedding for embedding in result .embeddings if embedding is not None
0 commit comments