diff --git a/graphiti_core/graphiti.py b/graphiti_core/graphiti.py index a540ee4..74d5ede 100644 --- a/graphiti_core/graphiti.py +++ b/graphiti_core/graphiti.py @@ -91,14 +91,14 @@ class AddEpisodeResults(BaseModel): class Graphiti: def __init__( - self, - uri: str, - user: str, - password: str, - llm_client: LLMClient | None = None, - embedder: EmbedderClient | None = None, - cross_encoder: CrossEncoderClient | None = None, - store_raw_episode_content: bool = True, + self, + uri: str, + user: str, + password: str, + llm_client: LLMClient | None = None, + embedder: EmbedderClient | None = None, + cross_encoder: CrossEncoderClient | None = None, + store_raw_episode_content: bool = True, ): """ Initialize a Graphiti instance. @@ -220,10 +220,10 @@ async def build_indices_and_constraints(self, delete_existing: bool = False): await build_indices_and_constraints(self.driver, delete_existing) async def retrieve_episodes( - self, - reference_time: datetime, - last_n: int = EPISODE_WINDOW_LEN, - group_ids: list[str] | None = None, + self, + reference_time: datetime, + last_n: int = EPISODE_WINDOW_LEN, + group_ids: list[str] | None = None, ) -> list[EpisodicNode]: """ Retrieve the last n episodic nodes from the graph. @@ -253,15 +253,15 @@ async def retrieve_episodes( return await retrieve_episodes(self.driver, reference_time, last_n, group_ids) async def add_episode( - self, - name: str, - episode_body: str, - source_description: str, - reference_time: datetime, - source: EpisodeType = EpisodeType.message, - group_id: str = '', - uuid: str | None = None, - update_communities: bool = False, + self, + name: str, + episode_body: str, + source_description: str, + reference_time: datetime, + source: EpisodeType = EpisodeType.message, + group_id: str = '', + uuid: str | None = None, + update_communities: bool = False, ) -> AddEpisodeResults: """ Process an episode and update the graph. @@ -617,11 +617,11 @@ async def build_communities(self, group_ids: list[str] | None = None) -> list[Co return community_nodes async def search( - self, - query: str, - center_node_uuid: str | None = None, - group_ids: list[str] | None = None, - num_results=DEFAULT_SEARCH_LIMIT, + self, + query: str, + center_node_uuid: str | None = None, + group_ids: list[str] | None = None, + num_results=DEFAULT_SEARCH_LIMIT, ) -> list[EntityEdge]: """ Perform a hybrid search on the knowledge graph. @@ -674,12 +674,12 @@ async def search( return edges async def _search( - self, - query: str, - config: SearchConfig, - group_ids: list[str] | None = None, - center_node_uuid: str | None = None, - bfs_origin_node_uuids: list[str] | None = None, + self, + query: str, + config: SearchConfig, + group_ids: list[str] | None = None, + center_node_uuid: str | None = None, + bfs_origin_node_uuids: list[str] | None = None, ) -> SearchResults: return await search( self.driver,