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:
Christian Tzolov
2024-08-29 15:07:48 +02:00
committed by Mark Pollack
parent 37c34507cf
commit bf8dabfb11
12 changed files with 309 additions and 329 deletions

View File

@@ -44,8 +44,11 @@ public class SimplePersistentVectorStoreIT {
@Autowired
private EmbeddingModel embeddingModel;
@TempDir(cleanup = CleanupMode.ON_SUCCESS)
Path workingDir;
@Test
void persist(@TempDir(cleanup = CleanupMode.ON_SUCCESS) Path workingDir) {
void persist() {
JsonReader jsonReader = new JsonReader(bikesJsonResource, new ProductMetadataGenerator(), "price", "name",
"shortDescription", "description", "tags");
List<Document> documents = jsonReader.get();