pendra 0.18.0 → 0.19.0

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
@@ -73,6 +73,15 @@ interface ChatCompletionMessageParam {
73
73
  tool_call_id?: string;
74
74
  /** On an assistant message you replay back, the calls it made. */
75
75
  tool_calls?: ChatCompletionMessageToolCall[];
76
+ /**
77
+ * On an assistant message you replay back, the reasoning it arrived with.
78
+ * Models that use earlier thinking keep track of their plan with it across
79
+ * tool calls; others ignore it. Accepts `null` so a returned
80
+ * {@link ChatCompletionMessage} can be appended to `messages` as it is.
81
+ */
82
+ reasoning_content?: string | null;
83
+ /** Alias of {@link ChatCompletionMessageParam.reasoning_content}; that one wins if both are set. */
84
+ reasoning?: string | null;
76
85
  }
77
86
  interface Choice {
78
87
  index: number;
@@ -530,6 +539,12 @@ interface EmbeddingCreateParams {
530
539
  input: string | string[];
531
540
  encoding_format?: "float" | "base64";
532
541
  dimensions?: number;
542
+ /**
543
+ * What the text is for: `"document"` (the default) for text you store and
544
+ * search over, `"query"` for a search against it, `"none"` to embed the text
545
+ * exactly as sent. Pendra formats the input the way the model expects.
546
+ */
547
+ input_type?: "query" | "document" | "none";
533
548
  user?: string;
534
549
  /** Pin to a specific worker (sent as the `X-Pendra-Worker-Id` header). */
535
550
  worker_id?: string | null;
@@ -1019,4 +1034,5 @@ declare class APIStreamError extends APIError {
1019
1034
  });
1020
1035
  }
1021
1036
 
1022
- export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, type APIStatusErrorOptions, APIStreamError, type AudioFileInput, AuthenticationError, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionContentPart, type ChatCompletionCreateParams, type ChatCompletionMessage, type ChatCompletionMessageParam, type ChatCompletionMessageToolCall, type Choice, type ChoiceDelta, type CompletionTokensDetails, type CreateEmbeddingResponse, type Embedding, type EmbeddingCreateParams, type EmbeddingUsage, type ImageData, type ImageGenerationCreateParams, type ImageResponse, type Model, type ModerationCreateParams, type ModerationImageURLInput, type ModerationInput, type ModerationInputPart, type ModerationResponse, type ModerationResult, type ModerationTextInput, Pendra, type PendraExtension, type PendraNotice, type PendraOptions, type PendraTiming, type PendraWebToolStep, type PendraWorker, PrivateInferenceError, RateLimitError, type RerankCreateParams, type RerankResponse, type RerankResult, type RerankResultDocument, type SpeechCreateParams, type SpeechResponse, Stream, type StreamChoice, type TranscriptionCreateParams, type TranscriptionResponse, type TranscriptionSegment, type Usage, Pendra as default };
1037
+ export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APIStreamError, AuthenticationError, Pendra, PrivateInferenceError, RateLimitError, Stream, Pendra as default };
1038
+ export type { APIStatusErrorOptions, AudioFileInput, ChatCompletion, ChatCompletionChunk, ChatCompletionContentPart, ChatCompletionCreateParams, ChatCompletionMessage, ChatCompletionMessageParam, ChatCompletionMessageToolCall, Choice, ChoiceDelta, CompletionTokensDetails, CreateEmbeddingResponse, Embedding, EmbeddingCreateParams, EmbeddingUsage, ImageData, ImageGenerationCreateParams, ImageResponse, Model, ModerationCreateParams, ModerationImageURLInput, ModerationInput, ModerationInputPart, ModerationResponse, ModerationResult, ModerationTextInput, PendraExtension, PendraNotice, PendraOptions, PendraTiming, PendraWebToolStep, PendraWorker, RerankCreateParams, RerankResponse, RerankResult, RerankResultDocument, SpeechCreateParams, SpeechResponse, StreamChoice, TranscriptionCreateParams, TranscriptionResponse, TranscriptionSegment, Usage };
package/dist/index.d.ts CHANGED
@@ -73,6 +73,15 @@ interface ChatCompletionMessageParam {
73
73
  tool_call_id?: string;
74
74
  /** On an assistant message you replay back, the calls it made. */
75
75
  tool_calls?: ChatCompletionMessageToolCall[];
76
+ /**
77
+ * On an assistant message you replay back, the reasoning it arrived with.
78
+ * Models that use earlier thinking keep track of their plan with it across
79
+ * tool calls; others ignore it. Accepts `null` so a returned
80
+ * {@link ChatCompletionMessage} can be appended to `messages` as it is.
81
+ */
82
+ reasoning_content?: string | null;
83
+ /** Alias of {@link ChatCompletionMessageParam.reasoning_content}; that one wins if both are set. */
84
+ reasoning?: string | null;
76
85
  }
