Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(integrations): Add ollama embeddings support #278

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

ephraimkunz
Copy link
Contributor

Update to the most recent ollama-rs, which exposes the batch embedding API Ollama exposes (pepperoni21/ollama-rs#61). This allows the Ollama struct in Swiftide to implement EmbeddingModel.

Use the same pattern that the OpenAI struct uses to manage separate embedding and prompt models.

@ephraimkunz
Copy link
Contributor Author

I'm going to create a separate PR to update the documentation on the website. I'll link to it here when it's out for review.

@ephraimkunz
Copy link
Contributor Author

Updated the website in bosun-ai/swiftide-website#15

@timonv timonv self-requested a review September 8, 2024 14:42
@timonv
Copy link
Member

timonv commented Sep 8, 2024

Awesome, looking good, I'll do a full review asap

tinco
tinco previously approved these changes Sep 8, 2024
Copy link
Member

@tinco tinco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this over and it looks great! :)

Copy link
Member

@timonv timonv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for this! Small comment on naming.

swiftide-integrations/src/ollama/mod.rs Outdated Show resolved Hide resolved
@timonv timonv changed the title feat: Add interface so ollama client can do embedding feat(integrations): Add ollama embeddings support Sep 8, 2024
Copy link
Member

@timonv timonv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed it. Great work! Will be merging and releasing this in a bit! 🙏

@timonv timonv merged commit a98dbcb into bosun-ai:master Sep 8, 2024
6 of 7 checks passed
timonv pushed a commit that referenced this pull request Sep 8, 2024
## 🤖 New release
* `swiftide`: 0.10.0 -> 0.11.0
* `swiftide-core`: 0.10.0 -> 0.11.0
* `swiftide-indexing`: 0.10.0 -> 0.11.0
* `swiftide-macros`: 0.10.0 -> 0.11.0
* `swiftide-integrations`: 0.10.0 -> 0.11.0
* `swiftide-query`: 0.10.0 -> 0.11.0

<details><summary><i><b>Changelog</b></i></summary><p>

## `swiftide`
<blockquote>

## [0.11.0](https://github.com/bosun-ai/swiftide/releases/tag/0.11.0) -
2024-09-08

### Added

-
[bdf17ad](bdf17ad)
*(indexing)* Parquet loader
([#279](#279))

-
[a98dbcb](a98dbcb)
*(integrations)* Add ollama embeddings support
([#278](#278))


**Full Changelog**:
0.10.0...0.11.0
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ephraimkunz ephraimkunz deleted the feature/ollama-embedding branch September 8, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants