Class: OllamaTextEmbeddingModel
Hierarchy
-
AbstractModel
<OllamaTextEmbeddingModelSettings
>↳
OllamaTextEmbeddingModel
Implements
Accessors
dimensions
• get
dimensions(): undefined
| number
The size of the embedding vector.
Returns
undefined
| number
Implementation of
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:44
isParallelizable
• get
isParallelizable(): boolean
True if the model can handle multiple embedding calls in parallel.
Returns
boolean
Implementation of
EmbeddingModel.isParallelizable
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:40
modelInformation
• get
modelInformation(): ModelInformation
Returns
Implementation of
EmbeddingModel.modelInformation
Inherited from
AbstractModel.modelInformation
Defined in
packages/modelfusion/src/model-function/AbstractModel.ts:17
modelName
• get
modelName(): null
Returns
null
Overrides
AbstractModel.modelName
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:35
settingsForEvent
• get
settingsForEvent(): Partial
<OllamaTextEmbeddingModelSettings
>
Returns settings that should be recorded in observability events. Security-related settings (e.g. API keys) should not be included here.
Returns
Partial
<OllamaTextEmbeddingModelSettings
>
Implementation of
EmbeddingModel.settingsForEvent
Overrides
AbstractModel.settingsForEvent
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:86
Constructors
constructor
• new OllamaTextEmbeddingModel(settings
): OllamaTextEmbeddingModel
Parameters
Name | Type |
---|---|
settings | OllamaTextEmbeddingModelSettings |
Returns
Overrides
AbstractModel<OllamaTextEmbeddingModelSettings>.constructor
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:30
Methods
callAPI
▸ callAPI(texts
, callOptions
): Promise
<{ embedding
: number
[] }>
Parameters
Name | Type |
---|---|
texts | string [] |
callOptions | FunctionCallOptions |
Returns
Promise
<{ embedding
: number
[] }>
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:48
doEmbedValues
▸ doEmbedValues(texts
, options
): Promise
<{ embeddings
: number
[][] ; rawResponse
: { embedding
: number
[] } }>
Parameters
Name | Type |
---|---|
texts | string [] |
options | FunctionCallOptions |
Returns
Promise
<{ embeddings
: number
[][] ; rawResponse
: { embedding
: number
[] } }>
Implementation of
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:92
withSettings
▸ withSettings(additionalSettings
): OllamaTextEmbeddingModel
The withSettings
method creates a new model with the same configuration as the original model, but with the specified settings changed.
Parameters
Name | Type |
---|---|
additionalSettings | Partial <OllamaTextEmbeddingModelSettings > |
Returns
Example
const model = new OpenAICompletionModel({
model: "gpt-3.5-turbo-instruct",
maxGenerationTokens: 500,
});
const modelWithMoreTokens = model.withSettings({
maxGenerationTokens: 1000,
});
Implementation of
Overrides
AbstractModel.withSettings
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:101
Properties
maxValuesPerCall
• Readonly
maxValuesPerCall: 1
Limit of how many values can be sent in a single API call.
Implementation of
EmbeddingModel.maxValuesPerCall
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:39
provider
• Readonly
provider: "ollama"
Overrides
AbstractModel.provider
Defined in
packages/modelfusion/src/model-provider/ollama/OllamaTextEmbeddingModel.ts:34
settings
• Readonly
settings: OllamaTextEmbeddingModelSettings
Implementation of
Inherited from
AbstractModel.settings