77
86
  interface Choice {
78
87
  index: number;
@@ -530,6 +539,12 @@ interface EmbeddingCreateParams {
530
539
  input: string | string[];
531
540
  encoding_format?: "float" | "base64";
532
541
  dimensions?: number;
542
+ /**
543
+ * What the text is for: `"document"` (the default) for text you store and
544
+ * search over, `"query"` for a search against it, `"none"` to embed the text
545
+ * exactly as sent. Pendra formats the input the way the model expects.
546
+ */
547
+ input_type?: "query" | "document" | "none";
533
548
  user?: string;
534
549
  /** Pin to a specific worker (sent as the `X-Pendra-Worker-Id` header). */
535
550
  worker_id?: string | null;
@@ -1019,4 +1034,5 @@ declare class APIStreamError extends APIError {
1019
1034
  });
1020
1035
  }
1021
1036
 
1022
- export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, type APIStatusErrorOptions, APIStreamError, type AudioFileInput, AuthenticationError, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionContentPart, type ChatCompletionCreateParams, type ChatCompletionMessage, type ChatCompletionMessageParam, type ChatCompletionMessageToolCall, type Choice, type ChoiceDelta, type CompletionTokensDetails, type CreateEmbeddingResponse, type Embedding, type EmbeddingCreateParams, type EmbeddingUsage, type ImageData, type ImageGenerationCreateParams, type ImageResponse, type Model, type ModerationCreateParams, type ModerationImageURLInput, type ModerationInput, type ModerationInputPart, type ModerationResponse, type ModerationResult, type ModerationTextInput, Pendra, type PendraExtension, type PendraNotice, type PendraOptions, type PendraTiming, type PendraWebToolStep, type PendraWorker, PrivateInferenceError, RateLimitError, type RerankCreateParams, type RerankResponse, type RerankResult, type RerankResultDocument, type SpeechCreateParams, type SpeechResponse, Stream, type StreamChoice, type TranscriptionCreateParams, type TranscriptionResponse, type TranscriptionSegment, type Usage, Pendra as default };
1037
+ export { APIConnectionError, APIError, APIResponseValidationError, APIStatusError, APIStreamError, AuthenticationError, Pendra, PrivateInferenceError, RateLimitError, Stream, Pendra as default };
1038
+ export type { APIStatusErrorOptions, AudioFileInput, ChatCompletion, ChatCompletionChunk, ChatCompletionContentPart, ChatCompletionCreateParams, ChatCompletionMessage, ChatCompletionMessageParam, ChatCompletionMessageToolCall, Choice, ChoiceDelta, CompletionTokensDetails, CreateEmbeddingResponse, Embedding, EmbeddingCreateParams, EmbeddingUsage, ImageData, ImageGenerationCreateParams, ImageResponse, Model, ModerationCreateParams, ModerationImageURLInput, ModerationInput, ModerationInputPart, ModerationResponse, ModerationResult, ModerationTextInput, PendraExtension, PendraNotice, PendraOptions, PendraTiming, PendraWebToolStep, PendraWorker, RerankCreateParams, RerankResponse, RerankResult, RerankResultDocument, SpeechCreateParams, SpeechResponse, StreamChoice, TranscriptionCreateParams, TranscriptionResponse, TranscriptionSegment, Usage };
package/dist/index.js CHANGED
@@ -1640,6 +1640,7 @@ var Embeddings = class {
1640
1640
  };
1641
1641
  if (params.encoding_format != null) body.encoding_format = params.encoding_format;
1642
1642
  if (params.dimensions != null) body.dimensions = params.dimensions;
1643
+ if (params.input_type != null) body.input_type = params.input_type;
1643
1644
  if (params.user != null) body.user = params.user;
1644
1645
  const headers = params.worker_id ? { "X-Pendra-Worker-Id": params.worker_id } : void 0;
1645
1646
  if (this.client.privateInferenceEnabled) {
@@ -1956,7 +1957,7 @@ var Rerank = class {
1956
1957
  };
1957
1958
 
1958
1959
  // src/version.ts
1959
- var VERSION = "0.18.0";
1960
+ var VERSION = "0.19.0";
1960
1961
  var USER_AGENT = `pendra-node/${VERSION}`;
1961
1962
 
1962
1963
  // src/client.ts