feat(ollama): support defaultOptions and defaultTimeout for ollama provider
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-01-20 - 0.11.0 - feat(ollama)
|
||||||
|
support defaultOptions and defaultTimeout for ollama provider
|
||||||
|
|
||||||
|
- Added ollama.defaultOptions object with fields: num_ctx, temperature, top_k, top_p, repeat_penalty, num_predict, stop, seed
|
||||||
|
- Added ollama.defaultTimeout option
|
||||||
|
- Pass defaultOptions and defaultTimeout into OllamaProvider constructor when initializing the provider
|
||||||
|
- Non-breaking change: existing behavior preserved if new fields are undefined
|
||||||
|
|
||||||
## 2026-01-20 - 0.10.1 - fix()
|
## 2026-01-20 - 0.10.1 - fix()
|
||||||
no changes detected — no release necessary
|
no changes detected — no release necessary
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartai',
|
name: '@push.rocks/smartai',
|
||||||
version: '0.10.1',
|
version: '0.11.0',
|
||||||
description: 'SmartAi is a versatile TypeScript library designed to facilitate integration and interaction with various AI models, offering functionalities for chat, audio generation, document processing, and vision tasks.'
|
description: 'SmartAi is a versatile TypeScript library designed to facilitate integration and interaction with various AI models, offering functionalities for chat, audio generation, document processing, and vision tasks.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,17 @@ export interface ISmartAiOptions {
|
|||||||
baseUrl?: string;
|
baseUrl?: string;
|
||||||
model?: string;
|
model?: string;
|
||||||
visionModel?: string;
|
visionModel?: string;
|
||||||
|
defaultOptions?: {
|
||||||
|
num_ctx?: number;
|
||||||
|
temperature?: number;
|
||||||
|
top_k?: number;
|
||||||
|
top_p?: number;
|
||||||
|
repeat_penalty?: number;
|
||||||
|
num_predict?: number;
|
||||||
|
stop?: string[];
|
||||||
|
seed?: number;
|
||||||
|
};
|
||||||
|
defaultTimeout?: number;
|
||||||
};
|
};
|
||||||
elevenlabs?: {
|
elevenlabs?: {
|
||||||
defaultVoiceId?: string;
|
defaultVoiceId?: string;
|
||||||
@@ -111,6 +122,8 @@ export class SmartAi {
|
|||||||
baseUrl: this.options.ollama.baseUrl,
|
baseUrl: this.options.ollama.baseUrl,
|
||||||
model: this.options.ollama.model,
|
model: this.options.ollama.model,
|
||||||
visionModel: this.options.ollama.visionModel,
|
visionModel: this.options.ollama.visionModel,
|
||||||
|
defaultOptions: this.options.ollama.defaultOptions,
|
||||||
|
defaultTimeout: this.options.ollama.defaultTimeout,
|
||||||
});
|
});
|
||||||
await this.ollamaProvider.start();
|
await this.ollamaProvider.start();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user