@redhat-cloud-services/ai-client-common 0.7.0 → 0.9.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.
package/README.md
CHANGED
|
@@ -26,23 +26,35 @@ npm install @redhat-cloud-services/ai-client-common
|
|
|
26
26
|
All AI clients in this workspace implement the `IAIClient` interface:
|
|
27
27
|
|
|
28
28
|
```typescript
|
|
29
|
-
import { IAIClient } from '@redhat-cloud-services/ai-client-common';
|
|
29
|
+
import { IAIClient, ClientInitLimitation, IInitErrorResponse } from '@redhat-cloud-services/ai-client-common';
|
|
30
30
|
|
|
31
|
-
interface IAIClient<AP extends Record<string, unknown> = Record<string, unknown
|
|
31
|
+
interface IAIClient<AP extends Record<string, unknown> = Record<string, unknown>, TChunk = unknown> {
|
|
32
|
+
constructor(config: IBaseClientConfig<TChunk>);
|
|
33
|
+
|
|
32
34
|
init(): Promise<{
|
|
33
35
|
initialConversationId: string;
|
|
34
36
|
conversations: IConversation[];
|
|
37
|
+
limitation?: ClientInitLimitation;
|
|
38
|
+
error?: IInitErrorResponse;
|
|
35
39
|
}>;
|
|
40
|
+
|
|
36
41
|
sendMessage<TChunk = unknown, T extends Record<string, unknown> = Record<string, unknown>>(
|
|
37
42
|
conversationId: string,
|
|
38
43
|
message: string,
|
|
39
44
|
options?: ISendMessageOptions<T>
|
|
40
45
|
): Promise<TChunk | IMessageResponse<AP> | void>;
|
|
41
|
-
|
|
46
|
+
|
|
47
|
+
getDefaultStreamingHandler<TChunk = unknown>(): IStreamingHandler<TChunk> | undefined;
|
|
48
|
+
|
|
42
49
|
getConversationHistory(conversationId: string, options?: IRequestOptions): Promise<IConversationHistoryResponse<AP>>;
|
|
50
|
+
|
|
43
51
|
healthCheck(options?: IRequestOptions): Promise<unknown>;
|
|
52
|
+
|
|
44
53
|
getServiceStatus?(options?: IRequestOptions): Promise<unknown>;
|
|
54
|
+
|
|
45
55
|
createNewConversation(): Promise<IConversation>;
|
|
56
|
+
|
|
57
|
+
getInitOptions(): ClientInitOptions;
|
|
46
58
|
}
|
|
47
59
|
```
|
|
48
60
|
|
|
@@ -77,9 +89,63 @@ import { IBaseClientConfig } from '@redhat-cloud-services/ai-client-common';
|
|
|
77
89
|
|
|
78
90
|
const config: IBaseClientConfig = {
|
|
79
91
|
baseUrl: 'https://your-ai-service.com',
|
|
80
|
-
fetchFunction: customFetch,
|
|
81
|
-
defaultStreamingHandler: new CustomStreamingHandler()
|
|
92
|
+
fetchFunction: customFetch, // Optional - defaults to native fetch
|
|
93
|
+
defaultStreamingHandler: new CustomStreamingHandler(), // Optional
|
|
94
|
+
initOptions: {
|
|
95
|
+
initializeNewConversation: false // Optional: See "Lazy Conversation Initialization"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Lazy Conversation Initialization
|
|
101
|
+
|
|
102
|
+
The `ClientInitOptions` interface provides control over when conversations are created during client initialization.
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
import { ClientInitOptions } from '@redhat-cloud-services/ai-client-common';
|
|
106
|
+
|
|
107
|
+
interface ClientInitOptions {
|
|
108
|
+
/**
|
|
109
|
+
* Controls whether to automatically create a conversation during client initialization
|
|
110
|
+
* @default true
|
|
111
|
+
*/
|
|
112
|
+
initializeNewConversation?: boolean;
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Default Behavior (initializeNewConversation: true):**
|
|
117
|
+
- Client automatically creates/finds a conversation during `init()`
|
|
118
|
+
- Provides immediate conversation for users to start chatting
|
|
119
|
+
- Suitable for most chat interfaces
|
|
120
|
+
|
|
121
|
+
**Lazy Initialization (initializeNewConversation: false):**
|
|
122
|
+
- Client initializes without creating conversations
|
|
123
|
+
- Conversations created only when needed (e.g., first message sent)
|
|
124
|
+
- Useful for performance optimization and conditional conversation creation
|
|
125
|
+
|
|
126
|
+
All AI clients implementing `IAIClient` provide this configuration via the `getInitOptions()` method.
|
|
127
|
+
|
|
128
|
+
### Client Initialization Responses
|
|
129
|
+
|
|
130
|
+
The `init()` method returns additional information about client limitations and errors:
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
import { ClientInitLimitation, IInitErrorResponse } from '@redhat-cloud-services/ai-client-common';
|
|
134
|
+
|
|
135
|
+
// Client limitations (e.g., quota exceeded)
|
|
136
|
+
type ClientInitLimitation = {
|
|
137
|
+
reason: string;
|
|
138
|
+
detail?: string;
|
|
82
139
|
};
|
|
140
|
+
|
|
141
|
+
// Initialization errors
|
|
142
|
+
interface IInitErrorResponse {
|
|
143
|
+
message: string;
|
|
144
|
+
status: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Utility function to check if an object is an IInitErrorResponse
|
|
148
|
+
function isInitErrorResponse(obj: unknown): obj is IInitErrorResponse;
|
|
83
149
|
```
|
|
84
150
|
|
|
85
151
|
### Streaming Support
|
|
@@ -220,7 +286,8 @@ interface IConversation {
|
|
|
220
286
|
This package provides the foundation for:
|
|
221
287
|
|
|
222
288
|
- **[@redhat-cloud-services/arh-client](../arh-client)** - Intelligent Front Door (IFD) API client
|
|
223
|
-
- **[@redhat-cloud-services/lightspeed-client](../lightspeed-client)** - OpenShift Lightspeed API client
|
|
289
|
+
- **[@redhat-cloud-services/lightspeed-client](../lightspeed-client)** - OpenShift Lightspeed API client
|
|
290
|
+
- **[@redhat-cloud-services/ansible-lightspeed](../ansible-lightspeed)** - Ansible Lightspeed API client
|
|
224
291
|
- **[@redhat-cloud-services/ai-client-state](../ai-client-state)** - State management for AI conversations
|
|
225
292
|
- **[@redhat-cloud-services/ai-react-state](../ai-react-state)** - React hooks and context for AI state
|
|
226
293
|
|
package/package.json
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
export interface IFetchFunction {
|
|
6
6
|
(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
7
7
|
}
|
|
8
|
+
export interface ClientInitOptions {
|
|
9
|
+
/**
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
initializeNewConversation?: boolean;
|
|
13
|
+
}
|
|
8
14
|
/**
|
|
9
15
|
* Base configuration interface for all AI clients
|
|
10
16
|
*/
|
|
@@ -17,13 +23,14 @@ export interface IBaseClientConfig<TChunk = unknown> {
|
|
|
17
23
|
* Custom fetch implementation for making HTTP requests
|
|
18
24
|
* Must include authentication headers (Bearer token) if needed
|
|
19
25
|
*/
|
|
20
|
-
fetchFunction
|
|
26
|
+
fetchFunction?: IFetchFunction;
|
|
21
27
|
/**
|
|
22
28
|
* Default streaming handler for the client
|
|
23
29
|
* Used when sendMessage is called with stream=true but no streamingHandler provided
|
|
24
30
|
* Individual requests can override this by providing their own streamingHandler
|
|
25
31
|
*/
|
|
26
32
|
defaultStreamingHandler?: IStreamingHandler<TChunk>;
|
|
33
|
+
initOptions?: ClientInitOptions;
|
|
27
34
|
}
|
|
28
35
|
/**
|
|
29
36
|
* Standard request options that can be passed to individual client methods
|
|
@@ -43,11 +50,16 @@ export interface IInitErrorResponse {
|
|
|
43
50
|
status: number;
|
|
44
51
|
}
|
|
45
52
|
export declare function isInitErrorResponse(obj: unknown): obj is IInitErrorResponse;
|
|
53
|
+
export type ClientInitLimitation = {
|
|
54
|
+
reason: string;
|
|
55
|
+
detail?: string;
|
|
56
|
+
};
|
|
46
57
|
/**
|
|
47
58
|
* Common interface that all AI clients must implement
|
|
48
59
|
* Provides a standardized way to interact with different AI services
|
|
49
60
|
*/
|
|
50
|
-
|
|
61
|
+
declare class IAIClient<AP extends Record<string, unknown> = Record<string, unknown>, TChunk = unknown> {
|
|
62
|
+
constructor(config: IBaseClientConfig<TChunk>);
|
|
51
63
|
/**
|
|
52
64
|
* Initialize the client and return the initial conversation ID
|
|
53
65
|
* This method is called once when the client is first used by a state manager
|
|
@@ -56,6 +68,7 @@ export interface IAIClient<AP extends Record<string, unknown> = Record<string, u
|
|
|
56
68
|
init(): Promise<{
|
|
57
69
|
initialConversationId: string;
|
|
58
70
|
conversations: IConversation[];
|
|
71
|
+
limitation?: ClientInitLimitation;
|
|
59
72
|
error?: IInitErrorResponse;
|
|
60
73
|
}>;
|
|
61
74
|
/**
|
|
@@ -67,10 +80,11 @@ export interface IAIClient<AP extends Record<string, unknown> = Record<string, u
|
|
|
67
80
|
*/
|
|
68
81
|
sendMessage<TChunk = unknown, T extends Record<string, unknown> = Record<string, unknown>>(conversationId: string, message: string, options?: ISendMessageOptions<T>): Promise<TChunk | IMessageResponse<AP> | void>;
|
|
69
82
|
/**
|
|
70
|
-
* Get the default streaming handler for this client
|
|
83
|
+
* Get the default streaming handler for this client
|
|
84
|
+
* All AI clients must implement this method to provide consistent streaming behavior
|
|
71
85
|
* @returns The default streaming handler or undefined if not configured
|
|
72
86
|
*/
|
|
73
|
-
getDefaultStreamingHandler
|
|
87
|
+
getDefaultStreamingHandler<TChunk = unknown>(): IStreamingHandler<TChunk> | undefined;
|
|
74
88
|
/**
|
|
75
89
|
* Get the conversation history for a specific conversation
|
|
76
90
|
* @param conversationId - The conversation ID to retrieve history for
|
|
@@ -95,7 +109,13 @@ export interface IAIClient<AP extends Record<string, unknown> = Record<string, u
|
|
|
95
109
|
* @returns Promise that resolves to the newly created conversation
|
|
96
110
|
*/
|
|
97
111
|
createNewConversation(): Promise<IConversation>;
|
|
112
|
+
/**
|
|
113
|
+
* Get the initial options used to configure the client
|
|
114
|
+
* @returns The initial options used to configure the client
|
|
115
|
+
*/
|
|
116
|
+
getInitOptions(): ClientInitOptions;
|
|
98
117
|
}
|
|
118
|
+
export { IAIClient };
|
|
99
119
|
/**
|
|
100
120
|
* Base error class for all AI client errors
|
|
101
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-client-common.d.ts","sourceRoot":"","sources":["../../../../../packages/ai-client-common/src/lib/ai-client-common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACnE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,OAAO;IACjD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-client-common.d.ts","sourceRoot":"","sources":["../../../../../packages/ai-client-common/src/lib/ai-client-common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,OAAO;IACjD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEpD,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAS3E;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CA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AoB,CAAC,EAAE,CAAC,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,4BAA4B,CACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACzD,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,WAAW,YAAY,CAC3B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE3D,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,CAAC,CAAC;CACzB;AAED,MAAM,MAAM,kBAAkB,CAC5B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACzD,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3D,SAAQ,eAAe;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AIClientValidationError = exports.AIClientError = void 0;
|
|
3
|
+
exports.AIClientValidationError = exports.AIClientError = exports.IAIClient = void 0;
|
|
4
4
|
exports.isInitErrorResponse = isInitErrorResponse;
|
|
5
5
|
function isInitErrorResponse(obj) {
|
|
6
6
|
return (typeof obj === 'object' &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-client-common.js","sourceRoot":"","sources":["../../../../../packages/ai-client-common/src/lib/ai-client-common.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ai-client-common.js","sourceRoot":"","sources":["../../../../../packages/ai-client-common/src/lib/ai-client-common.ts"],"names":[],"mappings":";;;AA4DA,kDASC;AATD,SAAgB,mBAAmB,CAAC,GAAY;IAC9C,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,SAAS,IAAI,GAAG;QAChB,OAAQ,GAA0B,CAAC,OAAO,KAAK,QAAQ;QACvD,QAAQ,IAAI,GAAG;QACf,OAAQ,GAA0B,CAAC,MAAM,KAAK,QAAQ,CACvD,CAAC;AACJ,CAAC;AA6FD;;GAEG;AACH,MAAa,aAAc,SAAQ,KAAK;IACtC,YACS,MAAc,EACd,UAAkB,EACzB,OAAe,EACR,IAAc;QAErB,KAAK,CAAC,OAAO,CAAC,CAAC;QALR,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAQ;QAElB,SAAI,GAAJ,IAAI,CAAU;QAGrB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAVD,sCAUC;AAWD,MAAa,uBAAwB,SAAQ,aAAa;IACxD,YAAmB,gBAAoC;QACrD,KAAK,CACH,GAAG,EACH,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,CACjB,CAAC;QANe,qBAAgB,GAAhB,gBAAgB,CAAoB;QAOrD,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AAVD,0DAUC"}
|