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
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# To separate your traces from other application
LANGSMITH_PROJECT=memory-graph
# LANGSMITH_API_KEY=
# MODEL=

# The following depend on your selected configuration

Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ authors = [
]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.9"
requires-python = ">=3.11"
dependencies = [
"langgraph>=0.2.34,<0.3.0",
"langgraph>=0.6.0,<0.7.0",
"langgraph-api>=0.2.109,<0.3.0",
# Optional (for selecting different models)
"langchain-openai>=0.2.1",
"langchain-anthropic>=0.2.1",
"langchain>=0.3.8",
"langchain-core>=0.3.8",
"python-dotenv>=1.0.1",
"langgraph-sdk>=0.1.32",
"langgraph-sdk>=0.2.0",
"langgraph-cli>=0.3.6",
]

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/memory_agent/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Configuration:
user_id: str = "default"
"""The ID of the user to remember in the conversation."""
model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field(
default="anthropic/claude-3-5-sonnet-20240620",
default_factory=lambda: os.environ.get("MODEL", "anthropic/claude-3-5-sonnet-20240620"),
metadata={
"description": "The name of the language model to use for the agent. "
"Should be in the form: provider/model-name."
Expand Down
2 changes: 1 addition & 1 deletion src/memory_agent/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def route_message(state: State):


# Create the graph + all nodes
builder = StateGraph(State, config_schema=configuration.Configuration)
builder = StateGraph(State, context_schema=configuration.Configuration)

# Define the flow of the memory extraction process
builder.add_node(call_model)
Expand Down