@acosmi/sdk-ts 1.0.1 → 1.1.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/CHANGELOG.md +92 -0
- package/README.md +72 -4
- package/dist/browser/index.mjs +690 -59
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.mjs +690 -59
- package/dist/index.mjs.map +1 -1
- package/dist/node/adapters/anthropic.d.cts +1 -1
- package/dist/node/adapters/anthropic.d.ts +1 -1
- package/dist/node/adapters/openai.d.cts +1 -1
- package/dist/node/adapters/openai.d.ts +1 -1
- package/dist/node/{index-C3Z_84Bv.d.cts → index-BI8EgBXu.d.cts} +1 -1
- package/dist/node/{index-C3Z_84Bv.d.ts → index-BI8EgBXu.d.ts} +1 -1
- package/dist/node/index.cjs +692 -58
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +257 -9
- package/dist/node/index.d.ts +257 -9
- package/dist/node/index.mjs +690 -59
- package/dist/node/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProviderAdapter, aj as ProviderFormat,
|
|
1
|
+
import { P as ProviderAdapter, aj as ProviderFormat, c as ModelCapabilities, d as ChatRequest, e as ChatResponse, f as StreamEvent } from '../index-BI8EgBXu.cjs';
|
|
2
2
|
|
|
3
3
|
/** 实现 ProviderAdapter, 用于 Anthropic 原生模型 */
|
|
4
4
|
declare class AnthropicAdapter implements ProviderAdapter {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProviderAdapter, aj as ProviderFormat,
|
|
1
|
+
import { P as ProviderAdapter, aj as ProviderFormat, c as ModelCapabilities, d as ChatRequest, e as ChatResponse, f as StreamEvent } from '../index-BI8EgBXu.js';
|
|
2
2
|
|
|
3
3
|
/** 实现 ProviderAdapter, 用于 Anthropic 原生模型 */
|
|
4
4
|
declare class AnthropicAdapter implements ProviderAdapter {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProviderAdapter, aj as ProviderFormat,
|
|
1
|
+
import { P as ProviderAdapter, aj as ProviderFormat, c as ModelCapabilities, d as ChatRequest, e as ChatResponse, f as StreamEvent, A as AnthropicResponse } from '../index-BI8EgBXu.cjs';
|
|
2
2
|
|
|
3
3
|
/** 实现 ProviderAdapter, 用于所有非 Anthropic 厂商 */
|
|
4
4
|
declare class OpenAIAdapter implements ProviderAdapter {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProviderAdapter, aj as ProviderFormat,
|
|
1
|
+
import { P as ProviderAdapter, aj as ProviderFormat, c as ModelCapabilities, d as ChatRequest, e as ChatResponse, f as StreamEvent, A as AnthropicResponse } from '../index-BI8EgBXu.js';
|
|
2
2
|
|
|
3
3
|
/** 实现 ProviderAdapter, 用于所有非 Anthropic 厂商 */
|
|
4
4
|
declare class OpenAIAdapter implements ProviderAdapter {
|
|
@@ -989,4 +989,4 @@ declare function getAdapter(provider: string): ProviderAdapter;
|
|
|
989
989
|
*/
|
|
990
990
|
declare function getAdapterForModel(m: ManagedModel): ProviderAdapter;
|
|
991
991
|
|
|
992
|
-
export { type ConsumeRecord as $, type AnthropicResponse as A, type BalanceDetail as B, type ClientRegistration as C, type DeviceRegistration as D, type EntitlementBalance as E, type NotificationPreference as F, type GenerateSkillRequest as G, type WSEvent as H, type APIResponse as I, type AnthropicContentBlock as J, type AnthropicUsage as K, BucketClassCommercial as L, type
|
|
992
|
+
export { type ConsumeRecord as $, type AnthropicResponse as A, type BalanceDetail as B, type ClientRegistration as C, type DeviceRegistration as D, type EntitlementBalance as E, type NotificationPreference as F, type GenerateSkillRequest as G, type WSEvent as H, type APIResponse as I, type AnthropicContentBlock as J, type AnthropicUsage as K, BucketClassCommercial as L, type ManagedModel as M, type NotificationList as N, type Order as O, type ProviderAdapter as P, type QuotaSummary as Q, BucketClassGeneric as R, type ServerMetadata as S, type TokenResponse as T, type BucketInfo as U, type BucketRow as V, type WalletStats as W, BusinessError as X, type ChatContentBlock as Y, type ChatMessage as Z, type ChatUsage as _, type TokenSet as a, type EffortConfig as a0, type GeoLoc as a1, HTTPError as a2, ModelNotFoundError as a3, NetworkError as a4, type Notification as a5, type NotificationUnreadCount as a6, type OpenAIChatChoice as a7, type OpenAIChatMessage as a8, type OpenAIChatResponse as a9, anthropicResponseTextContent as aA, anthropicResponseThinkingContent as aB, anthropicResponseToolUseBlocks as aC, apiResponseBusinessError as aD, apiResponseGetMessage as aE, bucketInfoIsCommercial as aF, bucketRowIsCommercial as aG, getAdapter as aH, getAdapterForModel as aI, newThinkingConfig as aJ, newWebSearchTool as aK, parseNotificationEvent as aL, parseSettlement as aM, parseSourcesEvent as aN, tokenSetIsExpired as aO, type OpenAIFunctionCall as aa, type OpenAIStreamChoice as ab, type OpenAIStreamChunk as ac, type OpenAIStreamDelta as ad, type OpenAIStreamToolCall as ae, type OpenAIToolCall as af, type OpenAIUsage as ag, OrderTerminalError as ah, type OutputConfig as ai, ProviderFormat as aj, RateLimitError as ak, type ServerTool as al, ServerToolTypeWebSearch as am, type SkillStoreListItem as an, StreamError as ao, type ThinkingConfig as ap, ThinkingHigh as aq, ThinkingHighMinMaxTokens as ar, ThinkingMax as as, ThinkingMaxFallbackMaxTokens as at, ThinkingOff as au, type ToolListResponse as av, type ToolProvider as aw, type WebSearchConfig as ax, type WebSearchSource as ay, type YudaoPageResult as az, type ModelCoefficient as b, type ModelCapabilities as c, type ChatRequest as d, type ChatResponse as e, type StreamEvent as f, type SourcesEvent as g, type StreamSettlement as h, type EntitlementItem as i, type ConsumeRecordPage as j, type ModelByQuotaResponse as k, type ModelBucket as l, type TokenPackage as m, type PayPayload as n, type OrderStatus as o, type Transaction as p, type SkillStoreQuery as q, type SkillStoreItem as r, type SkillBrowseResponse as s, type SkillBrowseListResponse as t, type SkillSummary as u, type CertificationStatus as v, type GenerateSkillResult as w, type OptimizeSkillRequest as x, type OptimizeSkillResult as y, type ToolView as z };
|
|
@@ -989,4 +989,4 @@ declare function getAdapter(provider: string): ProviderAdapter;
|
|
|
989
989
|
*/
|
|
990
990
|
declare function getAdapterForModel(m: ManagedModel): ProviderAdapter;
|
|
991
991
|
|
|
992
|
-
export { type ConsumeRecord as $, type AnthropicResponse as A, type BalanceDetail as B, type ClientRegistration as C, type DeviceRegistration as D, type EntitlementBalance as E, type NotificationPreference as F, type GenerateSkillRequest as G, type WSEvent as H, type APIResponse as I, type AnthropicContentBlock as J, type AnthropicUsage as K, BucketClassCommercial as L, type
|
|
992
|
+
export { type ConsumeRecord as $, type AnthropicResponse as A, type BalanceDetail as B, type ClientRegistration as C, type DeviceRegistration as D, type EntitlementBalance as E, type NotificationPreference as F, type GenerateSkillRequest as G, type WSEvent as H, type APIResponse as I, type AnthropicContentBlock as J, type AnthropicUsage as K, BucketClassCommercial as L, type ManagedModel as M, type NotificationList as N, type Order as O, type ProviderAdapter as P, type QuotaSummary as Q, BucketClassGeneric as R, type ServerMetadata as S, type TokenResponse as T, type BucketInfo as U, type BucketRow as V, type WalletStats as W, BusinessError as X, type ChatContentBlock as Y, type ChatMessage as Z, type ChatUsage as _, type TokenSet as a, type EffortConfig as a0, type GeoLoc as a1, HTTPError as a2, ModelNotFoundError as a3, NetworkError as a4, type Notification as a5, type NotificationUnreadCount as a6, type OpenAIChatChoice as a7, type OpenAIChatMessage as a8, type OpenAIChatResponse as a9, anthropicResponseTextContent as aA, anthropicResponseThinkingContent as aB, anthropicResponseToolUseBlocks as aC, apiResponseBusinessError as aD, apiResponseGetMessage as aE, bucketInfoIsCommercial as aF, bucketRowIsCommercial as aG, getAdapter as aH, getAdapterForModel as aI, newThinkingConfig as aJ, newWebSearchTool as aK, parseNotificationEvent as aL, parseSettlement as aM, parseSourcesEvent as aN, tokenSetIsExpired as aO, type OpenAIFunctionCall as aa, type OpenAIStreamChoice as ab, type OpenAIStreamChunk as ac, type OpenAIStreamDelta as ad, type OpenAIStreamToolCall as ae, type OpenAIToolCall as af, type OpenAIUsage as ag, OrderTerminalError as ah, type OutputConfig as ai, ProviderFormat as aj, RateLimitError as ak, type ServerTool as al, ServerToolTypeWebSearch as am, type SkillStoreListItem as an, StreamError as ao, type ThinkingConfig as ap, ThinkingHigh as aq, ThinkingHighMinMaxTokens as ar, ThinkingMax as as, ThinkingMaxFallbackMaxTokens as at, ThinkingOff as au, type ToolListResponse as av, type ToolProvider as aw, type WebSearchConfig as ax, type WebSearchSource as ay, type YudaoPageResult as az, type ModelCoefficient as b, type ModelCapabilities as c, type ChatRequest as d, type ChatResponse as e, type StreamEvent as f, type SourcesEvent as g, type StreamSettlement as h, type EntitlementItem as i, type ConsumeRecordPage as j, type ModelByQuotaResponse as k, type ModelBucket as l, type TokenPackage as m, type PayPayload as n, type OrderStatus as o, type Transaction as p, type SkillStoreQuery as q, type SkillStoreItem as r, type SkillBrowseResponse as s, type SkillBrowseListResponse as t, type SkillSummary as u, type CertificationStatus as v, type GenerateSkillResult as w, type OptimizeSkillRequest as x, type OptimizeSkillResult as y, type ToolView as z };
|