@absolutejs/absolute 0.19.0-beta.530 → 0.19.0-beta.531

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -215,6 +215,7 @@ var serverMessageToAction = (msg) => {
215
215
  retrievalStartedAt: msg.retrievalStartedAt,
216
216
  retrievedAt: msg.retrievedAt,
217
217
  sources: msg.sources,
218
+ trace: msg.trace,
218
219
  type: "rag_retrieved"
219
220
  };
220
221
  case "error":
@@ -482,6 +483,7 @@ var handleRAGRetrieved = (state, action) => {
482
483
  message.retrievalStartedAt = action.retrievalStartedAt ?? message.retrievalStartedAt;
483
484
  message.retrievedAt = action.retrievedAt;
484
485
  message.retrievalDurationMs = action.retrievalDurationMs;
486
+ message.retrievalTrace = action.trace;
485
487
  conversation.messages = [...conversation.messages];
486
488
  };
487
489
  var handleRAGRetrieving = (state, action) => {
@@ -1591,8 +1593,19 @@ var createRAGClient = (options) => {
1591
1593
  return parseJson(response);
1592
1594
  },
1593
1595
  async search(input) {
1594
- const result = await this.searchDetailed(input);
1595
- return result.results;
1596
+ const response = await fetchImpl(`${basePath}/search`, {
1597
+ body: JSON.stringify(input),
1598
+ headers: jsonHeaders,
1599
+ method: "POST"
1600
+ });
1601
+ if (!response.ok) {
1602
+ throw new Error(await toErrorMessage(response));
1603
+ }
1604
+ const payload = await parseJson(response);
1605
+ if (!payload.ok) {
1606
+ throw new Error(payload.error ?? "RAG search failed");
1607
+ }
1608
+ return payload.results ?? [];
1596
1609
  },
1597
1610
  async searchDetailed(input) {
1598
1611
  const response = await fetchImpl(`${basePath}/search`, {
@@ -2626,5 +2639,5 @@ export {
2626
2639
  buildRAGAnswerWorkflowState
2627
2640
  };
2628
2641
 
2629
- //# debugId=AD03173044876B9764756E2164756E21
2642
+ //# debugId=CBECE8C7471759AC64756E2164756E21
2630
2643
  //# sourceMappingURL=index.js.map