@pydantic/genai-prices 0.0.21 → 0.0.22
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/cli.js +392 -398
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +275 -277
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,8 @@ export declare interface ConditionalPrice {
|
|
|
7
7
|
|
|
8
8
|
export declare function extractUsage(provider: Provider, responseData: unknown, apiFlavor?: string): [string, Usage];
|
|
9
9
|
|
|
10
|
+
export declare function findProvider(options: ProviderFindOptions): Provider | undefined;
|
|
11
|
+
|
|
10
12
|
export declare type MatchLogic = {
|
|
11
13
|
and: MatchLogic[];
|
|
12
14
|
} | {
|
|
@@ -69,6 +71,7 @@ export declare interface PriceDataStorage {
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
export declare interface PriceOptions {
|
|
74
|
+
provider?: Provider;
|
|
72
75
|
providerApiUrl?: string;
|
|
73
76
|
providerId?: string;
|
|
74
77
|
timestamp?: Date;
|
|
@@ -87,6 +90,12 @@ export declare interface Provider {
|
|
|
87
90
|
provider_match?: MatchLogic;
|
|
88
91
|
}
|
|
89
92
|
|
|
93
|
+
export declare interface ProviderFindOptions {
|
|
94
|
+
modelId?: string;
|
|
95
|
+
providerApiUrl?: string;
|
|
96
|
+
providerId?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
90
99
|
export declare const REMOTE_DATA_JSON_URL = "https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json";
|
|
91
100
|
|
|
92
101
|
export declare interface StartDateConstraint {
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare interface ConditionalPrice {
|
|
|
7
7
|
|
|
8
8
|
export declare function extractUsage(provider: Provider, responseData: unknown, apiFlavor?: string): [string, Usage];
|
|
9
9
|
|
|
10
|
+
export declare function findProvider(options: ProviderFindOptions): Provider | undefined;
|
|
11
|
+
|
|
10
12
|
export declare type MatchLogic = {
|
|
11
13
|
and: MatchLogic[];
|
|
12
14
|
} | {
|
|
@@ -69,6 +71,7 @@ export declare interface PriceDataStorage {
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
export declare interface PriceOptions {
|
|
74
|
+
provider?: Provider;
|
|
72
75
|
providerApiUrl?: string;
|
|
73
76
|
providerId?: string;
|
|
74
77
|
timestamp?: Date;
|
|
@@ -87,6 +90,12 @@ export declare interface Provider {
|
|
|
87
90
|
provider_match?: MatchLogic;
|
|
88
91
|
}
|
|
89
92
|
|
|
93
|
+
export declare interface ProviderFindOptions {
|
|
94
|
+
modelId?: string;
|
|
95
|
+
providerApiUrl?: string;
|
|
96
|
+
providerId?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
90
99
|
export declare const REMOTE_DATA_JSON_URL = "https://raw.githubusercontent.com/pydantic/genai-prices/main/prices/data.json";
|
|
91
100
|
|
|
92
101
|
export declare interface StartDateConstraint {
|