-
Notifications
You must be signed in to change notification settings - Fork 129
Add openai-compatible model provider in memmachine-compose.sh #827
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
Conversation
14b3bcf to
f09598d
Compare
There was a problem hiding this comment.
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 adds support for "Others" as a model provider option in the memmachine-compose.sh script, enabling users to configure OpenAI-compatible API endpoints such as Qwen and DeepSeek.
Key changes:
- Added "OTHERS" provider option alongside existing OpenAI, Bedrock, and Ollama options
- Implemented configuration handling for custom base URLs and API keys for OpenAI-compatible providers
- Updated sample configuration files to include
other_modelandother_embedderentries
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| memmachine-compose.sh | Added OTHERS provider support with model selection, configuration generation, API key/base URL setup, and validation logic |
| sample_configs/episodic_memory_config.gpu.sample | Added other_embedder and other_model configuration entries as templates for OpenAI-compatible providers |
| sample_configs/episodic_memory_config.cpu.sample | Added other_embedder and other_model configuration entries as templates for OpenAI-compatible providers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
memmachine-compose.sh
Outdated
| ;; | ||
| "OTHERS") | ||
| print_prompt | ||
| read -p "Which OpenAI-compatible LLM model would you like to use? [gpt-4o-mini]: " llm_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to change the default value to "qwen-flush"
memmachine-compose.sh
Outdated
| ;; | ||
| "OTHERS") | ||
| print_prompt | ||
| read -p "Which OpenAI-compatible embedding model would you like to use? [text-embedding-3-small]: " embedding_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to text-embedding-v4
memmachine-compose.sh
Outdated
| # Ask user for provider path (OpenAI, Others, Bedrock, or Ollama) | ||
| print_prompt | ||
| read -p "Which provider would you like to use? (OpenAI/Bedrock/Ollama) [OpenAI]: " provider_input | ||
| read -p "Which provider would you like to use? (OpenAI/Others/Bedrock/Ollama) [OpenAI]: " provider_input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenAI/Bedrock/Ollama/Others
memmachine-compose.sh
Outdated
| echo " Default LLM: gpt-4o-mini" | ||
| echo " Default embedding: text-embedding-3-small" | ||
| echo " Requires: OpenAI API key" | ||
| echo " Others - Uses an OpenAI-compatible endpoint (custom base URL)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this to the end of list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening this PR and for working to improve model provider options! I wanted to share some thoughts and get your input on the naming and clarity:
- The addition of an "Others" provider might be confusing or redundant, as the existing "openai" and "ollama" options already support any OpenAI-compatible endpoint, not just the official OpenAI API.
- Users may not always realize that "openai" and "ollama" cover both the OpenAI service and any compatible endpoints from other providers. The current naming could imply it's limited to OpenAI only.
- To help with clarity and reduce potential confusion, it could be helpful to update the documentation or add tooltips specifying that the "openai" option supports all OpenAI-compatible APIs—including third-party endpoints.
- Alternatively, renaming the proposed "Others" option to something like "OpenAI/Compatible" or "Custom (OpenAI-compatible)" might make the scope more obvious to users.
I am open to suggestions and feedback. I'm okay with the last bullet of renaming this proposal from "Others" to "Custom (OpenAI-compatible)". However, we will need to change the input method from asking the user to type the option to selecting the option from a numbered list. This approach would improve the user experience.
Furthermore, we would need to add this new option to the memmachine-configure command so that they remain in sync.
|
Just notice Steve's comment. I think it makes sense. You may need to update the change. |
|
Hi @sscargal , thanks for your comment. |
|
@mwqgithub Thanks for the update. I agree. Perhaps we should consider renaming the proposed "Others" option to something like "OpenAI/Compatible" or "Custom (OpenAI-compatible)", which might make the scope more obvious to users. "Others" is too general IMHO and could mean anything. |
afa5acc to
2028173
Compare
|
Hi, @Kevin-K-W @sscargal . I've updated the code. Could you take a look again? |
2028173 to
a96884e
Compare
sscargal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Purpose of the change
Allow user to set an openai compatible model provider like qwen and deepseek.
Description
Add a openai-compatible model provider in memmachine-compose.sh. This allows user to set an openai compatible model provider like qwen and deepseek.
Type of change
How Has This Been Tested?
Checklist
Maintainer Checklist