Skip to content

Commit 4467b65

Browse files
fix: openai python sdk package export (#432)
1 parent d71ce03 commit 4467b65

File tree

3 files changed

+10
-27
lines changed

3 files changed

+10
-27
lines changed

packages/openai-sdk-python/pyproject.toml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "supermemory-openai-sdk"
7-
version = "1.0.1"
7+
version = "1.0.2"
88
description = "Memory tools for OpenAI function calling with supermemory"
99
readme = "README.md"
1010
license = "MIT"
@@ -26,7 +26,7 @@ classifiers = [
2626
requires-python = ">=3.8.1"
2727
dependencies = [
2828
"openai>=1.102.0",
29-
"supermemory>=3.0.0a28",
29+
"supermemory>=3.1.0",
3030
"typing-extensions>=4.0.0",
3131
]
3232

@@ -46,26 +46,11 @@ Homepage = "https://supermemory.ai"
4646
Repository = "https://github.com/supermemoryai/supermemory"
4747
Documentation = "https://supermemory.ai/docs"
4848

49-
[tool.hatch.build.targets.wheel]
50-
packages = ["src"]
49+
[tool.hatch.build]
50+
include = ["src/*"]
5151

52-
[tool.black]
53-
line-length = 88
54-
target-version = ['py38']
55-
include = '\.pyi?$'
56-
extend-exclude = '''
57-
/(
58-
# directories
59-
\.eggs
60-
| \.git
61-
| \.hg
62-
| \.mypy_cache
63-
| \.tox
64-
| \.venv
65-
| build
66-
| dist
67-
)/
68-
'''
52+
[tool.hatch.build.targets.wheel]
53+
packages = ["src/supermemory_openai"]
6954

7055
[tool.isort]
7156
profile = "black"

packages/openai-sdk-python/src/__init__.py renamed to packages/openai-sdk-python/src/supermemory_openai/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
create_add_memory_tool,
1717
)
1818

19-
__version__ = "0.1.0"
20-
2119
__all__ = [
2220
# Tools
2321
"SupermemoryTools",

packages/openai-sdk-python/src/tools.py renamed to packages/openai-sdk-python/src/supermemory_openai/tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from openai.types.chat import (
77
ChatCompletionMessageToolCall,
88
ChatCompletionToolMessageParam,
9-
ChatCompletionToolParam,
9+
ChatCompletionFunctionToolParam,
1010
)
1111
import supermemory
1212
from supermemory.types import (
@@ -50,7 +50,7 @@ class MemoryAddResult(TypedDict, total=False):
5050

5151

5252
# Function schemas for OpenAI function calling
53-
MEMORY_TOOL_SCHEMAS = {
53+
MEMORY_TOOL_SCHEMAS: Dict[str, ChatCompletionFunctionToolParam] = {
5454
"search_memories": {
5555
"name": "search_memories",
5656
"description": (
@@ -129,7 +129,7 @@ def __init__(self, api_key: str, config: Optional[SupermemoryToolsConfig] = None
129129
else:
130130
self.container_tags = ["sm_project_default"]
131131

132-
def get_tool_definitions(self) -> List[ChatCompletionToolParam]:
132+
def get_tool_definitions(self) -> List[ChatCompletionFunctionToolParam]:
133133
"""Get OpenAI function definitions for all memory tools.
134134
135135
Returns:
@@ -247,7 +247,7 @@ def create_supermemory_tools(
247247
return SupermemoryTools(api_key, config)
248248

249249

250-
def get_memory_tool_definitions() -> List[ChatCompletionToolParam]:
250+
def get_memory_tool_definitions() -> List[ChatCompletionFunctionToolParam]:
251251
"""Get OpenAI function definitions for memory tools.
252252
253253
Returns:

0 commit comments

Comments
 (0)