@breadstone/archipel-mcp 0.0.52 → 0.0.53
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/data/guides/ai-realtime-voice.md +506 -0
- package/data/guides/ai-text-generation.md +5 -0
- package/data/guides/health-indicators.md +12 -3
- package/data/guides/index.md +5 -4
- package/data/packages/platform-health/index.md +1 -1
- package/data/packages/platform-intelligence/api/Class.IntelligenceHealthIndicator.md +6 -5
- package/data/packages/platform-intelligence/api/Class.IntelligenceModule.md +2 -2
- package/data/packages/platform-intelligence/api/Class.IntelligenceRealtimeError.md +110 -0
- package/data/packages/platform-intelligence/api/Class.IntelligenceRealtimeMeteringPort.md +47 -0
- package/data/packages/platform-intelligence/api/Class.IntelligenceRealtimeSessionFactory.md +129 -0
- package/data/packages/platform-intelligence/api/Class.IntelligenceRealtimeSessionPort.md +308 -0
- package/data/packages/platform-intelligence/api/Class.IntelligenceTextGenerator.md +6 -6
- package/data/packages/platform-intelligence/api/Function.loadGoogleRealtimeModel.md +25 -0
- package/data/packages/platform-intelligence/api/Function.loadGrokRealtimeModel.md +25 -0
- package/data/packages/platform-intelligence/api/Function.loadOpenAIRealtimeModel.md +25 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceModuleOptions.md +18 -6
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeAudioFormat.md +34 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeCloseEvent.md +40 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeModuleOptions.md +120 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeSessionConfiguration.md +135 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeSessionOptions.md +148 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeToolDefinition.md +58 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeTranscriptionConfiguration.md +46 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeTurnDetectionConfiguration.md +58 -0
- package/data/packages/platform-intelligence/api/Interface.IIntelligenceRealtimeUsage.md +103 -0
- package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceRealtimeClientEvent.md +64 -0
- package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceRealtimeMetadataValue.md +14 -0
- package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceRealtimeMeteringEvent.md +44 -0
- package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceRealtimeModelLoader.md +25 -0
- package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceRealtimeModelLoaders.md +14 -0
- package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceRealtimeServerEvent.md +159 -0
- package/data/packages/platform-intelligence/api/TypeAlias.IntelligenceRealtimeStatus.md +14 -0
- package/data/packages/platform-intelligence/api/index.md +23 -0
- package/data/packages/platform-intelligence/index.md +133 -7
- package/data/patterns/index.md +1 -0
- package/data/patterns/realtime-session-pattern.md +309 -0
- package/package.json +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: IntelligenceRealtimeError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: IntelligenceRealtimeError
|
|
7
|
+
|
|
8
|
+
Defined in: errors/IntelligenceRealtimeError.ts:12
|
|
9
|
+
|
|
10
|
+
Error raised by a realtime session, transport, or metering adapter.
|
|
11
|
+
|
|
12
|
+
## Extends
|
|
13
|
+
|
|
14
|
+
- `Error`
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new IntelligenceRealtimeError(
|
|
22
|
+
message,
|
|
23
|
+
phase,
|
|
24
|
+
provider,
|
|
25
|
+
model,
|
|
26
|
+
sessionId,
|
|
27
|
+
isRetryable,
|
|
28
|
+
cause?): IntelligenceRealtimeError;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Defined in: errors/IntelligenceRealtimeError.ts:25
|
|
32
|
+
|
|
33
|
+
#### Parameters
|
|
34
|
+
|
|
35
|
+
| Parameter | Type |
|
|
36
|
+
| ------ | ------ |
|
|
37
|
+
| `message` | `string` |
|
|
38
|
+
| `phase` | \| `"configuration"` \| `"token"` \| `"connect"` \| `"send"` \| `"receive"` \| `"metering"` \| `"close"` |
|
|
39
|
+
| `provider` | [`IntelligenceProviderName`](TypeAlias.IntelligenceProviderName) |
|
|
40
|
+
| `model` | `string` |
|
|
41
|
+
| `sessionId` | `string` |
|
|
42
|
+
| `isRetryable` | `boolean` |
|
|
43
|
+
| `cause?` | `Error` |
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`IntelligenceRealtimeError`
|
|
48
|
+
|
|
49
|
+
#### Overrides
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
Error.constructor
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Properties
|
|
56
|
+
|
|
57
|
+
### isRetryable
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
readonly isRetryable: boolean;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Defined in: errors/IntelligenceRealtimeError.ts:19
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### model
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
readonly model: string;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Defined in: errors/IntelligenceRealtimeError.ts:17
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### phase
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
readonly phase:
|
|
81
|
+
| "configuration"
|
|
82
|
+
| "token"
|
|
83
|
+
| "connect"
|
|
84
|
+
| "send"
|
|
85
|
+
| "receive"
|
|
86
|
+
| "metering"
|
|
87
|
+
| "close";
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Defined in: errors/IntelligenceRealtimeError.ts:15
|
|
91
|
+
|
|
92
|
+
***
|
|
93
|
+
|
|
94
|
+
### provider
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
readonly provider: IntelligenceProviderName;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Defined in: errors/IntelligenceRealtimeError.ts:16
|
|
101
|
+
|
|
102
|
+
***
|
|
103
|
+
|
|
104
|
+
### sessionId
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
readonly sessionId: string;
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Defined in: errors/IntelligenceRealtimeError.ts:18
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Abstract Class: IntelligenceRealtimeMeteringPort'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Abstract Class: IntelligenceRealtimeMeteringPort
|
|
7
|
+
|
|
8
|
+
Defined in: realtime/ports/IntelligenceRealtimeMeteringPort.ts:15
|
|
9
|
+
|
|
10
|
+
Application port for idempotently persisting realtime billing and audit events.
|
|
11
|
+
|
|
12
|
+
Implementations should treat `eventId` as an idempotency key and persist the
|
|
13
|
+
commercial debit and AI audit record in one application transaction.
|
|
14
|
+
|
|
15
|
+
## Constructors
|
|
16
|
+
|
|
17
|
+
### Constructor
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
new IntelligenceRealtimeMeteringPort(): IntelligenceRealtimeMeteringPort;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
`IntelligenceRealtimeMeteringPort`
|
|
26
|
+
|
|
27
|
+
## Methods
|
|
28
|
+
|
|
29
|
+
### report()
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
abstract report(event): Promise<void>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Defined in: realtime/ports/IntelligenceRealtimeMeteringPort.ts:23
|
|
36
|
+
|
|
37
|
+
Persists one metering event.
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
| Parameter | Type | Description |
|
|
42
|
+
| ------ | ------ | ------ |
|
|
43
|
+
| `event` | [`IntelligenceRealtimeMeteringEvent`](TypeAlias.IntelligenceRealtimeMeteringEvent) | Normalized, idempotently identifiable metering event. |
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: IntelligenceRealtimeSessionFactory'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: IntelligenceRealtimeSessionFactory
|
|
7
|
+
|
|
8
|
+
Defined in: IntelligenceRealtimeSessionFactory.ts:35
|
|
9
|
+
|
|
10
|
+
Creates and owns server-side, provider-neutral realtime AI sessions.
|
|
11
|
+
|
|
12
|
+
Applications forward normalized events and audio chunks through their own
|
|
13
|
+
authenticated WebSocket gateway. Provider credentials, provider event
|
|
14
|
+
mappings, token creation, and upstream sockets remain inside Archipel.
|
|
15
|
+
|
|
16
|
+
## Implements
|
|
17
|
+
|
|
18
|
+
- `OnModuleDestroy`
|
|
19
|
+
|
|
20
|
+
## Constructors
|
|
21
|
+
|
|
22
|
+
### Constructor
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
new IntelligenceRealtimeSessionFactory(
|
|
26
|
+
configService,
|
|
27
|
+
toolRegistry,
|
|
28
|
+
metering,
|
|
29
|
+
providerLoaders,
|
|
30
|
+
runtime): IntelligenceRealtimeSessionFactory;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Defined in: IntelligenceRealtimeSessionFactory.ts:55
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type |
|
|
38
|
+
| ------ | ------ |
|
|
39
|
+
| `configService` | `ConfigService` |
|
|
40
|
+
| `toolRegistry` | [`IntelligenceToolRegistry`](Class.IntelligenceToolRegistry) |
|
|
41
|
+
| `metering` | [`IntelligenceRealtimeMeteringPort`](Class.IntelligenceRealtimeMeteringPort) |
|
|
42
|
+
| `providerLoaders` | [`IntelligenceRealtimeModelLoaders`](TypeAlias.IntelligenceRealtimeModelLoaders) |
|
|
43
|
+
| `runtime` | `IIntelligenceRealtimeRuntimeOptions` |
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`IntelligenceRealtimeSessionFactory`
|
|
48
|
+
|
|
49
|
+
## Accessors
|
|
50
|
+
|
|
51
|
+
### activeSessionCount
|
|
52
|
+
|
|
53
|
+
#### Get Signature
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
get activeSessionCount(): number;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Defined in: IntelligenceRealtimeSessionFactory.ts:74
|
|
60
|
+
|
|
61
|
+
Number of sessions currently owned by this module instance.
|
|
62
|
+
|
|
63
|
+
##### Returns
|
|
64
|
+
|
|
65
|
+
`number`
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### registeredProviders
|
|
70
|
+
|
|
71
|
+
#### Get Signature
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
get registeredProviders(): readonly IntelligenceProviderName[];
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Defined in: IntelligenceRealtimeSessionFactory.ts:79
|
|
78
|
+
|
|
79
|
+
Providers currently registered for server-owned realtime sessions.
|
|
80
|
+
|
|
81
|
+
##### Returns
|
|
82
|
+
|
|
83
|
+
readonly [`IntelligenceProviderName`](TypeAlias.IntelligenceProviderName)[]
|
|
84
|
+
|
|
85
|
+
## Methods
|
|
86
|
+
|
|
87
|
+
### createSession()
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
createSession(options): Promise<IntelligenceRealtimeSessionPort>;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Defined in: IntelligenceRealtimeSessionFactory.ts:93
|
|
94
|
+
|
|
95
|
+
Creates an isolated realtime session without opening the upstream socket.
|
|
96
|
+
|
|
97
|
+
#### Parameters
|
|
98
|
+
|
|
99
|
+
| Parameter | Type | Description |
|
|
100
|
+
| ------ | ------ | ------ |
|
|
101
|
+
| `options` | [`IIntelligenceRealtimeSessionOptions`](Interface.IIntelligenceRealtimeSessionOptions) | Logical session, provider, model, tools, and event callbacks. |
|
|
102
|
+
|
|
103
|
+
#### Returns
|
|
104
|
+
|
|
105
|
+
`Promise`\<[`IntelligenceRealtimeSessionPort`](Class.IntelligenceRealtimeSessionPort)\>
|
|
106
|
+
|
|
107
|
+
A provider-neutral session. Call `connect()` to start streaming.
|
|
108
|
+
|
|
109
|
+
***
|
|
110
|
+
|
|
111
|
+
### onModuleDestroy()
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
onModuleDestroy(): Promise<void>;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Defined in: IntelligenceRealtimeSessionFactory.ts:132
|
|
118
|
+
|
|
119
|
+
Closes all owned upstream sessions during Nest application shutdown.
|
|
120
|
+
|
|
121
|
+
#### Returns
|
|
122
|
+
|
|
123
|
+
`Promise`\<`void`\>
|
|
124
|
+
|
|
125
|
+
#### Implementation of
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
OnModuleDestroy.onModuleDestroy
|
|
129
|
+
```
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Abstract Class: IntelligenceRealtimeSessionPort'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Abstract Class: IntelligenceRealtimeSessionPort
|
|
7
|
+
|
|
8
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:14
|
|
9
|
+
|
|
10
|
+
Provider-neutral control surface for one realtime model connection.
|
|
11
|
+
|
|
12
|
+
## Constructors
|
|
13
|
+
|
|
14
|
+
### Constructor
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
new IntelligenceRealtimeSessionPort(): IntelligenceRealtimeSessionPort;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### Returns
|
|
21
|
+
|
|
22
|
+
`IntelligenceRealtimeSessionPort`
|
|
23
|
+
|
|
24
|
+
## Accessors
|
|
25
|
+
|
|
26
|
+
### connectionId
|
|
27
|
+
|
|
28
|
+
#### Get Signature
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
get abstract connectionId(): string;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:18
|
|
35
|
+
|
|
36
|
+
##### Returns
|
|
37
|
+
|
|
38
|
+
`string`
|
|
39
|
+
|
|
40
|
+
***
|
|
41
|
+
|
|
42
|
+
### model
|
|
43
|
+
|
|
44
|
+
#### Get Signature
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
get abstract model(): string;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:20
|
|
51
|
+
|
|
52
|
+
##### Returns
|
|
53
|
+
|
|
54
|
+
`string`
|
|
55
|
+
|
|
56
|
+
***
|
|
57
|
+
|
|
58
|
+
### provider
|
|
59
|
+
|
|
60
|
+
#### Get Signature
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
get abstract provider(): IntelligenceProviderName;
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:19
|
|
67
|
+
|
|
68
|
+
##### Returns
|
|
69
|
+
|
|
70
|
+
[`IntelligenceProviderName`](TypeAlias.IntelligenceProviderName)
|
|
71
|
+
|
|
72
|
+
***
|
|
73
|
+
|
|
74
|
+
### sessionId
|
|
75
|
+
|
|
76
|
+
#### Get Signature
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
get abstract sessionId(): string;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:17
|
|
83
|
+
|
|
84
|
+
##### Returns
|
|
85
|
+
|
|
86
|
+
`string`
|
|
87
|
+
|
|
88
|
+
***
|
|
89
|
+
|
|
90
|
+
### status
|
|
91
|
+
|
|
92
|
+
#### Get Signature
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
get abstract status(): IntelligenceRealtimeStatus;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:21
|
|
99
|
+
|
|
100
|
+
##### Returns
|
|
101
|
+
|
|
102
|
+
[`IntelligenceRealtimeStatus`](TypeAlias.IntelligenceRealtimeStatus)
|
|
103
|
+
|
|
104
|
+
## Methods
|
|
105
|
+
|
|
106
|
+
### addToolOutput()
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
abstract addToolOutput(
|
|
110
|
+
callId,
|
|
111
|
+
output,
|
|
112
|
+
name?): Promise<void>;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:56
|
|
116
|
+
|
|
117
|
+
Returns a completed function result to the model.
|
|
118
|
+
|
|
119
|
+
#### Parameters
|
|
120
|
+
|
|
121
|
+
| Parameter | Type |
|
|
122
|
+
| ------ | ------ |
|
|
123
|
+
| `callId` | `string` |
|
|
124
|
+
| `output` | `unknown` |
|
|
125
|
+
| `name?` | `string` |
|
|
126
|
+
|
|
127
|
+
#### Returns
|
|
128
|
+
|
|
129
|
+
`Promise`\<`void`\>
|
|
130
|
+
|
|
131
|
+
***
|
|
132
|
+
|
|
133
|
+
### appendAudio()
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
abstract appendAudio(audio): Promise<void>;
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:34
|
|
140
|
+
|
|
141
|
+
Appends a base64-encoded audio fragment to the upstream input buffer.
|
|
142
|
+
|
|
143
|
+
#### Parameters
|
|
144
|
+
|
|
145
|
+
| Parameter | Type |
|
|
146
|
+
| ------ | ------ |
|
|
147
|
+
| `audio` | `string` |
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`Promise`\<`void`\>
|
|
152
|
+
|
|
153
|
+
***
|
|
154
|
+
|
|
155
|
+
### cancelResponse()
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
abstract cancelResponse(): Promise<void>;
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:53
|
|
162
|
+
|
|
163
|
+
Cancels the active model response.
|
|
164
|
+
|
|
165
|
+
#### Returns
|
|
166
|
+
|
|
167
|
+
`Promise`\<`void`\>
|
|
168
|
+
|
|
169
|
+
***
|
|
170
|
+
|
|
171
|
+
### clearAudio()
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
abstract clearAudio(): Promise<void>;
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:40
|
|
178
|
+
|
|
179
|
+
Clears the provider input audio buffer.
|
|
180
|
+
|
|
181
|
+
#### Returns
|
|
182
|
+
|
|
183
|
+
`Promise`\<`void`\>
|
|
184
|
+
|
|
185
|
+
***
|
|
186
|
+
|
|
187
|
+
### close()
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
abstract close(code?, reason?): Promise<void>;
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:59
|
|
194
|
+
|
|
195
|
+
Gracefully closes the upstream connection and flushes metering events.
|
|
196
|
+
|
|
197
|
+
#### Parameters
|
|
198
|
+
|
|
199
|
+
| Parameter | Type |
|
|
200
|
+
| ------ | ------ |
|
|
201
|
+
| `code?` | `number` |
|
|
202
|
+
| `reason?` | `string` |
|
|
203
|
+
|
|
204
|
+
#### Returns
|
|
205
|
+
|
|
206
|
+
`Promise`\<`void`\>
|
|
207
|
+
|
|
208
|
+
***
|
|
209
|
+
|
|
210
|
+
### commitAudio()
|
|
211
|
+
|
|
212
|
+
```ts
|
|
213
|
+
abstract commitAudio(): Promise<void>;
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:37
|
|
217
|
+
|
|
218
|
+
Commits the provider input audio buffer.
|
|
219
|
+
|
|
220
|
+
#### Returns
|
|
221
|
+
|
|
222
|
+
`Promise`\<`void`\>
|
|
223
|
+
|
|
224
|
+
***
|
|
225
|
+
|
|
226
|
+
### connect()
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
abstract connect(): Promise<void>;
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:28
|
|
233
|
+
|
|
234
|
+
Opens the upstream provider WebSocket and applies the session configuration.
|
|
235
|
+
|
|
236
|
+
#### Returns
|
|
237
|
+
|
|
238
|
+
`Promise`\<`void`\>
|
|
239
|
+
|
|
240
|
+
***
|
|
241
|
+
|
|
242
|
+
### requestResponse()
|
|
243
|
+
|
|
244
|
+
```ts
|
|
245
|
+
abstract requestResponse(options?): Promise<void>;
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:46
|
|
249
|
+
|
|
250
|
+
Requests a new model response.
|
|
251
|
+
|
|
252
|
+
#### Parameters
|
|
253
|
+
|
|
254
|
+
| Parameter | Type |
|
|
255
|
+
| ------ | ------ |
|
|
256
|
+
| `options?` | \{ `instructions?`: `string`; `metadata?`: `Readonly`\<`Record`\<`string`, `unknown`\>\>; `modalities?`: readonly `string`[]; \} |
|
|
257
|
+
| `options.instructions?` | `string` |
|
|
258
|
+
| `options.metadata?` | `Readonly`\<`Record`\<`string`, `unknown`\>\> |
|
|
259
|
+
| `options.modalities?` | readonly `string`[] |
|
|
260
|
+
|
|
261
|
+
#### Returns
|
|
262
|
+
|
|
263
|
+
`Promise`\<`void`\>
|
|
264
|
+
|
|
265
|
+
***
|
|
266
|
+
|
|
267
|
+
### send()
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
abstract send(event): Promise<void>;
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:31
|
|
274
|
+
|
|
275
|
+
Sends any provider-neutral client event.
|
|
276
|
+
|
|
277
|
+
#### Parameters
|
|
278
|
+
|
|
279
|
+
| Parameter | Type |
|
|
280
|
+
| ------ | ------ |
|
|
281
|
+
| `event` | [`IntelligenceRealtimeClientEvent`](TypeAlias.IntelligenceRealtimeClientEvent) |
|
|
282
|
+
|
|
283
|
+
#### Returns
|
|
284
|
+
|
|
285
|
+
`Promise`\<`void`\>
|
|
286
|
+
|
|
287
|
+
***
|
|
288
|
+
|
|
289
|
+
### sendText()
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
abstract sendText(text, requestResponse?): Promise<void>;
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Defined in: realtime/ports/IntelligenceRealtimeSessionPort.ts:43
|
|
296
|
+
|
|
297
|
+
Sends a text turn and optionally asks the model to respond.
|
|
298
|
+
|
|
299
|
+
#### Parameters
|
|
300
|
+
|
|
301
|
+
| Parameter | Type |
|
|
302
|
+
| ------ | ------ |
|
|
303
|
+
| `text` | `string` |
|
|
304
|
+
| `requestResponse?` | `boolean` |
|
|
305
|
+
|
|
306
|
+
#### Returns
|
|
307
|
+
|
|
308
|
+
`Promise`\<`void`\>
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: IntelligenceTextGenerator
|
|
7
7
|
|
|
8
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
8
|
+
Defined in: [IntelligenceTextGenerator.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L34)
|
|
9
9
|
|
|
10
10
|
Executes text completions using the configured intelligence provider.
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ new IntelligenceTextGenerator(
|
|
|
26
26
|
validateOnModuleInit?): IntelligenceTextGenerator;
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
29
|
+
Defined in: [IntelligenceTextGenerator.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L49)
|
|
30
30
|
|
|
31
31
|
#### Parameters
|
|
32
32
|
|
|
@@ -49,7 +49,7 @@ Defined in: [IntelligenceTextGenerator.ts:72](https://github.com/RueDeRennes/arc
|
|
|
49
49
|
generateText(prompt, options?): Promise<IIntelligenceTextCompletion>;
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
52
|
+
Defined in: [IntelligenceTextGenerator.ts:90](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L90)
|
|
53
53
|
|
|
54
54
|
Generates a completion using the configured provider.
|
|
55
55
|
|
|
@@ -76,7 +76,7 @@ Generates a completion using the configured provider.
|
|
|
76
76
|
getConfiguration(): IIntelligenceProviderConfiguration;
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
79
|
+
Defined in: [IntelligenceTextGenerator.ts:267](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L267)
|
|
80
80
|
|
|
81
81
|
Returns the resolved provider configuration with the API key redacted.
|
|
82
82
|
|
|
@@ -96,7 +96,7 @@ Returns the resolved provider configuration with the API key redacted.
|
|
|
96
96
|
onModuleInit(): Promise<void>;
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
99
|
+
Defined in: [IntelligenceTextGenerator.ts:74](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L74)
|
|
100
100
|
|
|
101
101
|
Eagerly resolves configuration at startup to fail fast on missing keys.
|
|
102
102
|
|
|
@@ -118,7 +118,7 @@ OnModuleInit.onModuleInit
|
|
|
118
118
|
streamText(prompt, options?): Promise<StreamTextResult<ToolSet, Context, Output<string, string, never>>>;
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
Defined in: [IntelligenceTextGenerator.ts:
|
|
121
|
+
Defined in: [IntelligenceTextGenerator.ts:192](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-intelligence/src/IntelligenceTextGenerator.ts#L192)
|
|
122
122
|
|
|
123
123
|
Streams a completion using the configured provider.
|
|
124
124
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Function: loadGoogleRealtimeModel()'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Function: loadGoogleRealtimeModel()
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
function loadGoogleRealtimeModel(configuration, options): Promise<RealtimeModelV4>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: providers/google/loadGoogleRealtimeModel.ts:17
|
|
13
|
+
|
|
14
|
+
Creates a Google Gemini Live model exclusively through the Vercel AI SDK provider.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `configuration` | [`IIntelligenceProviderConfiguration`](Interface.IIntelligenceProviderConfiguration) |
|
|
21
|
+
| `options` | `IIntelligenceRealtimeModelLoaderOptions` |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<`RealtimeModelV4`\>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Function: loadGrokRealtimeModel()'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Function: loadGrokRealtimeModel()
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
function loadGrokRealtimeModel(configuration, options): Promise<RealtimeModelV4>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: providers/grok/loadGrokRealtimeModel.ts:17
|
|
13
|
+
|
|
14
|
+
Creates an xAI Grok voice model exclusively through the Vercel AI SDK provider.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `configuration` | [`IIntelligenceProviderConfiguration`](Interface.IIntelligenceProviderConfiguration) |
|
|
21
|
+
| `options` | `IIntelligenceRealtimeModelLoaderOptions` |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<`RealtimeModelV4`\>
|