Skip to content

Commit a19b09f

Browse files
author
Milder Hernandez Cagua
committed
Remove authorName from ChatMessageContent
1 parent c004ae0 commit a19b09f

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

agents/semantickernel-agents-core/src/main/java/com/microsoft/semantickernel/agents/chatcompletion/ChatCompletionAgent.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,7 @@ public Mono<List<AgentResponseItem<ChatMessageContent<?>>>> invokeAsync(
8080
)
8181
.flatMapMany(Flux::fromIterable)
8282
// notify on the new thread instance
83-
.concatMap(agentMessage -> {
84-
// Set the author name for the message
85-
agentMessage.setAuthorName(this.name);
86-
87-
return this.notifyThreadOfNewMessageAsync(agentThread, agentMessage).thenReturn(agentMessage);
88-
})
83+
.concatMap(agentMessage -> this.notifyThreadOfNewMessageAsync(agentThread, agentMessage).thenReturn(agentMessage))
8984
.collectList()
9085
.map(chatMessageContents ->
9186
chatMessageContents.stream()

semantickernel-api/src/main/java/com/microsoft/semantickernel/services/chatcompletion/ChatMessageContent.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* @param <T> the type of the inner content within the messages
2424
*/
2525
public class ChatMessageContent<T> extends KernelContentImpl<T> {
26-
27-
private String authorName;
2826
private final AuthorRole authorRole;
2927
@Nullable
3028
private final String content;
@@ -155,27 +153,6 @@ public ChatMessageContent(
155153
this.contentType = contentType;
156154
}
157155

158-
159-
/**
160-
* Gets the author name that generated the content
161-
*
162-
* @return the author name that generated the content
163-
*/
164-
@Nullable
165-
public String getAuthorName() {
166-
return authorName;
167-
}
168-
169-
/**
170-
* Sets the author name that generated the content
171-
*
172-
* @param authorName the author name that generated the content
173-
*/
174-
public void setAuthorName(String authorName) {
175-
this.authorName = authorName;
176-
}
177-
178-
179156
/**
180157
* Gets the author role that generated the content
181158
*

0 commit comments

Comments
 (0)