Skip to content

Commit

Permalink
update new names with input_data (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
prasmussen15 authored Oct 29, 2024
1 parent 7bb0c78 commit 63a1b11
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion graphiti_core/edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async def generate_embedding(self, embedder: EmbedderClient):
start = time()

text = self.fact.replace('\n', ' ')
self.fact_embedding = await embedder.create(input=[text])
self.fact_embedding = await embedder.create(input_data=[text])

end = time()
logger.debug(f'embedded {text} in {end - start} ms')
Expand Down
2 changes: 1 addition & 1 deletion graphiti_core/embedder/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ class EmbedderConfig(BaseModel):
class EmbedderClient(ABC):
@abstractmethod
async def create(
self, input: str | List[str] | Iterable[int] | Iterable[Iterable[int]]
self, input_data: str | List[str] | Iterable[int] | Iterable[Iterable[int]]
) -> list[float]:
pass
2 changes: 1 addition & 1 deletion graphiti_core/llm_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def generate_embedding(embedder: EmbedderClient, text: str):
start = time()

text = text.replace('\n', ' ')
embedding = await embedder.create(input=[text])
embedding = await embedder.create(input_data=[text])

end = time()
logger.debug(f'embedded text of length {len(text)} in {end - start} ms')
Expand Down
4 changes: 2 additions & 2 deletions graphiti_core/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class EntityNode(Node):
async def generate_name_embedding(self, embedder: EmbedderClient):
start = time()
text = self.name.replace('\n', ' ')
self.name_embedding = await embedder.create(input=[text])
self.name_embedding = await embedder.create(input_data=[text])
end = time()
logger.debug(f'embedded {text} in {end - start} ms')

Expand Down Expand Up @@ -334,7 +334,7 @@ async def save(self, driver: AsyncDriver):
async def generate_name_embedding(self, embedder: EmbedderClient):
start = time()
text = self.name.replace('\n', ' ')
self.name_embedding = await embedder.create(input=[text])
self.name_embedding = await embedder.create(input_data=[text])
end = time()
logger.debug(f'embedded {text} in {end - start} ms')

Expand Down
2 changes: 1 addition & 1 deletion graphiti_core/search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def search(
bfs_origin_node_uuids: list[str] | None = None,
) -> SearchResults:
start = time()
query_vector = await embedder.create(input=[query.replace('\n', ' ')])
query_vector = await embedder.create(input_data=[query.replace('\n', ' ')])

# if group_ids is empty, set it to None
group_ids = group_ids if group_ids else None
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "graphiti-core"
version = "0.3.18"
version = "0.3.19"
description = "A temporal graph building library"
authors = [
"Paul Paliychuk <[email protected]>",
Expand Down

0 comments on commit 63a1b11

Please sign in to comment.