@valerypopoff/rivet2-cli 2.1.1 → 2.1.3
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/bin/cliRuntime.js
CHANGED
|
@@ -41,7 +41,16 @@ export function withProviderProcessorOptions(providerOptions, options) {
|
|
|
41
41
|
providerSettings.openAiEndpoint = providerOptions.openaiEndpoint;
|
|
42
42
|
}
|
|
43
43
|
if (providerOptions.openaiApiKey != null) {
|
|
44
|
-
providerSettings.
|
|
44
|
+
providerSettings.openAiApiKey = providerOptions.openaiApiKey;
|
|
45
|
+
}
|
|
46
|
+
if (providerOptions.anthropicApiKey != null) {
|
|
47
|
+
providerSettings.anthropicApiKey = providerOptions.anthropicApiKey;
|
|
48
|
+
}
|
|
49
|
+
if (providerOptions.googleApiKey != null) {
|
|
50
|
+
providerSettings.googleApiKey = providerOptions.googleApiKey;
|
|
51
|
+
}
|
|
52
|
+
if (providerOptions.customAiApiKey != null) {
|
|
53
|
+
providerSettings.customAiApiKey = providerOptions.customAiApiKey;
|
|
45
54
|
}
|
|
46
55
|
if (providerOptions.openaiOrganization != null) {
|
|
47
56
|
providerSettings.openAiOrganization = providerOptions.openaiOrganization;
|
|
@@ -57,9 +66,24 @@ export function addProviderOptions(y) {
|
|
|
57
66
|
describe: 'The OpenAI API key to use for the project. If omitted, the environment variable OPENAI_API_KEY is used.',
|
|
58
67
|
type: 'string',
|
|
59
68
|
demandOption: false,
|
|
69
|
+
})
|
|
70
|
+
.option('anthropic-api-key', {
|
|
71
|
+
describe: 'The Anthropic API key to use for LLM Chat nodes. If omitted, the environment variable ANTHROPIC_API_KEY is used.',
|
|
72
|
+
type: 'string',
|
|
73
|
+
demandOption: false,
|
|
74
|
+
})
|
|
75
|
+
.option('google-api-key', {
|
|
76
|
+
describe: 'The Google Generative AI API key to use for LLM Chat nodes. If omitted, the environment variable GOOGLE_GENERATIVE_AI_API_KEY is used.',
|
|
77
|
+
type: 'string',
|
|
78
|
+
demandOption: false,
|
|
79
|
+
})
|
|
80
|
+
.option('custom-ai-api-key', {
|
|
81
|
+
describe: 'The generic custom-provider API key to use for LLM Chat custom providers. If omitted, CUSTOM_PROVIDER_API_KEY, legacy CUSTOM_AI_API_KEY, or the node-specific environment variable is used.',
|
|
82
|
+
type: 'string',
|
|
83
|
+
demandOption: false,
|
|
60
84
|
})
|
|
61
85
|
.option('openai-endpoint', {
|
|
62
|
-
describe: '
|
|
86
|
+
describe: 'Explicit legacy OpenAI-compatible Chat endpoint override. Built-in LLM Chat and Generate using AI use provider-owned endpoints; use Custom provider for OpenAI-compatible hosts.',
|
|
63
87
|
type: 'string',
|
|
64
88
|
demandOption: false,
|
|
65
89
|
})
|
package/bin/commands/serve.js
CHANGED
|
@@ -164,8 +164,8 @@ async function streamGraph({ project, inputs, graph, providerOptions, runtime, s
|
|
|
164
164
|
});
|
|
165
165
|
return responseStream;
|
|
166
166
|
}
|
|
167
|
-
export function buildGraphProcessorOptions({ inputs, graph, openaiApiKey, openaiEndpoint, openaiOrganization, }) {
|
|
168
|
-
return withProviderProcessorOptions({ openaiApiKey, openaiEndpoint, openaiOrganization }, {
|
|
167
|
+
export function buildGraphProcessorOptions({ inputs, graph, anthropicApiKey, customAiApiKey, googleApiKey, openaiApiKey, openaiEndpoint, openaiOrganization, }) {
|
|
168
|
+
return withProviderProcessorOptions({ anthropicApiKey, customAiApiKey, googleApiKey, openaiApiKey, openaiEndpoint, openaiOrganization }, {
|
|
169
169
|
graph,
|
|
170
170
|
inputs,
|
|
171
171
|
});
|
|
@@ -7,6 +7,9 @@ export type DatasetCliOptions = {
|
|
|
7
7
|
};
|
|
8
8
|
export type ProviderCliOptions = {
|
|
9
9
|
openaiApiKey?: string;
|
|
10
|
+
anthropicApiKey?: string;
|
|
11
|
+
googleApiKey?: string;
|
|
12
|
+
customAiApiKey?: string;
|
|
10
13
|
openaiEndpoint?: string;
|
|
11
14
|
openaiOrganization?: string;
|
|
12
15
|
};
|
|
@@ -28,8 +31,8 @@ export declare function loadProjectRuntime(projectFile: string | undefined, data
|
|
|
28
31
|
export declare function createDatasetProvider(projectPath: string, { datasetFile, requireDatasetFile, saveDatasets }: DatasetCliOptions): Promise<NodeDatasetProvider>;
|
|
29
32
|
export declare function resolveDatasetFilePath(projectPath: string, datasetFile?: string): string;
|
|
30
33
|
export declare function withRuntimeProcessorOptions(runtime: Pick<LoadedProjectRuntime, 'datasetProvider' | 'projectPath'>, options: Omit<NodeCreateProcessorOptions, 'datasetProvider' | 'projectPath'>): NodeCreateProcessorOptions;
|
|
31
|
-
export declare function withCliProcessorOptions(runtime: Pick<LoadedProjectRuntime, 'datasetProvider' | 'projectPath'>, providerOptions: ProviderCliOptions, options: Omit<NodeCreateProcessorOptions, 'datasetProvider' | 'openAiEndpoint' | 'openAiKey' | 'openAiOrganization' | 'projectPath'>): NodeCreateProcessorOptions;
|
|
32
|
-
export declare function withProviderProcessorOptions(providerOptions: ProviderCliOptions, options: Omit<NodeCreateProcessorOptions, 'openAiEndpoint' | 'openAiKey' | 'openAiOrganization'>): NodeCreateProcessorOptions;
|
|
34
|
+
export declare function withCliProcessorOptions(runtime: Pick<LoadedProjectRuntime, 'datasetProvider' | 'projectPath'>, providerOptions: ProviderCliOptions, options: Omit<NodeCreateProcessorOptions, 'anthropicApiKey' | 'customAiApiKey' | 'datasetProvider' | 'googleApiKey' | 'openAiApiKey' | 'openAiEndpoint' | 'openAiKey' | 'openAiOrganization' | 'projectPath'>): NodeCreateProcessorOptions;
|
|
35
|
+
export declare function withProviderProcessorOptions(providerOptions: ProviderCliOptions, options: Omit<NodeCreateProcessorOptions, 'anthropicApiKey' | 'customAiApiKey' | 'googleApiKey' | 'openAiApiKey' | 'openAiEndpoint' | 'openAiKey' | 'openAiOrganization'>): NodeCreateProcessorOptions;
|
|
33
36
|
export declare function addProviderOptions<T>(y: yargs.Argv<T>): yargs.Argv<T>;
|
|
34
37
|
export declare function addDatasetOptions<T>(y: yargs.Argv<T>, { includeSaveDatasets }?: {
|
|
35
38
|
includeSaveDatasets?: boolean;
|
|
@@ -56,7 +56,7 @@ export declare function makeCommand<T>(y: yargs.Argv<T>): yargs.Argv<T & {
|
|
|
56
56
|
}>;
|
|
57
57
|
export declare function serve(args: ServeArgs): Promise<void>;
|
|
58
58
|
export declare function createServeApp(args: ServeArgs): Promise<ServeAppInfo>;
|
|
59
|
-
export declare function buildGraphProcessorOptions({ inputs, graph, openaiApiKey, openaiEndpoint, openaiOrganization, }: GraphProcessorArgs): NodeCreateProcessorOptions;
|
|
59
|
+
export declare function buildGraphProcessorOptions({ inputs, graph, anthropicApiKey, customAiApiKey, googleApiKey, openaiApiKey, openaiEndpoint, openaiOrganization, }: GraphProcessorArgs): NodeCreateProcessorOptions;
|
|
60
60
|
export declare function buildStreamingGraphProcessorOptions(args: GraphProcessorArgs): NodeCreateProcessorOptions;
|
|
61
61
|
export declare function buildStreamEventFilter(stream: string | undefined): RivetEventStreamFilterSpec;
|
|
62
62
|
export declare function parseEndpointAliases(endpointSpecs: string[], project: Project): Map<string, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valerypopoff/rivet2-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"types": "dist/types/cli.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -22,13 +22,12 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@hono/node-server": "^1.
|
|
26
|
-
"@
|
|
27
|
-
"@valerypopoff/rivet2-node": "^2.1.1",
|
|
25
|
+
"@hono/node-server": "^1.19.14",
|
|
26
|
+
"@valerypopoff/rivet2-node": "^2.1.3",
|
|
28
27
|
"chalk": "^5.4.1",
|
|
29
28
|
"didyoumean2": "^7.0.4",
|
|
30
29
|
"dotenv": "^16.4.7",
|
|
31
|
-
"hono": "^4.
|
|
30
|
+
"hono": "^4.12.28",
|
|
32
31
|
"yargs": "^17.7.2"
|
|
33
32
|
}
|
|
34
33
|
}
|