Skip to content
Merged
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
27 changes: 6 additions & 21 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.1"
version = "1.0.2"
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.0.0a28",
"supermemory>=3.1.0",
"typing-extensions>=4.0.0",
]

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

[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.hatch.build]
include = ["src/*"]

[tool.black]
line-length = 88
target-version = ['py38']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.hatch.build.targets.wheel]
packages = ["src/supermemory_openai"]

[tool.isort]
profile = "black"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
create_add_memory_tool,
)

__version__ = "0.1.0"

__all__ = [
# Tools
"SupermemoryTools",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from openai.types.chat import (
ChatCompletionMessageToolCall,
ChatCompletionToolMessageParam,
ChatCompletionToolParam,
ChatCompletionFunctionToolParam,
)
import supermemory
from supermemory.types import (
Expand Down Expand Up @@ -50,7 +50,7 @@ class MemoryAddResult(TypedDict, total=False):


# Function schemas for OpenAI function calling
MEMORY_TOOL_SCHEMAS = {
MEMORY_TOOL_SCHEMAS: Dict[str, ChatCompletionFunctionToolParam] = {
"search_memories": {
"name": "search_memories",
"description": (
Expand Down Expand Up @@ -129,7 +129,7 @@ def __init__(self, api_key: str, config: Optional[SupermemoryToolsConfig] = None
else:
self.container_tags = ["sm_project_default"]

def get_tool_definitions(self) -> List[ChatCompletionToolParam]:
def get_tool_definitions(self) -> List[ChatCompletionFunctionToolParam]:
"""Get OpenAI function definitions for all memory tools.

Returns:
Expand Down Expand Up @@ -247,7 +247,7 @@ def create_supermemory_tools(
return SupermemoryTools(api_key, config)


def get_memory_tool_definitions() -> List[ChatCompletionToolParam]:
def get_memory_tool_definitions() -> List[ChatCompletionFunctionToolParam]:
"""Get OpenAI function definitions for memory tools.

Returns:
Expand Down