Skip to content

Commit

Permalink
Revert "mark embeddings() method as deprecated in favor of embed() (
Browse files Browse the repository at this point in the history
#111)"

This reverts commit 2d31f21.
  • Loading branch information
BruceMacD committed Jul 19, 2024
1 parent fbf9513 commit fdae8fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ ollama.show(request)
- `options` `<Options>`: (Optional) Options to configure the runtime.
- Returns: `<ShowResponse>`

### embed
### embeddings

```javascript
ollama.embed(request)
ollama.embeddings(request)
```

- `request` `<Object>`: The request object containing embedding parameters.
Expand All @@ -187,7 +187,7 @@ ollama.embed(request)
- `truncate` `<boolean>`: (Optional) Truncate the input to fit the maximum context length supported by the model.
- `keep_alive` `<string | number>`: (Optional) How long to keep the model loaded.
- `options` `<Options>`: (Optional) Options to configure the runtime.
- Returns: `<EmbedResponse>`
- Returns: `<EmbeddingsResponse>`

### ps

Expand Down
1 change: 0 additions & 1 deletion src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ async encodeImage(image: Uint8Array | string): Promise<string> {

/**
* Embeds a text prompt into a vector.
* @deprecated Use the `embed` method instead.
* @param request {EmbeddingsRequest} - The request object.
* @returns {Promise<EmbeddingsResponse>} - The response object.
*/
Expand Down
6 changes: 0 additions & 6 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ export interface EmbedRequest {
options?: Partial<Options>
}

/**
* @deprecated Use the EmbedRequest interface with the embed() method instead.
*/
export interface EmbeddingsRequest {
model: string
prompt: string
Expand Down Expand Up @@ -197,9 +194,6 @@ export interface EmbedResponse {
embeddings: number[][]
}

/**
* @deprecated Use the embed() method with the EmbedResponse instead.
*/
export interface EmbeddingsResponse {
embedding: number[]
}
Expand Down

0 comments on commit fdae8fe

Please sign in to comment.