@promptbook/remote-client 0.94.0-0 → 0.94.0-1
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 +1 -6
- package/esm/index.es.js +1 -1
- package/esm/typings/src/_packages/cli.index.d.ts +4 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/ollama.index.d.ts +8 -0
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/_packages/wizzard.index.d.ts +4 -0
- package/esm/typings/src/execution/ExecutionTask.d.ts +3 -1
- package/esm/typings/src/llm-providers/ollama/OllamaExecutionTools.d.ts +19 -0
- package/esm/typings/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +12 -0
- package/esm/typings/src/llm-providers/ollama/createOllamaExecutionTools.d.ts +11 -0
- package/esm/typings/src/llm-providers/ollama/playground/playground.d.ts +6 -0
- package/esm/typings/src/llm-providers/ollama/register-configuration.d.ts +14 -0
- package/esm/typings/src/llm-providers/ollama/register-constructor.d.ts +15 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
package/README.md
CHANGED
|
@@ -60,8 +60,6 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
60
60
|
|
|
61
61
|
During the computer revolution, we have seen [multiple generations of computer languages](https://github.com/webgptorg/promptbook/discussions/180), from the physical rewiring of the vacuum tubes through low-level machine code to the high-level languages like Python or JavaScript. And now, we're on the edge of the **next revolution**!
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
63
|
It's a revolution of writing software in **plain human language** that is understandable and executable by both humans and machines – and it's going to change everything!
|
|
66
64
|
|
|
67
65
|
The incredible growth in power of microprocessors and the Moore's Law have been the driving force behind the ever-more powerful languages, and it's been an amazing journey! Similarly, the large language models (like GPT or Claude) are the next big thing in language technology, and they're set to transform the way we interact with computers.
|
|
@@ -247,8 +245,6 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
247
245
|
|
|
248
246
|
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
249
247
|
|
|
250
|
-
|
|
251
|
-
|
|
252
248
|
### **3. How:** Knowledge, Instruments and Actions
|
|
253
249
|
|
|
254
250
|
The resources used by the personas are used to do the work.
|
|
@@ -309,6 +305,7 @@ Or you can install them separately:
|
|
|
309
305
|
- **[@promptbook/vercel](https://www.npmjs.com/package/@promptbook/vercel)** - Adapter for Vercel functionalities
|
|
310
306
|
- **[@promptbook/google](https://www.npmjs.com/package/@promptbook/google)** - Integration with Google's Gemini API
|
|
311
307
|
- **[@promptbook/deepseek](https://www.npmjs.com/package/@promptbook/deepseek)** - Integration with [DeepSeek API](https://www.deepseek.com/)
|
|
308
|
+
- **[@promptbook/ollama](https://www.npmjs.com/package/@promptbook/ollama)** - Integration with [Ollama](https://ollama.com/) API
|
|
312
309
|
- **[@promptbook/azure-openai](https://www.npmjs.com/package/@promptbook/azure-openai)** - Execution tools for Azure OpenAI API
|
|
313
310
|
|
|
314
311
|
- **[@promptbook/fake-llm](https://www.npmjs.com/package/@promptbook/fake-llm)** - Mocked execution tools for testing the library and saving the tokens
|
|
@@ -347,8 +344,6 @@ The following glossary is used to clarify certain concepts:
|
|
|
347
344
|
|
|
348
345
|
_Note: This section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
349
346
|
|
|
350
|
-
|
|
351
|
-
|
|
352
347
|
### 💯 Core concepts
|
|
353
348
|
|
|
354
349
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
package/esm/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
20
20
|
* @generated
|
|
21
21
|
* @see https://github.com/webgptorg/promptbook
|
|
22
22
|
*/
|
|
23
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.94.0-
|
|
23
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.94.0-1';
|
|
24
24
|
/**
|
|
25
25
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
26
26
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -8,6 +8,8 @@ import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/registe
|
|
|
8
8
|
import { _DeepseekRegistration } from '../llm-providers/deepseek/register-constructor';
|
|
9
9
|
import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
|
|
10
10
|
import { _GoogleRegistration } from '../llm-providers/google/register-constructor';
|
|
11
|
+
import { _OllamaMetadataRegistration } from '../llm-providers/ollama/register-configuration';
|
|
12
|
+
import { _OllamaRegistration } from '../llm-providers/ollama/register-constructor';
|
|
11
13
|
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
12
14
|
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
13
15
|
import { _OpenAiRegistration } from '../llm-providers/openai/register-constructor';
|
|
@@ -36,6 +38,8 @@ export { _DeepseekMetadataRegistration };
|
|
|
36
38
|
export { _DeepseekRegistration };
|
|
37
39
|
export { _GoogleMetadataRegistration };
|
|
38
40
|
export { _GoogleRegistration };
|
|
41
|
+
export { _OllamaMetadataRegistration };
|
|
42
|
+
export { _OllamaRegistration };
|
|
39
43
|
export { _OpenAiMetadataRegistration };
|
|
40
44
|
export { _OpenAiAssistantMetadataRegistration };
|
|
41
45
|
export { _OpenAiRegistration };
|
|
@@ -108,6 +108,7 @@ import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic
|
|
|
108
108
|
import { _AzureOpenAiMetadataRegistration } from '../llm-providers/azure-openai/register-configuration';
|
|
109
109
|
import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/register-configuration';
|
|
110
110
|
import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
|
|
111
|
+
import { _OllamaMetadataRegistration } from '../llm-providers/ollama/register-configuration';
|
|
111
112
|
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
112
113
|
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
113
114
|
import { migratePipeline } from '../migrations/migratePipeline';
|
|
@@ -255,6 +256,7 @@ export { _AnthropicClaudeMetadataRegistration };
|
|
|
255
256
|
export { _AzureOpenAiMetadataRegistration };
|
|
256
257
|
export { _DeepseekMetadataRegistration };
|
|
257
258
|
export { _GoogleMetadataRegistration };
|
|
259
|
+
export { _OllamaMetadataRegistration };
|
|
258
260
|
export { _OpenAiMetadataRegistration };
|
|
259
261
|
export { _OpenAiAssistantMetadataRegistration };
|
|
260
262
|
export { migratePipeline };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
|
+
import { createOllamaExecutionTools } from '../llm-providers/ollama/createOllamaExecutionTools';
|
|
3
|
+
import { OllamaExecutionTools } from '../llm-providers/ollama/OllamaExecutionTools';
|
|
4
|
+
import { _OllamaRegistration } from '../llm-providers/ollama/register-constructor';
|
|
5
|
+
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
6
|
+
export { createOllamaExecutionTools };
|
|
7
|
+
export { OllamaExecutionTools };
|
|
8
|
+
export { _OllamaRegistration };
|
|
@@ -79,6 +79,7 @@ import type { AnthropicClaudeExecutionToolsProxiedOptions } from '../llm-provide
|
|
|
79
79
|
import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions';
|
|
80
80
|
import type { DeepseekExecutionToolsOptions } from '../llm-providers/deepseek/DeepseekExecutionToolsOptions';
|
|
81
81
|
import type { GoogleExecutionToolsOptions } from '../llm-providers/google/GoogleExecutionToolsOptions';
|
|
82
|
+
import type { OllamaExecutionToolsOptions } from '../llm-providers/ollama/OllamaExecutionToolsOptions';
|
|
82
83
|
import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions';
|
|
83
84
|
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions';
|
|
84
85
|
import type { VercelExecutionToolsOptions } from '../llm-providers/vercel/VercelExecutionToolsOptions';
|
|
@@ -377,6 +378,7 @@ export type { AnthropicClaudeExecutionToolsProxiedOptions };
|
|
|
377
378
|
export type { AzureOpenAiExecutionToolsOptions };
|
|
378
379
|
export type { DeepseekExecutionToolsOptions };
|
|
379
380
|
export type { GoogleExecutionToolsOptions };
|
|
381
|
+
export type { OllamaExecutionToolsOptions };
|
|
380
382
|
export type { OpenAiAssistantExecutionToolsOptions };
|
|
381
383
|
export type { OpenAiExecutionToolsOptions };
|
|
382
384
|
export type { VercelExecutionToolsOptions };
|
|
@@ -7,6 +7,8 @@ import { _DeepseekMetadataRegistration } from '../llm-providers/deepseek/registe
|
|
|
7
7
|
import { _DeepseekRegistration } from '../llm-providers/deepseek/register-constructor';
|
|
8
8
|
import { _GoogleMetadataRegistration } from '../llm-providers/google/register-configuration';
|
|
9
9
|
import { _GoogleRegistration } from '../llm-providers/google/register-constructor';
|
|
10
|
+
import { _OllamaMetadataRegistration } from '../llm-providers/ollama/register-configuration';
|
|
11
|
+
import { _OllamaRegistration } from '../llm-providers/ollama/register-constructor';
|
|
10
12
|
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
11
13
|
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration';
|
|
12
14
|
import { _OpenAiRegistration } from '../llm-providers/openai/register-constructor';
|
|
@@ -35,6 +37,8 @@ export { _DeepseekMetadataRegistration };
|
|
|
35
37
|
export { _DeepseekRegistration };
|
|
36
38
|
export { _GoogleMetadataRegistration };
|
|
37
39
|
export { _GoogleRegistration };
|
|
40
|
+
export { _OllamaMetadataRegistration };
|
|
41
|
+
export { _OllamaRegistration };
|
|
38
42
|
export { _OpenAiMetadataRegistration };
|
|
39
43
|
export { _OpenAiAssistantMetadataRegistration };
|
|
40
44
|
export { _OpenAiRegistration };
|
|
@@ -72,6 +72,8 @@ export type AbstractTask<TTaskResult extends AbstractTaskResult> = {
|
|
|
72
72
|
readonly taskId: task_id;
|
|
73
73
|
/**
|
|
74
74
|
* Human-readable title of the task - used for displaying in the UI
|
|
75
|
+
*
|
|
76
|
+
* For example name of the book which is being executed
|
|
75
77
|
*/
|
|
76
78
|
readonly title: string;
|
|
77
79
|
/**
|
|
@@ -99,7 +101,7 @@ export type AbstractTask<TTaskResult extends AbstractTaskResult> = {
|
|
|
99
101
|
/**
|
|
100
102
|
* Gets just the current value which is mutated during the task processing
|
|
101
103
|
*/
|
|
102
|
-
currentValue: PartialDeep<TTaskResult>;
|
|
104
|
+
readonly currentValue: PartialDeep<TTaskResult>;
|
|
103
105
|
/**
|
|
104
106
|
* List of errors that occurred during the task processing
|
|
105
107
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
2
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
|
+
import type { ChatPromptResult } from '../../execution/PromptResult';
|
|
4
|
+
import type { OllamaExecutionToolsOptions } from './OllamaExecutionToolsOptions';
|
|
5
|
+
/**
|
|
6
|
+
* Execution Tools for calling a local Ollama model via HTTP API
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/ollama`
|
|
9
|
+
*/
|
|
10
|
+
export declare class OllamaExecutionTools implements LlmExecutionTools {
|
|
11
|
+
protected readonly options: OllamaExecutionToolsOptions;
|
|
12
|
+
private limiter;
|
|
13
|
+
constructor(options: OllamaExecutionToolsOptions);
|
|
14
|
+
get title(): string;
|
|
15
|
+
get description(): string;
|
|
16
|
+
checkConfiguration(): Promise<void>;
|
|
17
|
+
listModels(): Promise<ReadonlyArray<AvailableModel>>;
|
|
18
|
+
callChatModel(prompt: Pick<import('../../types/Prompt').Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<ChatPromptResult>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface OllamaExecutionToolsOptions {
|
|
2
|
+
/** Base URL of Ollama API, e.g., http://localhost:11434 */
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
/** Model name to use for requests */
|
|
5
|
+
model: string;
|
|
6
|
+
/** Optional rate limit: max requests per minute */
|
|
7
|
+
maxRequestsPerMinute?: number;
|
|
8
|
+
/** Verbose logging */
|
|
9
|
+
isVerbose?: boolean;
|
|
10
|
+
/** Optional user identifier */
|
|
11
|
+
userId?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OllamaExecutionTools } from "./OllamaExecutionTools";
|
|
2
|
+
import { OllamaExecutionToolsOptions } from "./OllamaExecutionToolsOptions";
|
|
3
|
+
/**
|
|
4
|
+
* Execution Tools for calling Ollama API
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/ollama`
|
|
7
|
+
*/
|
|
8
|
+
export declare const createOllamaExecutionTools: ((options: OllamaExecutionToolsOptions) => OllamaExecutionTools) & {
|
|
9
|
+
packageName: string;
|
|
10
|
+
className: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of LLM provider metadata
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/core`
|
|
8
|
+
* @public exported from `@promptbook/wizzard`
|
|
9
|
+
* @public exported from `@promptbook/cli`
|
|
10
|
+
*/
|
|
11
|
+
export declare const _OllamaMetadataRegistration: Registration;
|
|
12
|
+
/**
|
|
13
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
14
|
+
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Registration } from '../../utils/$Register';
|
|
2
|
+
/**
|
|
3
|
+
* Registration of LLM provider
|
|
4
|
+
*
|
|
5
|
+
* Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/ollama`
|
|
8
|
+
* @public exported from `@promptbook/wizzard`
|
|
9
|
+
* @public exported from `@promptbook/cli`
|
|
10
|
+
*/
|
|
11
|
+
export declare const _OllamaRegistration: Registration;
|
|
12
|
+
/**
|
|
13
|
+
* TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
|
|
14
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
15
|
+
*/
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.
|
|
18
|
+
* It follows semantic versioning (e.g., `0.94.0-0`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-client",
|
|
3
|
-
"version": "0.94.0-
|
|
3
|
+
"version": "0.94.0-1",
|
|
4
4
|
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"module": "./esm/index.es.js",
|
|
64
64
|
"typings": "./esm/typings/src/_packages/remote-client.index.d.ts",
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@promptbook/core": "0.94.0-
|
|
66
|
+
"@promptbook/core": "0.94.0-1"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"crypto": "1.0.1",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.94.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.94.0-1';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|