@providerprotocol/ai 0.0.28 → 0.0.31
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/anthropic/index.d.ts +11 -0
- package/dist/anthropic/index.js +7 -7
- package/dist/anthropic/index.js.map +1 -1
- package/dist/{chunk-Z6DKC37J.js → chunk-3C7O2RNO.js} +2 -2
- package/dist/{chunk-55X3W2MN.js → chunk-3D6XGGVG.js} +9 -2
- package/dist/{chunk-55X3W2MN.js.map → chunk-3D6XGGVG.js.map} +1 -1
- package/dist/{chunk-QNJO7DSD.js → chunk-4J6OFUKX.js} +10 -1
- package/dist/chunk-4J6OFUKX.js.map +1 -0
- package/dist/{chunk-SBCATNHA.js → chunk-KUPF5KHT.js} +2 -2
- package/dist/{embedding-DtyOFIsS.d.ts → embedding-k7g-BcSY.d.ts} +14 -1
- package/dist/google/index.d.ts +4 -0
- package/dist/google/index.js +14 -10
- package/dist/google/index.js.map +1 -1
- package/dist/http/index.d.ts +7 -2
- package/dist/http/index.js +9 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/ollama/index.js +24 -18
- package/dist/ollama/index.js.map +1 -1
- package/dist/openai/index.js +8 -11
- package/dist/openai/index.js.map +1 -1
- package/dist/openrouter/index.d.ts +1 -1
- package/dist/openrouter/index.js +6 -4
- package/dist/openrouter/index.js.map +1 -1
- package/dist/proxy/index.d.ts +1 -1
- package/dist/proxy/index.js +2 -2
- package/dist/{retry-DXLQnTuU.d.ts → retry-CyAwm_KZ.d.ts} +15 -1
- package/dist/xai/index.d.ts +15 -35
- package/dist/xai/index.js +11 -14
- package/dist/xai/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-QNJO7DSD.js.map +0 -1
- /package/dist/{chunk-Z6DKC37J.js.map → chunk-3C7O2RNO.js.map} +0 -0
- /package/dist/{chunk-SBCATNHA.js.map → chunk-KUPF5KHT.js.map} +0 -0
package/dist/http/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
NoRetry,
|
|
5
5
|
RetryAfterStrategy,
|
|
6
6
|
TokenBucket
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KUPF5KHT.js";
|
|
8
8
|
import {
|
|
9
9
|
parseSSEStream,
|
|
10
10
|
parseSimpleTextStream
|
|
@@ -13,8 +13,9 @@ import {
|
|
|
13
13
|
DynamicKey,
|
|
14
14
|
RoundRobinKeys,
|
|
15
15
|
WeightedKeys,
|
|
16
|
+
maskApiKey,
|
|
16
17
|
resolveApiKey
|
|
17
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-3D6XGGVG.js";
|
|
18
19
|
import {
|
|
19
20
|
cancelledError,
|
|
20
21
|
doFetch,
|
|
@@ -22,8 +23,9 @@ import {
|
|
|
22
23
|
networkError,
|
|
23
24
|
normalizeHttpError,
|
|
24
25
|
statusToErrorCode,
|
|
25
|
-
timeoutError
|
|
26
|
-
|
|
26
|
+
timeoutError,
|
|
27
|
+
warnInsecureUrl
|
|
28
|
+
} from "../chunk-4J6OFUKX.js";
|
|
27
29
|
export {
|
|
28
30
|
DynamicKey,
|
|
29
31
|
ExponentialBackoff,
|
|
@@ -36,12 +38,14 @@ export {
|
|
|
36
38
|
cancelledError,
|
|
37
39
|
doFetch,
|
|
38
40
|
doStreamFetch,
|
|
41
|
+
maskApiKey,
|
|
39
42
|
networkError,
|
|
40
43
|
normalizeHttpError,
|
|
41
44
|
parseSSEStream,
|
|
42
45
|
parseSimpleTextStream,
|
|
43
46
|
resolveApiKey,
|
|
44
47
|
statusToErrorCode,
|
|
45
|
-
timeoutError
|
|
48
|
+
timeoutError,
|
|
49
|
+
warnInsecureUrl
|
|
46
50
|
};
|
|
47
51
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { L as LLMOptions, a as LLMInstance, I as ImageOptions, b as ImageInstance, c as LLMHandler, E as EmbeddingHandler, d as ImageHandler, P as Provider, M as ModelReference, D as DocumentSource, e as DocumentBlock, A as AudioBlock, V as VideoBlock } from './llm-DgDEy9il.js';
|
|
2
2
|
export { S as AfterCallResult, o as AssistantContent, Z as AssistantMessage, Q as BeforeCallResult, B as BinaryBlock, aw as BoundEmbeddingModel, aV as BoundImageModel, aG as BoundLLMModel, C as ContentBlock, p as ContentBlockType, r as DocumentSourceType, aB as EmbeddingInput, au as EmbeddingProvider, ax as EmbeddingRequest, ay as EmbeddingResponse, aA as EmbeddingUsage, az as EmbeddingVector, g as ErrorCode, af as EventDelta, aL as GeneratedImage, f as Image, l as ImageBlock, aQ as ImageCapabilities, aJ as ImageEditInput, aS as ImageEditRequest, aK as ImageGenerateOptions, aI as ImageInput, aW as ImageModelInput, av as ImageProvider, aU as ImageProviderStreamResult, aR as ImageRequest, aT as ImageResponse, aN as ImageResult, m as ImageSource, q as ImageSourceType, aO as ImageStreamEvent, aP as ImageStreamResult, aM as ImageUsage, aH as InferenceInput, J as JSONSchema, j as JSONSchemaProperty, k as JSONSchemaPropertyType, ar as KeyStrategy, aC as LLMCapabilities, at as LLMProvider, aD as LLMRequest, aE as LLMResponse, aF as LLMStreamResult, X as Message, ad as MessageJSON, a4 as MessageMetadata, a5 as MessageOptions, $ as MessageRole, a3 as MessageType, i as Modality, h as ModalityType, aq as ProviderConfig, ap as ProviderIdentity, R as ReasoningBlock, as as RetryStrategy, ae as StreamEvent, ah as StreamEventType, ag as StreamResult, T as TextBlock, ab as Thread, ac as ThreadJSON, a7 as TokenUsage, G as Tool, H as ToolCall, W as ToolExecution, N as ToolMetadata, K as ToolResult, _ as ToolResultMessage, O as ToolUseStrategy, a6 as Turn, U as UPPError, n as UserContent, Y as UserMessage, aa as aggregateUsage, an as contentBlockStart, ao as contentBlockStop, ai as createStreamResult, a8 as createTurn, a9 as emptyUsage, a1 as isAssistantMessage, y as isAudioBlock, F as isBinaryBlock, x as isDocumentBlock, w as isImageBlock, v as isReasoningBlock, u as isTextBlock, a2 as isToolResultMessage, a0 as isUserMessage, z as isVideoBlock, al as messageStart, am as messageStop, s as reasoning, t as text, aj as textDelta, ak as toolCallDelta } from './llm-DgDEy9il.js';
|
|
3
|
-
import { E as EmbeddingOptions, a as EmbeddingInstance } from './embedding-
|
|
4
|
-
export { b as EmbedOptions, c as Embedding, g as EmbeddingModelInput, e as EmbeddingProgress, d as EmbeddingResult, f as EmbeddingStream } from './embedding-
|
|
5
|
-
export { D as DynamicKey, E as ExponentialBackoff, L as LinearBackoff, N as NoRetry, a as RetryAfterStrategy, R as RoundRobinKeys, T as TokenBucket, W as WeightedKeys } from './retry-
|
|
3
|
+
import { E as EmbeddingOptions, a as EmbeddingInstance } from './embedding-k7g-BcSY.js';
|
|
4
|
+
export { b as EmbedOptions, c as Embedding, h as EmbeddingInputType, g as EmbeddingModelInput, e as EmbeddingProgress, d as EmbeddingResult, f as EmbeddingStream } from './embedding-k7g-BcSY.js';
|
|
5
|
+
export { D as DynamicKey, E as ExponentialBackoff, L as LinearBackoff, N as NoRetry, a as RetryAfterStrategy, R as RoundRobinKeys, T as TokenBucket, W as WeightedKeys } from './retry-CyAwm_KZ.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @fileoverview LLM instance factory and streaming logic for the Universal Provider Protocol.
|
package/dist/index.js
CHANGED
|
@@ -39,19 +39,19 @@ import {
|
|
|
39
39
|
NoRetry,
|
|
40
40
|
RetryAfterStrategy,
|
|
41
41
|
TokenBucket
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KUPF5KHT.js";
|
|
43
43
|
import "./chunk-TOJCZMVU.js";
|
|
44
44
|
import {
|
|
45
45
|
DynamicKey,
|
|
46
46
|
RoundRobinKeys,
|
|
47
47
|
WeightedKeys
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-3D6XGGVG.js";
|
|
49
49
|
import {
|
|
50
50
|
ErrorCode,
|
|
51
51
|
ModalityType,
|
|
52
52
|
UPPError,
|
|
53
53
|
toError
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-4J6OFUKX.js";
|
|
55
55
|
|
|
56
56
|
// src/types/content.ts
|
|
57
57
|
var ContentBlockType = {
|
|
@@ -1810,6 +1810,14 @@ var Thread = class _Thread {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
};
|
|
1812
1812
|
|
|
1813
|
+
// src/types/embedding.ts
|
|
1814
|
+
var EmbeddingInputType = {
|
|
1815
|
+
/** Input is a document to be stored/indexed */
|
|
1816
|
+
Document: "document",
|
|
1817
|
+
/** Input is a query for retrieval/search */
|
|
1818
|
+
Query: "query"
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1813
1821
|
// src/index.ts
|
|
1814
1822
|
var ai = {
|
|
1815
1823
|
/** LLM instance factory */
|
|
@@ -1826,6 +1834,7 @@ export {
|
|
|
1826
1834
|
Document,
|
|
1827
1835
|
DocumentSourceType,
|
|
1828
1836
|
DynamicKey,
|
|
1837
|
+
EmbeddingInputType,
|
|
1829
1838
|
ErrorCode,
|
|
1830
1839
|
ExponentialBackoff,
|
|
1831
1840
|
Image,
|