@promptbook/cli 0.61.0-22 → 0.61.0-24
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/README.md +2 -4
- package/esm/index.es.js +190 -68
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +2 -2
- package/esm/typings/src/config.d.ts +8 -4
- package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +1 -0
- package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -0
- package/esm/typings/src/execution/PipelineExecutor.d.ts +32 -24
- package/esm/typings/src/execution/PromptResultUsage.d.ts +3 -0
- package/esm/typings/src/prepare/isPipelinePrepared.d.ts +4 -0
- package/esm/typings/src/prepare/preparePipeline.d.ts +0 -1
- package/esm/typings/src/prepare/prepareTemplates.d.ts +31 -0
- package/esm/typings/src/prepare/unpreparePipeline.d.ts +2 -0
- package/esm/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +3 -0
- package/esm/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +3 -0
- package/esm/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +1 -0
- package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +3 -0
- package/esm/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -0
- package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -0
- package/esm/typings/src/types/PipelineJson/PromptDialogJson.d.ts +4 -3
- package/esm/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +10 -0
- package/esm/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +1 -0
- package/esm/typings/src/types/PipelineJson/ScriptJson.d.ts +5 -2
- package/esm/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +5 -2
- package/package.json +2 -2
- package/umd/index.umd.js +190 -68
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/src/_packages/types.index.d.ts +2 -2
- package/umd/typings/src/config.d.ts +8 -4
- package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +1 -0
- package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +1 -0
- package/umd/typings/src/execution/PipelineExecutor.d.ts +32 -24
- package/umd/typings/src/execution/PromptResultUsage.d.ts +3 -0
- package/umd/typings/src/prepare/isPipelinePrepared.d.ts +4 -0
- package/umd/typings/src/prepare/preparePipeline.d.ts +0 -1
- package/umd/typings/src/prepare/prepareTemplates.d.ts +31 -0
- package/umd/typings/src/prepare/unpreparePipeline.d.ts +2 -0
- package/umd/typings/src/types/PipelineJson/KnowledgePieceJson.d.ts +3 -0
- package/umd/typings/src/types/PipelineJson/KnowledgeSourceJson.d.ts +3 -0
- package/umd/typings/src/types/PipelineJson/LlmTemplateJson.d.ts +1 -0
- package/umd/typings/src/types/PipelineJson/PersonaJson.d.ts +3 -0
- package/umd/typings/src/types/PipelineJson/PipelineJson.d.ts +1 -0
- package/umd/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -0
- package/umd/typings/src/types/PipelineJson/PromptDialogJson.d.ts +4 -3
- package/umd/typings/src/types/PipelineJson/PromptTemplateJsonCommon.d.ts +10 -0
- package/umd/typings/src/types/PipelineJson/PromptTemplateParameterJson.d.ts +1 -0
- package/umd/typings/src/types/PipelineJson/ScriptJson.d.ts +5 -2
- package/umd/typings/src/types/PipelineJson/SimpleTemplateJson.d.ts +5 -2
package/README.md
CHANGED
|
@@ -48,6 +48,7 @@ Then just use it:
|
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
50
|
import { createPipelineExecutor, assertsExecutionSuccessful } from '@promptbook/core';
|
|
51
|
+
import { createLlmToolsFromEnv } from '@promptbook/node';
|
|
51
52
|
import { getPipelineCollection } from './promptbook-collection'; // <- Importing from pre-built library
|
|
52
53
|
import { JavascriptExecutionTools } from '@promptbook/execute-javascript';
|
|
53
54
|
import { OpenAiExecutionTools } from '@promptbook/openai';
|
|
@@ -59,10 +60,7 @@ const promptbook = await getPipelineCollection().getPipelineByUrl(
|
|
|
59
60
|
|
|
60
61
|
// ▶ Prepare tools
|
|
61
62
|
const tools = {
|
|
62
|
-
llm:
|
|
63
|
-
isVerbose: true,
|
|
64
|
-
apiKey: process.env.OPENAI_API_KEY,
|
|
65
|
-
}),
|
|
63
|
+
llm: createLlmToolsFromEnv(),
|
|
66
64
|
script: [new JavascriptExecutionTools()],
|
|
67
65
|
};
|
|
68
66
|
|