Skip to content

Add More backend - #99

Merged
CaralHsi merged 3 commits into
MemTensor:devfrom
Gaojianli:dev
Jul 16, 2025
Merged

Add More backend#99
CaralHsi merged 3 commits into
MemTensor:devfrom
Gaojianli:dev

Conversation

@Gaojianli

Copy link
Copy Markdown
Contributor

Description

Summary: (summary)

  1. 豆包支持非多模态模型
  2. embedder支持Azure backend

Fix: #(issue)

Reviewer: @(reviewer)

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have added necessary documentation (if applicable) | 我已添加必要的文档(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

2. embedder支持Azure backend
Copilot AI review requested due to automatic review settings July 16, 2025 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 embed should 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 AzureOpenAI client is initialized and used correctly in embed.
        elif self.provider == "azure":

Comment thread src/memos/configs/embedder.py Outdated
@Ki-Seki
Ki-Seki requested a review from CaralHsi July 16, 2025 06:42
@CaralHsi

Copy link
Copy Markdown
Collaborator

Hi! Thanks for your contribution!
Could you please add an azure api example in examples/basic_modules/embedder.py

@Gaojianli

Copy link
Copy Markdown
Contributor Author

Hi! Thanks for your contribution! Could you please add an azure api example in examples/basic_modules/embedder.py

added

@CaralHsi
CaralHsi merged commit ba74bf1 into MemTensor:dev Jul 16, 2025
16 checks passed
tianxing02 pushed a commit to tianxing02/MemOS that referenced this pull request Feb 24, 2026
* 1. 豆包支持非多模态模型
2. embedder支持Azure backend

* fix typo

* add example
@angarchie

Copy link
Copy Markdown
Collaborator

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 🧠✨

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.

4 participants