@promptbook/utils 0.52.0-0 → 0.52.0-10

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.
Files changed (62) hide show
  1. package/README.md +10 -6
  2. package/esm/index.es.js +464 -1614
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/_packages/anthropic-claude.index.d.ts +3 -0
  5. package/esm/typings/_packages/azure-openai.index.d.ts +3 -0
  6. package/esm/typings/_packages/core.index.d.ts +13 -5
  7. package/esm/typings/_packages/openai.index.d.ts +1 -1
  8. package/esm/typings/_packages/utils.index.d.ts +3 -8
  9. package/esm/typings/execution/PromptResult.d.ts +3 -3
  10. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +42 -0
  11. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +8 -0
  12. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +20 -0
  13. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/playground/playground.d.ts +2 -0
  14. package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +41 -0
  15. package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +34 -0
  16. package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/playground/playground.d.ts +2 -0
  17. package/esm/typings/execution/plugins/llm-execution-tools/langtail/playground/playground.d.ts +2 -0
  18. package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +2 -2
  19. package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +2 -2
  20. package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +35 -0
  21. package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +23 -0
  22. package/esm/typings/execution/plugins/llm-execution-tools/multiple/playground/playground.d.ts +2 -0
  23. package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +3 -3
  24. package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +3 -1
  25. package/esm/typings/execution/plugins/llm-execution-tools/openai/computeUsage.d.ts +6 -3
  26. package/esm/typings/execution/plugins/llm-execution-tools/openai/{models.d.ts → openai-models.d.ts} +2 -1
  27. package/esm/typings/execution/plugins/llm-execution-tools/openai/playground/playground.d.ts +2 -0
  28. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +1 -1
  29. package/esm/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +4 -17
  30. package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +16 -1
  31. package/package.json +1 -3
  32. package/umd/index.umd.js +462 -1620
  33. package/umd/index.umd.js.map +1 -1
  34. package/umd/typings/_packages/anthropic-claude.index.d.ts +3 -0
  35. package/umd/typings/_packages/azure-openai.index.d.ts +3 -0
  36. package/umd/typings/_packages/core.index.d.ts +13 -5
  37. package/umd/typings/_packages/openai.index.d.ts +1 -1
  38. package/umd/typings/_packages/utils.index.d.ts +3 -8
  39. package/umd/typings/execution/PromptResult.d.ts +3 -3
  40. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +42 -0
  41. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +8 -0
  42. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +20 -0
  43. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/playground/playground.d.ts +2 -0
  44. package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +41 -0
  45. package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +34 -0
  46. package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/playground/playground.d.ts +2 -0
  47. package/umd/typings/execution/plugins/llm-execution-tools/langtail/playground/playground.d.ts +2 -0
  48. package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +2 -2
  49. package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +2 -2
  50. package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +35 -0
  51. package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +23 -0
  52. package/umd/typings/execution/plugins/llm-execution-tools/multiple/playground/playground.d.ts +2 -0
  53. package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +3 -3
  54. package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +3 -1
  55. package/umd/typings/execution/plugins/llm-execution-tools/openai/computeUsage.d.ts +6 -3
  56. package/umd/typings/execution/plugins/llm-execution-tools/openai/{models.d.ts → openai-models.d.ts} +2 -1
  57. package/umd/typings/execution/plugins/llm-execution-tools/openai/playground/playground.d.ts +2 -0
  58. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.d.ts +1 -1
  59. package/umd/typings/execution/plugins/script-execution-tools/javascript/JavascriptExecutionTools.d.ts +4 -17
  60. package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +16 -1
  61. package/esm/typings/_packages/wizzard.index.d.ts +0 -5
  62. package/umd/typings/_packages/wizzard.index.d.ts +0 -5
package/README.md CHANGED
@@ -451,7 +451,7 @@ Or you can install them separately:
451
451
  - _(Not finished)_ **[@promptbook/wizzard](https://www.npmjs.com/package/@promptbook/wizzard)** - Wizard for creating+running promptbooks in single line
452
452
  - **[@promptbook/execute-javascript](https://www.npmjs.com/package/@promptbook/execute-javascript)** - Execution tools for javascript inside promptbooks
453
453
  - **[@promptbook/openai](https://www.npmjs.com/package/@promptbook/openai)** - Execution tools for OpenAI API, wrapper around OpenAI SDK
454
- - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
454
+ - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
455
455
  - **[@promptbook/azure-openai](https://www.npmjs.com/package/@promptbook/azure-openai)** - Execution tools for Azure OpenAI API
456
456
  - **[@promptbook/langtail](https://www.npmjs.com/package/@promptbook/langtail)** - Execution tools for Langtail API, wrapper around Langtail SDK
457
457
  - **[@promptbook/mock](https://www.npmjs.com/package/@promptbook/mock)** - Mocked execution tools for testing the library and saving the tokens
@@ -604,14 +604,16 @@ Internally it calls OpenAI, Azure, GPU, proxy, cache, logging,...
604
604
  `LlmExecutionTools` an abstract interface that is implemented by concrete execution tools:
605
605
 
606
606
  - `OpenAiExecutionTools`
607
- - _(Not implemented yet !!!!! )_ `AnthropicClaudeExecutionTools`
608
- - _(Not implemented yet !!!!! )_ `AzureOpenAiExecutionTools`
607
+ - `AnthropicClaudeExecutionTools`
608
+ - `AzureOpenAiExecutionTools`
609
+ - `LangtailExecutionTools`
609
610
  - _(Not implemented yet)_ `BardExecutionTools`
610
611
  - _(Not implemented yet)_ `LamaExecutionTools`
611
612
  - _(Not implemented yet)_ `GpuExecutionTools`
612
- - And a special case are `RemoteLlmExecutionTools` that connect to a remote server and run one of the above execution tools on that server.
613
- - The second special case is `MockedEchoLlmExecutionTools` that is used for testing and mocking.
614
- - The third special case is `LogLlmExecutionToolsWrapper` that is technically also an execution tools but it is more proxy wrapper around other execution tools that logs all calls to execution tools.
613
+ - And a special case are `MultipleLlmExecutionTools` that combines multiple execution tools together and tries to execute the prompt on the best one.
614
+ - Another special case are `RemoteLlmExecutionTools` that connect to a remote server and run one of the above execution tools on that server.
615
+ - The another special case is `MockedEchoLlmExecutionTools` that is used for testing and mocking.
616
+ - The another special case is `LogLlmExecutionToolsWrapper` that is technically also an execution tools but it is more proxy wrapper around other execution tools that logs all calls to execution tools.
615
617
 
616
618
  #### Script Execution Tools
617
619
 
@@ -710,6 +712,8 @@ Execution report is a simple object or markdown that contains information about
710
712
 
711
713
 
712
714
 
715
+
716
+
713
717
  ### Remote server
714
718
 
715
719
  Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.