Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/openai-sdk-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "supermemory-openai-sdk"
version = "1.0.4"
version = "1.0.5"
description = "Memory tools for OpenAI function calling with supermemory"
readme = "README.md"
license = "MIT"
Expand All @@ -26,7 +26,7 @@ classifiers = [
requires-python = ">=3.8.1"
dependencies = [
"openai>=1.102.0",
"supermemory>=3.1.0",
"supermemory>=3.7.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version requirement mismatch with description. The PR description states the fix was "confirmed import supermemory_openai works against supermemory 3.51" and mentions "supermemory>=3.5.0", but the code requires supermemory>=3.7.0. If "3.51" means version 3.5.1, this dependency will reject it despite being tested against it.

# If tested against 3.5.1, should be:
dependencies = [
    "supermemory>=3.5.0",
]
# Or if 3.7.0 is actually required, update the description
Suggested change
"supermemory>=3.7.0",
"supermemory>=3.5.0",

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

"typing-extensions>=4.0.0",
"requests>=2.25.0",
Comment on lines 27 to 31
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ async def add_memory_tool(
add_params["custom_id"] = custom_id

# Handle both sync and async supermemory clients
result = client.memories.add(**add_params)
result = client.add(**add_params)
if inspect.isawaitable(result):
response = await result
else:
Expand Down
10 changes: 5 additions & 5 deletions packages/openai-sdk-python/src/supermemory_openai/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
ChatCompletionToolMessageParam,
)
from supermemory.types import (
MemoryAddResponse,
MemoryGetResponse,
AddResponse,
DocumentGetResponse,
SearchExecuteResponse,
)
from supermemory.types.search_execute_response import Result
Expand All @@ -35,7 +35,7 @@ class SupermemoryToolsConfig(TypedDict, total=False):


# Type aliases using inferred types from supermemory package
MemoryObject = Union[MemoryGetResponse, MemoryAddResponse]
MemoryObject = Union[DocumentGetResponse, AddResponse]


class MemorySearchResult(TypedDict, total=False):
Expand All @@ -51,7 +51,7 @@ class MemoryAddResult(TypedDict, total=False):
"""Result type for memory add operations."""

success: bool
memory: Optional[MemoryAddResponse]
memory: Optional[AddResponse]
error: Optional[str]
Comment on lines 53 to 55


Expand Down Expand Up @@ -226,7 +226,7 @@ async def add_memory(self, memory: str) -> MemoryAddResult:
"container_tags": self.container_tags,
}

response: MemoryAddResponse = await self.client.memories.add(**add_params)
response: AddResponse = await self.client.add(**add_params)

return MemoryAddResult(
success=True,
Expand Down
Loading