@promptbook/remote-client 0.11.0 → 0.13.0

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.
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Socket.io error for remote text generation
3
+ *
4
+ * This is sent from server to client when error occurs and stops the process
5
+ */
1
6
  export interface Ptps_Error {
7
+ /**
8
+ * The error message which caused the error
9
+ */
2
10
  readonly errorMessage: string;
3
11
  }
@@ -1,4 +1,12 @@
1
1
  import { TaskProgress } from '../../../../../types/TaskProgress';
2
+ /**
3
+ * Socket.io progress for remote text generation
4
+ *
5
+ * This is sent from server to client arbitrarily and may be sent multiple times
6
+ */
2
7
  export interface Ptps_Progress {
8
+ /**
9
+ * The progress of text generation
10
+ */
3
11
  readonly taskProgress: TaskProgress;
4
12
  }
@@ -1,6 +1,17 @@
1
1
  import { uuid } from '../../../../.././types/typeAliases';
2
2
  import { Prompt } from '../../../../../types/Prompt';
3
+ /**
4
+ * Socket.io progress for remote text generation
5
+ *
6
+ * This is a request from client to server
7
+ */
3
8
  export interface Ptps_Request {
9
+ /**
10
+ * Client responsible for the requests
11
+ */
4
12
  readonly clientId: uuid;
13
+ /**
14
+ * The Prompt to execute
15
+ */
5
16
  readonly prompt: Prompt;
6
17
  }
@@ -1,4 +1,12 @@
1
1
  import { PromptResult } from '../../../../../execution/PromptResult';
2
+ /**
3
+ * Socket.io error for remote text generation
4
+ *
5
+ * This is sent from server to client when the generated text is completed
6
+ */
2
7
  export interface Ptps_Response {
8
+ /**
9
+ * The result of the prompt
10
+ */
3
11
  promptResult: PromptResult;
4
12
  }
@@ -1,5 +1,5 @@
1
1
  import { PromptTemplatePipelineLibrary } from '../../../../../classes/PromptTemplatePipelineLibrary';
2
- import { uuid } from '../../../../../types/typeAliases';
2
+ import { string_uri, uuid } from '../../../../../types/typeAliases';
3
3
  import { CommonExecutionToolsOptions } from '../../../../CommonExecutionToolsOptions';
4
4
  import { NaturalExecutionTools } from '../../../../NaturalExecutionTools';
5
5
  export interface RemoteServerOptions extends CommonExecutionToolsOptions {
@@ -7,6 +7,13 @@ export interface RemoteServerOptions extends CommonExecutionToolsOptions {
7
7
  * Port on which the server will listen
8
8
  */
9
9
  readonly port: number;
10
+ /**
11
+ * Path for the Socket.io server to listen
12
+ *
13
+ * @default '/socket.io'
14
+ * @example '/promptbook/socket.io'
15
+ */
16
+ readonly path: string_uri;
10
17
  /**
11
18
  * Prompt template pipeline library to use
12
19
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-client",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -37,7 +37,7 @@
37
37
  "socket.io-client": "4.7.2"
38
38
  },
39
39
  "peerDependencies": {
40
- "@promptbook/core": "0.11.0"
40
+ "@promptbook/core": "0.13.0"
41
41
  },
42
42
  "main": "./umd/index.umd.js",
43
43
  "module": "./esm/index.es.js",
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Socket.io error for remote text generation
3
+ *
4
+ * This is sent from server to client when error occurs and stops the process
5
+ */
1
6
  export interface Ptps_Error {
7
+ /**
8
+ * The error message which caused the error
9
+ */
2
10
  readonly errorMessage: string;
3
11
  }
@@ -1,4 +1,12 @@
1
1
  import { TaskProgress } from '../../../../../types/TaskProgress';
2
+ /**
3
+ * Socket.io progress for remote text generation
4
+ *
5
+ * This is sent from server to client arbitrarily and may be sent multiple times
6
+ */
2
7
  export interface Ptps_Progress {
8
+ /**
9
+ * The progress of text generation
10
+ */
3
11
  readonly taskProgress: TaskProgress;
4
12
  }
@@ -1,6 +1,17 @@
1
1
  import { uuid } from '../../../../.././types/typeAliases';
2
2
  import { Prompt } from '../../../../../types/Prompt';
3
+ /**
4
+ * Socket.io progress for remote text generation
5
+ *
6
+ * This is a request from client to server
7
+ */
3
8
  export interface Ptps_Request {
9
+ /**
10
+ * Client responsible for the requests
11
+ */
4
12
  readonly clientId: uuid;
13
+ /**
14
+ * The Prompt to execute
15
+ */
5
16
  readonly prompt: Prompt;
6
17
  }
@@ -1,4 +1,12 @@
1
1
  import { PromptResult } from '../../../../../execution/PromptResult';
2
+ /**
3
+ * Socket.io error for remote text generation
4
+ *
5
+ * This is sent from server to client when the generated text is completed
6
+ */
2
7
  export interface Ptps_Response {
8
+ /**
9
+ * The result of the prompt
10
+ */
3
11
  promptResult: PromptResult;
4
12
  }
@@ -1,5 +1,5 @@
1
1
  import { PromptTemplatePipelineLibrary } from '../../../../../classes/PromptTemplatePipelineLibrary';
2
- import { uuid } from '../../../../../types/typeAliases';
2
+ import { string_uri, uuid } from '../../../../../types/typeAliases';
3
3
  import { CommonExecutionToolsOptions } from '../../../../CommonExecutionToolsOptions';
4
4
  import { NaturalExecutionTools } from '../../../../NaturalExecutionTools';
5
5
  export interface RemoteServerOptions extends CommonExecutionToolsOptions {
@@ -7,6 +7,13 @@ export interface RemoteServerOptions extends CommonExecutionToolsOptions {
7
7
  * Port on which the server will listen
8
8
  */
9
9
  readonly port: number;
10
+ /**
11
+ * Path for the Socket.io server to listen
12
+ *
13
+ * @default '/socket.io'
14
+ * @example '/promptbook/socket.io'
15
+ */
16
+ readonly path: string_uri;
10
17
  /**
11
18
  * Prompt template pipeline library to use
12
19
  *