mu-core 0.22.0 → 0.23.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/esm/index.d.ts +1 -1
- package/esm/types.d.ts +11 -0
- package/package.json +1 -1
- package/script/index.d.ts +1 -1
- package/script/types.d.ts +11 -0
package/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ContentPart, Message, Provider, Role, StreamEvent, Tool, Usage } from './types.js';
|
|
1
|
+
export type { ContentPart, Message, ModelModalities, Provider, Role, StreamEvent, Tool, Usage } from './types.js';
|
|
2
2
|
export { audio, image, text } from './types.js';
|
|
3
3
|
export type { Agent, AgentConfig, AgentResult, Input, LoopEvent, RunOptions } from './agent.js';
|
|
4
4
|
export { createAgent, run } from './agent.js';
|
package/esm/types.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ export type StreamEvent = ContentPart | {
|
|
|
49
49
|
type: 'reasoning';
|
|
50
50
|
text: string;
|
|
51
51
|
};
|
|
52
|
+
/** Non-text input modalities a model accepts. */
|
|
53
|
+
export interface ModelModalities {
|
|
54
|
+
vision: boolean;
|
|
55
|
+
audio: boolean;
|
|
56
|
+
}
|
|
52
57
|
export interface Provider {
|
|
53
58
|
stream(req: {
|
|
54
59
|
model: string;
|
|
@@ -56,4 +61,10 @@ export interface Provider {
|
|
|
56
61
|
tools: Tool[];
|
|
57
62
|
signal?: AbortSignal;
|
|
58
63
|
}): AsyncIterable<StreamEvent>;
|
|
64
|
+
/**
|
|
65
|
+
* Probe a model's input modalities. MAY load the model (e.g. a llama.cpp `/props`
|
|
66
|
+
* fetch) — call it on model selection, not on every turn. Optional: providers that
|
|
67
|
+
* can't introspect modalities simply omit it.
|
|
68
|
+
*/
|
|
69
|
+
capabilities?(model: string): Promise<ModelModalities | undefined>;
|
|
59
70
|
}
|
package/package.json
CHANGED
package/script/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ContentPart, Message, Provider, Role, StreamEvent, Tool, Usage } from './types.js';
|
|
1
|
+
export type { ContentPart, Message, ModelModalities, Provider, Role, StreamEvent, Tool, Usage } from './types.js';
|
|
2
2
|
export { audio, image, text } from './types.js';
|
|
3
3
|
export type { Agent, AgentConfig, AgentResult, Input, LoopEvent, RunOptions } from './agent.js';
|
|
4
4
|
export { createAgent, run } from './agent.js';
|
package/script/types.d.ts
CHANGED
|
@@ -49,6 +49,11 @@ export type StreamEvent = ContentPart | {
|
|
|
49
49
|
type: 'reasoning';
|
|
50
50
|
text: string;
|
|
51
51
|
};
|
|
52
|
+
/** Non-text input modalities a model accepts. */
|
|
53
|
+
export interface ModelModalities {
|
|
54
|
+
vision: boolean;
|
|
55
|
+
audio: boolean;
|
|
56
|
+
}
|
|
52
57
|
export interface Provider {
|
|
53
58
|
stream(req: {
|
|
54
59
|
model: string;
|
|
@@ -56,4 +61,10 @@ export interface Provider {
|
|
|
56
61
|
tools: Tool[];
|
|
57
62
|
signal?: AbortSignal;
|
|
58
63
|
}): AsyncIterable<StreamEvent>;
|
|
64
|
+
/**
|
|
65
|
+
* Probe a model's input modalities. MAY load the model (e.g. a llama.cpp `/props`
|
|
66
|
+
* fetch) — call it on model selection, not on every turn. Optional: providers that
|
|
67
|
+
* can't introspect modalities simply omit it.
|
|
68
|
+
*/
|
|
69
|
+
capabilities?(model: string): Promise<ModelModalities | undefined>;
|
|
59
70
|
}
|