Skip to content

Commit 0482d6c

Browse files
Address Comments
Signed-off-by: rithin-pullela-aws <rithinp@amazon.com>
1 parent 94038e9 commit 0482d6c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

plugin/src/main/java/org/opensearch/ml/action/memorycontainer/memory/MemoryProcessingService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public void extractFactsFromConversation(
7070
StringBuilder userMessages = new StringBuilder();
7171
for (MessageInput message : messages) {
7272
userMessages.append(message.getContent());
73+
userMessages.append(System.lineSeparator());
7374
}
7475
String messagesJson = userMessages.toString();
7576
stringParameters.put("messages", escapeJson(messagesJson));

plugin/src/test/java/org/opensearch/ml/rest/RestMLAgenticMemoryIT.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ public void setup() throws IOException, InterruptedException {
104104

105105
@Test
106106
public void testCreateMemoryContainerAndAddMemories_openAI() throws IOException, InterruptedException {
107+
if (OPENAI_KEY == null) {
108+
return;
109+
}
107110
// Create OpenAI model and memory container
108111
String openaiModelId = registerLLMModel();
109112
String memoryContainerId = createMemoryContainerWithModel(
@@ -172,6 +175,9 @@ public void testCreateMemoryContainerAndAddMemories_openAI() throws IOException,
172175

173176
@Test
174177
public void testUpdateMemoriesWithContradictoryInformation_openAI() throws IOException, InterruptedException {
178+
if (OPENAI_KEY == null) {
179+
return;
180+
}
175181
// Create OpenAI model and memory container
176182
String openaiModelId = registerLLMModel();
177183
String memoryContainerId = createMemoryContainerWithModel(

0 commit comments

Comments
 (0)