UNPKG

@isdk/ai-tool-llm-llamacpp-pro

Version:
3,184 lines (1,595 loc) 45.1 kB
[**@isdk/ai-tool-llm-llamacpp-pro**](../README.md) *** [@isdk/ai-tool-llm-llamacpp-pro](../globals.md) / LlamaCppProvider # Class: LlamaCppProvider Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:48](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L48) ## Extends - `LLMProvider` ## Indexable \[`name`: `string`\]: `any` ## Constructors ### new LlamaCppProvider() > **new LlamaCppProvider**(`name`, `options`?): [`LlamaCppProvider`](LlamaCppProvider.md) Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:73 #### Parameters ##### name `string` | `Function` | `FuncItem` ##### options? `any` #### Returns [`LlamaCppProvider`](LlamaCppProvider.md) #### Inherited from `LLMProvider.constructor` ## Properties ### $attributes > **$attributes**: `Properties` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/advance.d.ts:5 #### Inherited from `LLMProvider.$attributes` *** ### alias? > `optional` **alias**: `string` \| `string`[] Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:33 #### Inherited from `LLMProvider.alias` *** ### apiKey? > `optional` **apiKey**: `string` Defined in: packages/ai-tool-llm/dist/index.d.ts:153 #### Inherited from `LLMProvider.apiKey` *** ### apiUrl? > `optional` **apiUrl**: `string` Defined in: packages/ai-tool-llm/dist/index.d.ts:154 #### Inherited from `LLMProvider.apiUrl` *** ### asyncFeatures > **asyncFeatures**: `AsyncFeatures` = `AsyncFeatures.MultiTask` Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:51](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L51) *** ### constructor > **constructor**: `Function` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:125 The initial value of Object.prototype.constructor is the standard built-in Object constructor. #### Inherited from `LLMProvider.constructor` *** ### defaultOptions > **defaultOptions**: `object` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:74 The default options for export and assign #### assign? > `optional` **assign**: `IMergeOptions` #### export? > `optional` **export**: `IMergeOptions` #### Inherited from `LLMProvider.defaultOptions` *** ### depends > **depends**: `object` Defined in: packages/ai-tool-llm/dist/index.d.ts:336 #### Index Signature \[`name`: `string`\]: `ToolFunc` #### Inherited from `LLMProvider.depends` *** ### description > **description**: `string` Defined in: packages/ai-tool-llm/dist/index.d.ts:317 #### Inherited from `LLMProvider.description` *** ### isApi? > `optional` **isApi**: `boolean` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:31 #### Inherited from `LLMProvider.isApi` *** ### model? > `optional` **model**: `string` Defined in: packages/ai-tool-llm/dist/index.d.ts:310 #### Inherited from `LLMProvider.model` *** ### name? > `optional` **name**: `string` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:25 #### Inherited from `LLMProvider.name` *** ### nonExported1stChar > **nonExported1stChar**: `string` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:78 the property with the default prefix '$' will not be exported. #### Inherited from `LLMProvider.nonExported1stChar` *** ### params > **params**: `object` Defined in: packages/ai-tool-llm/dist/index.d.ts:318 #### model > **model**: `object` ##### model.description > **description**: `string` ##### model.name > **name**: `string` ##### model.type > **type**: `string` #### options > **options**: `object` ##### options.description > **description**: `string` ##### options.name > **name**: `string` ##### options.type > **type**: `string` #### value > **value**: `object` ##### value.description > **description**: `string` ##### value.name > **name**: `string` ##### value.type > **type**: `string` #### Inherited from `LLMProvider.params` *** ### prior > **prior**: `number` Defined in: packages/ai-tool-llm/dist/index.d.ts:151 #### Inherited from `LLMProvider.prior` *** ### result > **result**: `string` Defined in: packages/ai-tool-llm/dist/index.d.ts:335 #### Inherited from `LLMProvider.result` *** ### rule > **rule**: `RegExp` Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:49](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L49) #### Overrides `LLMProvider.rule` *** ### scope? > `optional` **scope**: `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:28 #### Inherited from `LLMProvider.scope` *** ### setup()? > `optional` **setup**: (`this`, `options`?) => `void` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:30 #### Parameters ##### this `ToolFunc` ##### options? `FuncItem` #### Returns `void` #### Inherited from `LLMProvider.setup` *** ### stream? > `optional` **stream**: `boolean` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:32 #### Inherited from `LLMProvider.stream` *** ### supports > **supports**: `AIModelType` \| `AIModelType`[] Defined in: packages/ai-tool-llm/dist/index.d.ts:152 #### Inherited from `LLMProvider.supports` *** ### tags? > `optional` **tags**: `string` \| `string`[] Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:29 #### Inherited from `LLMProvider.tags` *** ### aliases > `static` **aliases**: `object` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:54 #### Index Signature \[`name`: `string`\]: `string` #### Inherited from `LLMProvider.aliases` *** ### current? > `static` `optional` **current**: `string` Defined in: packages/ai-tool-llm/dist/index.d.ts:313 #### Inherited from `LLMProvider.current` *** ### dataPath > `static` **dataPath**: `string` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:57 #### Inherited from `LLMProvider.dataPath` *** ### items > `static` **items**: `object` Defined in: packages/ai-tool-llm/dist/index.d.ts:314 #### Index Signature \[`name`: `string`\]: `LLMProvider` #### Inherited from `LLMProvider.items` ## Methods ### addModel()? > `optional` **addModel**(`modelName`, `model`): `Promise`\<`any`\> Defined in: packages/ai-tool-llm/dist/index.d.ts:308 #### Parameters ##### modelName `string` ##### model `any` #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.addModel` *** ### arr2ObjParams() > **arr2ObjParams**(`params`): `any`[] Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:76 #### Parameters ##### params `any`[] #### Returns `any`[] #### Inherited from `LLMProvider.arr2ObjParams` *** ### assign() > **assign**(`src`, `options`?): `this` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:106 Assign the values from the src object. #### Parameters ##### src `any` the source object ##### options? `IMergeOptions` #### Returns `this` this object #### Inherited from `LLMProvider.assign` *** ### assignProperty() > **assignProperty**(`src`, `name`, `value`, `attrs`?, `options`?): `void` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:117 Assign a property of src to this object. #### Parameters ##### src `any` the src object ##### name `string` the property name to assign ##### value `any` the property value to assign ##### attrs? `any` the attributes object ##### options? `IMergeOptions` #### Returns `void` #### Inherited from `LLMProvider.assignProperty` *** ### assignPropertyTo() > `abstract` **assignPropertyTo**(`dest`, `src`, `name`, `value`, `attrs`?, `options`?): `void` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:131 Assign the property value from the src to destination object. #### Parameters ##### dest `any` The destination object ##### src `any` The src object ##### name `string` The property name ##### value `any` The property value ##### attrs? `any` The attributes object of the property ##### options? `IMergeOptions` #### Returns `void` #### Inherited from `LLMProvider.assignPropertyTo` *** ### assignTo() > **assignTo**(`dest`?, `options`?): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:191 Assign this attributes to the dest object #### Parameters ##### dest? `any` the destination object ##### options? `IMergeOptions` #### Returns `any` the dest object #### Inherited from `LLMProvider.assignTo` *** ### clone() > **clone**(`options`?): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:155 Create a new object with the same values of attributes. #### Parameters ##### options? `IMergeOptions` #### Returns `any` the new object #### Inherited from `LLMProvider.clone` *** ### cloneTo() > **cloneTo**(`dest`, `options`?): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:148 Create and assign the values to the destination object. #### Parameters ##### dest `any` the destination object ##### options? `IMergeOptions` #### Returns `any` the new dest object #### Inherited from `LLMProvider.cloneTo` *** ### countTokens() > **countTokens**(`text`, `options`?): `Promise`\<`number`\> Defined in: packages/ai-tool-llm/dist/index.d.ts:369 #### Parameters ##### text `string` | `AIChatMessageParam`[] ##### options? `AITokenizeOptions` #### Returns `Promise`\<`number`\> #### Inherited from `LLMProvider.countTokens` *** ### defineProperties() > `abstract` **defineProperties**(`aProperties`): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:89 Define the attributes of this object. #### Parameters ##### aProperties `SimplePropDescriptors` the defined attributes of the object #### Returns `any` #### Inherited from `LLMProvider.defineProperties` *** ### deleteModel()? > `optional` **deleteModel**(`modelName`): `Promise`\<`any`\> Defined in: packages/ai-tool-llm/dist/index.d.ts:309 #### Parameters ##### modelName `string` #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.deleteModel` *** ### exportTo() > **exportTo**(`dest`, `options`?): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:173 Export attributes to the dest json object. #### Parameters ##### dest `any` the destination object ##### options? `IExportOptions` #### Returns `any` the dest object. #### Inherited from `LLMProvider.exportTo` *** ### formatPrompt() > **formatPrompt**(`messages`, `modelInfo`?, `options`?): `Promise`\<`undefined` \| `string`\> Defined in: packages/ai-tool-llm/dist/index.d.ts:359 #### Parameters ##### messages `AIChatMessageParam`[] ##### modelInfo? `string` | `AIModelParams` ##### options? ###### add_generation_prompt? `boolean` ###### chatTemplate? `AIPromptResult` ###### defaultTemplate? `boolean` ###### prompt? `any` ###### SystemTemplate? `AIPromptResult` ###### type? `AIPromptType` #### Returns `Promise`\<`undefined` \| `string`\> #### Inherited from `LLMProvider.formatPrompt` *** ### func() > **func**(`__namedParameters`): `Promise`\<`any`\> Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:152](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L152) #### Parameters ##### \_\_namedParameters ###### model `string` ###### options `AIOptions` ###### value `any` #### Returns `Promise`\<`any`\> #### Overrides `LLMProvider.func` *** ### getChatTemplate() > **getChatTemplate**(`modelInfo`?, `options`?): `Promise`\<`undefined` \| `AIPromptResult`\> Defined in: packages/ai-tool-llm/dist/index.d.ts:354 #### Parameters ##### modelInfo? `string` | `AIModelParams` ##### options? ###### defaultTemplate? `boolean` ###### provider? `string` ###### type? `AIPromptType` #### Returns `Promise`\<`undefined` \| `AIPromptResult`\> #### Inherited from `LLMProvider.getChatTemplate` *** ### getCurrentProvider() > **getCurrentProvider**(): `undefined` \| `LLMProvider` Defined in: packages/ai-tool-llm/dist/index.d.ts:351 #### Returns `undefined` \| `LLMProvider` #### Inherited from `LLMProvider.getCurrentProvider` *** ### getDefaultParameters() > **getDefaultParameters**(`chatTemplate`, `model`): `any` Defined in: packages/ai-tool-llm/dist/index.d.ts:367 #### Parameters ##### chatTemplate `AIPromptSettings` ##### model `string` #### Returns `any` #### Inherited from `LLMProvider.getDefaultParameters` *** ### getFunc() > **getFunc**(`name`?): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:82 #### Parameters ##### name? `string` #### Returns `any` #### Inherited from `LLMProvider.getFunc` *** ### getFuncWithPos() > **getFuncWithPos**(`name`?): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:87 #### Parameters ##### name? `string` #### Returns `any` #### Inherited from `LLMProvider.getFuncWithPos` *** ### getModelInfo() > **getModelInfo**(`modelName`?): `Promise`\<`AIModelParams`\> Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:243](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L243) #### Parameters ##### modelName? `string` #### Returns `Promise`\<`AIModelParams`\> #### Overrides `LLMProvider.getModelInfo` *** ### getProperties() > `abstract` **getProperties**(): `PropDescriptors` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:98 Get the defined attributes. #### Returns `PropDescriptors` the descriptors of properties object #### Inherited from `LLMProvider.getProperties` *** ### getProvider() > **getProvider**(`name`): `ToolFunc` Defined in: packages/ai-tool-llm/dist/index.d.ts:350 #### Parameters ##### name `string` #### Returns `ToolFunc` #### Inherited from `LLMProvider.getProvider` *** ### hasAsyncFeature() > **hasAsyncFeature**(`feature`): `boolean` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:88 #### Parameters ##### feature `AsyncFeatureBits` #### Returns `boolean` #### Inherited from `LLMProvider.hasAsyncFeature` *** ### hasOwnProperty() > **hasOwnProperty**(`v`): `boolean` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:140 Determines whether an object has a property with the specified name. #### Parameters ##### v `PropertyKey` A property name. #### Returns `boolean` #### Inherited from `LLMProvider.hasOwnProperty` *** ### initialize() > **initialize**(`src`?): `this` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:139 Initialize object and assign attribute values from src if src exists. #### Parameters ##### src? `any` #### Returns `this` this object. #### Inherited from `LLMProvider.initialize` *** ### isModelNameMatched() > **isModelNameMatched**(`modelName`, `rule`?): `undefined` \| `string` \| `RegExpExecArray` Defined in: packages/ai-tool-llm/dist/index.d.ts:341 #### Parameters ##### modelName `string` ##### rule? `AIModelNameRules` #### Returns `undefined` \| `string` \| `RegExpExecArray` #### Inherited from `LLMProvider.isModelNameMatched` *** ### isPrototypeOf() > **isPrototypeOf**(`v`): `boolean` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:146 Determines whether an object exists in another object's prototype chain. #### Parameters ##### v `Object` Another object whose prototype chain is to be checked. #### Returns `boolean` #### Inherited from `LLMProvider.isPrototypeOf` *** ### isSame() > **isSame**(`src`, `options`?): `boolean` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:200 Check the src object whether “equals” this object. #### Parameters ##### src `any` The source object ##### options? `IMergeOptions` #### Returns `boolean` #### Inherited from `LLMProvider.isSame` *** ### isStream() > **isStream**(`params`): `any` Defined in: packages/ai-tool-llm/dist/index.d.ts:342 #### Parameters ##### params `ServerFuncParams` #### Returns `any` #### Inherited from `LLMProvider.isStream` *** ### listModels() > **listModels**(): `Promise`\<`undefined` \| `string`[]\> Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:264](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L264) #### Returns `Promise`\<`undefined` \| `string`[]\> #### Overrides `LLMProvider.listModels` *** ### listProviders() > **listProviders**(`options`?): `object` Defined in: packages/ai-tool-llm/dist/index.d.ts:344 #### Parameters ##### options? ###### all? `boolean` ###### filter? `AIModelNameRules` #### Returns `object` #### Inherited from `LLMProvider.listProviders` *** ### loadModel() > **loadModel**(`model`): `Promise`\<[`LlamaLoadModelOptions`](../interfaces/LlamaLoadModelOptions.md)\> Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:217](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L217) #### Parameters ##### model [`LlamaLoadModelOptions`](../interfaces/LlamaLoadModelOptions.md) #### Returns `Promise`\<[`LlamaLoadModelOptions`](../interfaces/LlamaLoadModelOptions.md)\> *** ### mergeTo() > **mergeTo**(`dest`, `options`?): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:164 Merge this attributes to dest object. #### Parameters ##### dest `any` The destination object ##### options? `IMergeOptions` #### Returns `any` the dest object. #### Inherited from `LLMProvider.mergeTo` *** ### obj2ArrParams() > **obj2ArrParams**(`params`?): `any`[] Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:77 #### Parameters ##### params? `any` #### Returns `any`[] #### Inherited from `LLMProvider.obj2ArrParams` *** ### processModelOptions() > **processModelOptions**(`model`, `value`, `options`): `Promise`\<`AIOptions`\> Defined in: [packages/ai-tool-llm-llamacpp-pro/src/llamacpp.ts:53](https://github.com/isdk/ai-tool-llm-llamacpppro.js/blob/9c0ca0e3e655313e1ab7404ee1b7bd6f7999d23f/src/llamacpp.ts#L53) #### Parameters ##### model `string` ##### value `any` ##### options `AIOptions` #### Returns `Promise`\<`AIOptions`\> *** ### propertyIsEnumerable() > **propertyIsEnumerable**(`v`): `boolean` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:152 Determines whether a specified property is enumerable. #### Parameters ##### v `PropertyKey` A property name. #### Returns `boolean` #### Inherited from `LLMProvider.propertyIsEnumerable` *** ### register() > **register**(): `boolean` \| `ToolFunc` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:74 #### Returns `boolean` \| `ToolFunc` #### Inherited from `LLMProvider.register` *** ### run() > **run**(`params`?): `Promise`\<`any`\> Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:79 #### Parameters ##### params? `any` #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.run` *** ### runAs() > **runAs**(`name`, `params`?): `Promise`\<`any`\> Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:80 #### Parameters ##### name `string` ##### params? `any` #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.runAs` *** ### runAsSync() > **runAsSync**(`name`, `params`?): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:81 #### Parameters ##### name `string` ##### params? `any` #### Returns `any` #### Inherited from `LLMProvider.runAsSync` *** ### runSync() > **runSync**(`params`?): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:78 #### Parameters ##### params? `any` #### Returns `any` #### Inherited from `LLMProvider.runSync` *** ### runWithPos() > **runWithPos**(...`params`): `Promise`\<`any`\> Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:85 #### Parameters ##### params ...`any`[] #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.runWithPos` *** ### runWithPosAs() > **runWithPosAs**(`name`, ...`params`): `Promise`\<`any`\> Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:86 #### Parameters ##### name `string` ##### params ...`any`[] #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.runWithPosAs` *** ### runWithPosAsSync() > **runWithPosAsSync**(`name`, ...`params`): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:84 #### Parameters ##### name `string` ##### params ...`any`[] #### Returns `any` #### Inherited from `LLMProvider.runWithPosAsSync` *** ### runWithPosSync() > **runWithPosSync**(...`params`): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:83 #### Parameters ##### params ...`any`[] #### Returns `any` #### Inherited from `LLMProvider.runWithPosSync` *** ### setCurrentProvider() > **setCurrentProvider**(`name`): `void` Defined in: packages/ai-tool-llm/dist/index.d.ts:352 #### Parameters ##### name `string` #### Returns `void` #### Inherited from `LLMProvider.setCurrentProvider` *** ### toJSON() > **toJSON**(): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:182 #### Returns `any` #### Inherited from `LLMProvider.toJSON` *** ### tokenize() > **tokenize**(`text`, `options`?): `Promise`\<`number`[]\> Defined in: packages/ai-tool-llm/dist/index.d.ts:368 #### Parameters ##### text `string` | `AIChatMessageParam`[] ##### options? `AITokenizeOptions` #### Returns `Promise`\<`number`[]\> #### Inherited from `LLMProvider.tokenize` *** ### toLocaleString() > **toLocaleString**(): `string` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:131 Returns a date converted to a string using the current locale. #### Returns `string` #### Inherited from `LLMProvider.toLocaleString` *** ### toObject() > **toObject**(`options`?): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/abstract.d.ts:181 Convert the attributes to the json object #### Parameters ##### options? `any` #### Returns `any` the json object. #### Inherited from `LLMProvider.toObject` *** ### toString() > **toString**(): `string` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:128 Returns a string representation of an object. #### Returns `string` #### Inherited from `LLMProvider.toString` *** ### unregister() > **unregister**(): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:75 #### Returns `any` #### Inherited from `LLMProvider.unregister` *** ### updateModel()? > `optional` **updateModel**(`modelName`, `model`): `Promise`\<`any`\> Defined in: packages/ai-tool-llm/dist/index.d.ts:307 #### Parameters ##### modelName `string` ##### model `any` #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.updateModel` *** ### valueOf() > **valueOf**(): `Object` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:134 Returns the primitive value of the specified object. #### Returns `Object` #### Inherited from `LLMProvider.valueOf` *** ### assign() #### Call Signature > `static` **assign**\<`T`, `U`\>(`target`, `source`): `T` & `U` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:286 Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object. ##### Type Parameters • **T** *extends* `object` • **U** ##### Parameters ###### target `T` The target object to copy to. ###### source `U` The source object from which to copy properties. ##### Returns `T` & `U` ##### Inherited from `LLMProvider.assign` #### Call Signature > `static` **assign**\<`T`, `U`, `V`\>(`target`, `source1`, `source2`): `T` & `U` & `V` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:295 Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object. ##### Type Parameters • **T** *extends* `object` • **U** • **V** ##### Parameters ###### target `T` The target object to copy to. ###### source1 `U` The first source object from which to copy properties. ###### source2 `V` The second source object from which to copy properties. ##### Returns `T` & `U` & `V` ##### Inherited from `LLMProvider.assign` #### Call Signature > `static` **assign**\<`T`, `U`, `V`, `W`\>(`target`, `source1`, `source2`, `source3`): `T` & `U` & `V` & `W` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:305 Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object. ##### Type Parameters • **T** *extends* `object` • **U** • **V** • **W** ##### Parameters ###### target `T` The target object to copy to. ###### source1 `U` The first source object from which to copy properties. ###### source2 `V` The second source object from which to copy properties. ###### source3 `W` The third source object from which to copy properties. ##### Returns `T` & `U` & `V` & `W` ##### Inherited from `LLMProvider.assign` #### Call Signature > `static` **assign**(`target`, ...`sources`): `any` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:313 Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object. ##### Parameters ###### target `object` The target object to copy to. ###### sources ...`any`[] One or more source objects from which to copy properties ##### Returns `any` ##### Inherited from `LLMProvider.assign` *** ### create() #### Call Signature > `static` **create**(`o`): `any` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:188 Creates an object that has the specified prototype or that has null prototype. ##### Parameters ###### o Object to use as a prototype. May be null. `null` | `object` ##### Returns `any` ##### Inherited from `LLMProvider.create` #### Call Signature > `static` **create**(`o`, `properties`): `any` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:195 Creates an object that has the specified prototype, and that optionally contains specified properties. ##### Parameters ###### o Object to use as a prototype. May be null `null` | `object` ###### properties `PropertyDescriptorMap` & `ThisType`\<`any`\> JavaScript object that contains one or more property descriptors. ##### Returns `any` ##### Inherited from `LLMProvider.create` *** ### defineProperties() > `static` **defineProperties**(`aTarget`, `aProperties`, `recreate`?): `any` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/advance.d.ts:11 Adds one or more properties to an object, and/or modifies attributes of existing properties. #### Parameters ##### aTarget `any` ##### aProperties `PropDescriptors` ##### recreate? `boolean` #### Returns `any` #### Inherited from `LLMProvider.defineProperties` *** ### defineProperty() > `static` **defineProperty**\<`T`\>(`o`, `p`, `attributes`): `T` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:203 Adds a property to an object, or modifies attributes of an existing property. #### Type Parameters • **T** #### Parameters ##### o `T` Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object. ##### p `PropertyKey` The property name. ##### attributes `PropertyDescriptor` & `ThisType`\<`any`\> Descriptor for the property. It can be for a data property or an accessor property. #### Returns `T` #### Inherited from `LLMProvider.defineProperty` *** ### entries() #### Call Signature > `static` **entries**\<`T`\>(`o`): \[`string`, `T`\][] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:36 Returns an array of key/values of the enumerable own properties of an object ##### Type Parameters • **T** ##### Parameters ###### o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. \{\} | `ArrayLike`\<`T`\> ##### Returns \[`string`, `T`\][] ##### Inherited from `LLMProvider.entries` #### Call Signature > `static` **entries**(`o`): \[`string`, `any`\][] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:42 Returns an array of key/values of the enumerable own properties of an object ##### Parameters ###### o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. ##### Returns \[`string`, `any`\][] ##### Inherited from `LLMProvider.entries` *** ### freeze() #### Call Signature > `static` **freeze**\<`T`\>(`f`): `T` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:222 Prevents the modification of existing property attributes and values, and prevents the addition of new properties. ##### Type Parameters • **T** *extends* `Function` ##### Parameters ###### f `T` Object on which to lock the attributes. ##### Returns `T` ##### Inherited from `LLMProvider.freeze` #### Call Signature > `static` **freeze**\<`T`, `U`\>(`o`): `Readonly`\<`T`\> Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:228 Prevents the modification of existing property attributes and values, and prevents the addition of new properties. ##### Type Parameters • **T** *extends* `object` • **U** *extends* `string` \| `number` \| `bigint` \| `boolean` \| `symbol` ##### Parameters ###### o `T` Object on which to lock the attributes. ##### Returns `Readonly`\<`T`\> ##### Inherited from `LLMProvider.freeze` #### Call Signature > `static` **freeze**\<`T`\>(`o`): `Readonly`\<`T`\> Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:234 Prevents the modification of existing property attributes and values, and prevents the addition of new properties. ##### Type Parameters • **T** ##### Parameters ###### o `T` Object on which to lock the attributes. ##### Returns `Readonly`\<`T`\> ##### Inherited from `LLMProvider.freeze` *** ### fromEntries() #### Call Signature > `static` **fromEntries**\<`T`\>(`entries`): `object` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:26 Returns an object created by key-value entries for properties and methods ##### Type Parameters • **T** = `any` ##### Parameters ###### entries `Iterable`\<readonly \[`PropertyKey`, `T`\]\> An iterable object that contains key-value entries for properties and methods. ##### Returns `object` ##### Inherited from `LLMProvider.fromEntries` #### Call Signature > `static` **fromEntries**(`entries`): `any` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2019.object.d.ts:32 Returns an object created by key-value entries for properties and methods ##### Parameters ###### entries `Iterable`\<readonly `any`[]\> An iterable object that contains key-value entries for properties and methods. ##### Returns `any` ##### Inherited from `LLMProvider.fromEntries` *** ### get() > `static` **get**(`name`): `ToolFunc` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:58 #### Parameters ##### name `string` #### Returns `ToolFunc` #### Inherited from `LLMProvider.get` *** ### getAllByTag() > `static` **getAllByTag**(`tagName`): `ToolFunc`[] Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:61 #### Parameters ##### tagName `string` #### Returns `ToolFunc`[] #### Inherited from `LLMProvider.getAllByTag` *** ### getByModel() > `static` **getByModel**(`modelName`?): `undefined` \| `LLMProvider` Defined in: packages/ai-tool-llm/dist/index.d.ts:339 #### Parameters ##### modelName? `string` #### Returns `undefined` \| `LLMProvider` #### Inherited from `LLMProvider.getByModel` *** ### getByTag() > `static` **getByTag**(`tagName`): `undefined` \| `ToolFunc` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:60 #### Parameters ##### tagName `string` #### Returns `undefined` \| `ToolFunc` #### Inherited from `LLMProvider.getByTag` *** ### getCurrentProvider() > `static` **getCurrentProvider**(): `undefined` \| `LLMProvider` Defined in: packages/ai-tool-llm/dist/index.d.ts:340 #### Returns `undefined` \| `LLMProvider` #### Inherited from `LLMProvider.getCurrentProvider` *** ### getFunc() > `static` **getFunc**(`name`): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:65 #### Parameters ##### name `string` #### Returns `any` #### Inherited from `LLMProvider.getFunc` *** ### getFuncWithPos() > `static` **getFuncWithPos**(`name`): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:68 #### Parameters ##### name `string` #### Returns `any` #### Inherited from `LLMProvider.getFuncWithPos` *** ### getOwnPropertyDescriptor() > `static` **getOwnPropertyDescriptor**(`o`, `p`): `undefined` \| `PropertyDescriptor` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:175 Gets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. #### Parameters ##### o `any` Object that contains the property. ##### p `PropertyKey` Name of the property. #### Returns `undefined` \| `PropertyDescriptor` #### Inherited from `LLMProvider.getOwnPropertyDescriptor` *** ### getOwnPropertyDescriptors() > `static` **getOwnPropertyDescriptors**\<`T`\>(`o`): \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:48 Returns an object containing all own property descriptors of an object #### Type Parameters • **T** #### Parameters ##### o `T` Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. #### Returns \{ \[P in string \| number \| symbol\]: TypedPropertyDescriptor\<T\[P\]\> \} & `object` #### Inherited from `LLMProvider.getOwnPropertyDescriptors` *** ### getOwnPropertyNames() > `static` **getOwnPropertyNames**(`o`): `string`[] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:182 Returns the names of the own properties of an object. The own properties of an object are those that are defined directly on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. #### Parameters ##### o `any` Object that contains the own properties. #### Returns `string`[] #### Inherited from `LLMProvider.getOwnPropertyNames` *** ### getOwnPropertySymbols() > `static` **getOwnPropertySymbols**(`o`): `symbol`[] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:319 Returns an array of all symbol properties found directly on object o. #### Parameters ##### o `any` Object to retrieve the symbols from. #### Returns `symbol`[] #### Inherited from `LLMProvider.getOwnPropertySymbols` *** ### getProperties() > `static` **getProperties**(): `PropDescriptors` Defined in: node\_modules/.pnpm/property-manager@2.0.0/node\_modules/property-manager/lib/advance.d.ts:10 get all properties descriptor include inherited. #### Returns `PropDescriptors` #### Inherited from `LLMProvider.getProperties` *** ### getPrototypeOf() > `static` **getPrototypeOf**(`o`): `any` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:167 Returns the prototype of an object. #### Parameters ##### o `any` The object that references the prototype. #### Returns `any` #### Inherited from `LLMProvider.getPrototypeOf` *** ### hasAsyncFeature() > `static` **hasAsyncFeature**(`feature`): `boolean` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:62 #### Parameters ##### feature `AsyncFeatureBits` #### Returns `boolean` #### Inherited from `LLMProvider.hasAsyncFeature` *** ### is() > `static` **is**(`value1`, `value2`): `boolean` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:332 Returns true if the values are the same value, false otherwise. #### Parameters ##### value1 `any` The first value. ##### value2 `any` The second value. #### Returns `boolean` #### Inherited from `LLMProvider.is` *** ### isExtensible() > `static` **isExtensible**(`o`): `boolean` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:258 Returns a value that indicates whether new properties can be added to an object. #### Parameters ##### o `any` Object to test. #### Returns `boolean` #### Inherited from `LLMProvider.isExtensible` *** ### isFrozen() > `static` **isFrozen**(`o`): `boolean` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:252 Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. #### Parameters ##### o `any` Object to test. #### Returns `boolean` #### Inherited from `LLMProvider.isFrozen` *** ### isSealed() > `static` **isSealed**(`o`): `boolean` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:246 Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. #### Parameters ##### o `any` Object to test. #### Returns `boolean` #### Inherited from `LLMProvider.isSealed` *** ### keys() #### Call Signature > `static` **keys**(`o`): `string`[] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:264 Returns the names of the enumerable string properties and methods of an object. ##### Parameters ###### o `object` Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. ##### Returns `string`[] ##### Inherited from `LLMProvider.keys` #### Call Signature > `static` **keys**(`o`): `string`[] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:325 Returns the names of the enumerable string properties and methods of an object. ##### Parameters ###### o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. ##### Returns `string`[] ##### Inherited from `LLMProvider.keys` *** ### list() > `static` **list**(): `Funcs` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:59 #### Returns `Funcs` #### Inherited from `LLMProvider.list` *** ### preventExtensions() > `static` **preventExtensions**\<`T`\>(`o`): `T` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:240 Prevents the addition of new properties to an object. #### Type Parameters • **T** #### Parameters ##### o `T` Object to make non-extensible. #### Returns `T` #### Inherited from `LLMProvider.preventExtensions` *** ### register() #### Call Signature > `static` **register**(`name`, `options`): `boolean` \| `ToolFunc` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:69 ##### Parameters ###### name `string` ###### options `FuncItem` ##### Returns `boolean` \| `ToolFunc` ##### Inherited from `LLMProvider.register` #### Call Signature > `static` **register**(`func`, `options`): `boolean` \| `ToolFunc` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:70 ##### Parameters ###### func `Function` ###### options `FuncItem` ##### Returns `boolean` \| `ToolFunc` ##### Inherited from `LLMProvider.register` #### Call Signature > `static` **register**(`name`, `options`?): `boolean` \| `ToolFunc` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:71 ##### Parameters ###### name `string` | `Function` | `ToolFunc` | `FuncItem` ###### options? `FuncItem` ##### Returns `boolean` \| `ToolFunc` ##### Inherited from `LLMProvider.register` *** ### run() > `static` **run**(`name`, `params`?): `Promise`\<`any`\> Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:63 #### Parameters ##### name `string` ##### params? `any` #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.run` *** ### runSync() > `static` **runSync**(`name`, `params`?): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:64 #### Parameters ##### name `string` ##### params? `any` #### Returns `any` #### Inherited from `LLMProvider.runSync` *** ### runWithPos() > `static` **runWithPos**(`name`, ...`params`): `Promise`\<`any`\> Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:66 #### Parameters ##### name `string` ##### params ...`any`[] #### Returns `Promise`\<`any`\> #### Inherited from `LLMProvider.runWithPos` *** ### runWithPosSync() > `static` **runWithPosSync**(`name`, ...`params`): `any` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:67 #### Parameters ##### name `string` ##### params ...`any`[] #### Returns `any` #### Inherited from `LLMProvider.runWithPosSync` *** ### seal() > `static` **seal**\<`T`\>(`o`): `T` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es5.d.ts:216 Prevents the modification of attributes of existing properties, and prevents the addition of new properties. #### Type Parameters • **T** #### Parameters ##### o `T` Object on which to lock the attributes. #### Returns `T` #### Inherited from `LLMProvider.seal` *** ### setPrototypeOf() > `static` **setPrototypeOf**(`o`, `proto`): `any` Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2015.core.d.ts:339 Sets the prototype of a specified object o to object proto or null. Returns the object o. #### Parameters ##### o `any` The object to change its prototype. ##### proto The value of the new prototype or null. `null` | `object` #### Returns `any` #### Inherited from `LLMProvider.setPrototypeOf` *** ### unregister() > `static` **unregister**(`name`): `undefined` \| `ToolFunc` Defined in: packages/ai-tool/dist/index-BkwhCK1q.d.ts:72 #### Parameters ##### name `string` #### Returns `undefined` \| `ToolFunc` #### Inherited from `LLMProvider.unregister` *** ### values() #### Call Signature > `static` **values**\<`T`\>(`o`): `T`[] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:24 Returns an array of values of the enumerable own properties of an object ##### Type Parameters • **T** ##### Parameters ###### o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. \{\} | `ArrayLike`\<`T`\> ##### Returns `T`[] ##### Inherited from `LLMProvider.values` #### Call Signature > `static` **values**(`o`): `any`[] Defined in: node\_modules/.pnpm/typescript@5.7.3/node\_modules/typescript/lib/lib.es2017.object.d.ts:30 Returns an array of values of the enumerable own properties of an object ##### Parameters ###### o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. ##### Returns `any`[] ##### Inherited from `LLMProvider.values`