aws / aws/bedrock-agentcore-sdk-python

Getting an error when running long term memory creation

Đang mở
#18 4 bình luận 0 reaction 1 người được giao Được @abhivr-amazon nhận Xem trên GitHub
bug memory
Ngôn ngữ chính
Python
Star
761
Fork
147
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
7

Mô tả

Below code gives an error as mentioned after the code

```
import uuid

from bedrock_agentcore.memory import MemoryClient

client = MemoryClient(region_name="us-west-2")

# memory_id = "CustomerSupportAgentMemory-D22Byv7Nu1"
actorId = "user-456"
sessionId = "session-789"
print(sessionId)

memory = client.create_memory_and_wait(
name="MyAgentMemory",
strategies=[{
"summaryMemoryStrategy": {
# Name of the extraction model/strategy
"name": "SessionSummarizer",
# Organize facts by session ID for easy retrieval
# Example: "summaries/session123" contains summary of session123
"namespaces": ["\n/summaries/{actorId}/{sessionId}/\n"]
}
}]
)

print(memory)
```

```
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the CreateMemory operation: 1 validation error detected: Value at 'memoryStrategies.1.member.summaryMemoryStrategy.namespaces' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 1024, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: [a-zA-Z0-9\-_\/]*(\{(actorId|sessionId|memoryStrategyId)\}[a-zA-Z0-9\-_\/]*)*]

```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.