MemOS icon indicating copy to clipboard operation
MemOS copied to clipboard

feat: pass default_headers to get_openai_config() and pass extra_body to openai.OpenAI.embeddings.create()

Open Insaniauser opened this issue 8 months ago • 4 comments

Pre-submission checklist | 提交前检查

  • [x] I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • [x] I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • [x] This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题

Problem Statement | 问题陈述

https://github.com/MemTensor/MemOS/blob/6a43b4947688c783e58996472715b241f1688e20/src/memos/api/config.py#L264 自定义的大模型API接口要求传入应用鉴权信息,需要允许get_openai_config传递default_headers参数

https://github.com/MemTensor/MemOS/blob/6a43b4947688c783e58996472715b241f1688e20/src/memos/embedders/universal_api.py#L81 使用的jina-embeddings-v4模型要求传入extra_body={"task": "retrieval"},需要允许openai.OpenAI.embeddings.create传递extra_body参数

Willingness to Implement | 实现意愿

  • [ ] I'm willing to implement this myself | 我愿意自己解决
  • [x] I would like someone else to implement this | 我希望其他人来解决

Insaniauser avatar Mar 16 '26 01:03 Insaniauser

Added to the iteration plan. It will be implemented in a future release. Thanks for the suggestion and feedback.

已加入迭代计划,将在后续版本中进行实现。感谢你的建议与反馈。

hijzy avatar Mar 16 '26 12:03 hijzy

This issue has been automatically marked as stale due to inactivity.

github-actions[bot] avatar Apr 16 '26 03:04 github-actions[bot]

This issue has been automatically closed due to inactivity.

github-actions[bot] avatar Apr 28 '26 05:04 github-actions[bot]

Hey @Insaniauser! Thanks for the contribution — already solved the issue, thanks for helping us to improve our project! 📈

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

angarchie avatar May 14 '26 09:05 angarchie