@codehz/ai 0.4.0 → 0.4.2

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.
package/dist/index.d.mts CHANGED
@@ -606,7 +606,7 @@ type ResponsesTool = {
606
606
  type: "function";
607
607
  name: string;
608
608
  description?: string;
609
- input_schema: Record<string, unknown>;
609
+ parameters: Record<string, unknown>;
610
610
  };
611
611
  declare class ResponsesAdapter extends AdapterBase {
612
612
  readonly kind: "responses";
package/dist/index.mjs CHANGED
@@ -1846,7 +1846,7 @@ var ResponsesAdapter = class extends AdapterBase {
1846
1846
  type: "function",
1847
1847
  name: t.name,
1848
1848
  description: t.description,
1849
- input_schema: t.inputSchema
1849
+ parameters: t.inputSchema
1850
1850
  }));
1851
1851
  body.tool_choice = mapper$3.mapToolChoice(request.toolChoice, {
1852
1852
  auto: "auto",
@@ -2772,7 +2772,7 @@ var ChatCompletionsAdapter = class extends AdapterBase {
2772
2772
  }
2773
2773
  }
2774
2774
  if (!gate.completed && (hasMessageStarted || hasReasoningStarted || pendingToolCalls.size > 0)) {
2775
- yield factory.responseWarning("Stream ended without a finish_reason", "INCOMPLETE_STREAM");
2775
+ yield factory.responseWarning("Stream ended without a finish_reason", WarningCode.STREAM_INCOMPLETE);
2776
2776
  const { events, assistantReplayMessage } = finalizePendingTurn();
2777
2777
  for (const event of events) yield event;
2778
2778
  yield* emitCompleted(void 0, assistantReplayMessage, responseId);
@@ -3038,7 +3038,7 @@ var OllamaAdapter = class extends AdapterBase {
3038
3038
  }
3039
3039
  }
3040
3040
  if (!gate.completed && (hasMessageStarted || pendingToolCalls.length > 0)) {
3041
- yield factory.responseWarning("Stream ended without a done signal", "INCOMPLETE_STREAM");
3041
+ yield factory.responseWarning("Stream ended without a done signal", WarningCode.STREAM_INCOMPLETE);
3042
3042
  if (hasMessageStarted) {
3043
3043
  const message = messageItem([textBlock(accumulatedContent)], { id: currentMessageId });
3044
3044
  yield factory.messageCompleted(currentMessageId);