MCPcopy
hub / github.com/circlemind-ai/fast-graphrag / encode

Method encode

fast_graphrag/_llm/_base.py:134–144  ·  view source on GitHub ↗

Get the embedding representation of the input text. Args: texts (str): The input text to embed. model (str): The name of the model to use. Returns: list[float]: The embedding vector as a list of floats.

(self, texts: list[str], model: Optional[str] = None)

Source from the content-addressed store, hash-verified

132 embedding_async_client: Any = field(init=False, default=None)
133
134 async def encode(self, texts: list[str], model: Optional[str] = None) -> np.ndarray[Any, np.dtype[np.float32]]:
135 """Get the embedding representation of the input text.
136
137 Args:
138 texts (str): The input text to embed.
139 model (str): The name of the model to use.
140
141 Returns:
142 list[float]: The embedding vector as a list of floats.
143 """
144 raise NotImplementedError
145
146
147class NoopAsyncContextManager:

Callers 13

upsertMethod · 0.45
get_contextMethod · 0.45
_extract_chunksMethod · 0.45
get_corpusFunction · 0.45
get_queriesFunction · 0.45
get_corpusFunction · 0.45
get_queriesFunction · 0.45
get_corpusFunction · 0.45
get_queriesFunction · 0.45
upsertMethod · 0.45
get_contextMethod · 0.45
get_corpusFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected