Add More backend - #99
Conversation
2. embedder支持Azure backend
There was a problem hiding this comment.
Pull Request Overview
This PR extends the embedding functionality by adding Azure support to the universal API embedder and by enabling non-multimodal (text-only) embeddings in the Ark embedder.
- Added Azure client support and unified embedding logic in
universal_api.py - Refactored Ark embedder to separate text-only and multimodal paths
- Introduced a config flag to toggle multimodal embedding for Ark
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/memos/embedders/universal_api.py | Imported and wired up AzureOpenAI as a new provider, and updated embed to handle both. |
| src/memos/embedders/ark.py | Added text_embedding helper, branched on the new multimodal flag, and updated embed flow. |
| src/memos/configs/embedder.py | Added muiti_modal field to toggle Ark’s multimodal embedding (text + image). |
Comments suppressed due to low confidence (2)
src/memos/embedders/ark.py:37
- The docstring for
embedshould be updated to describe both the text-only and multimodal embedding paths introduced in this change.
def embed(self, texts: list[str]) -> list[list[float]]:
src/memos/embedders/universal_api.py:15
- Consider adding unit tests for the Azure provider branch to verify that the
AzureOpenAIclient is initialized and used correctly inembed.
elif self.provider == "azure":
|
Hi! Thanks for your contribution! |
added |
* 1. 豆包支持非多模态模型 2. embedder支持Azure backend * fix typo * add example
|
Hey @Gaojianli! Thanks for the contribution — already merged your PR, thanks for putting this together! 🚀 Btw if you enjoyed contributing and want to stay connected with the project, we run a Discord server for contributors, a chill space to discuss features, ask questions, or pick up new issues 👉🏻 MemOS Discord Server (Contributor Exclusive) Thanks again for shipping this, and happy MemOSing 🧠✨ |
Description
Summary: (summary)
Fix: #(issue)
Reviewer: @(reviewer)
Checklist: