Improve stream advisor processing
* Fixes an issue with advisor name resolution * Streamlines repeating code * Add a new advisor strategy for ON_FINISH_REASON streaming responses, which is used by the Q&A advisor * Improve observable instrumentation by passing the parent observation to the advisor observation
This commit is contained in:
committed by
Mark Pollack
parent
37c34507cf
commit
bf8dabfb11
@@ -471,16 +471,11 @@ public class ChatClientTest {
|
||||
|
||||
assertThat(response).isEqualTo("response");
|
||||
|
||||
assertThat(promptCaptor.getValue().getInstructions()).hasSize(2);
|
||||
assertThat(promptCaptor.getValue().getInstructions()).hasSize(1);
|
||||
|
||||
Message systemMessage = promptCaptor.getValue().getInstructions().get(0);
|
||||
assertThat(systemMessage.getContent()).isEqualTo("System prompt");
|
||||
assertThat(systemMessage.getMessageType()).isEqualTo(MessageType.SYSTEM);
|
||||
|
||||
// Is this expected?
|
||||
Message userMessage = promptCaptor.getValue().getInstructions().get(1);
|
||||
assertThat(userMessage.getContent()).isEqualTo("");
|
||||
assertThat(userMessage.getMessageType()).isEqualTo(MessageType.USER);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user