Skip to content

add MiniMax model client #628

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

Closed

Conversation

mxsl-gr
Copy link
Contributor

@mxsl-gr mxsl-gr commented Apr 24, 2024

Hi, this PR is add MiniMax model client and has passed unit testing.
I can provide my api_key if needed for testing

the PR content:

  • MiniMax chat client and function calls (not yet supported to return multiple function calls at once)
  • MiniMax embedding client
  • spring starter
  • unit test
  • chat client documents
  • embedding client documents

MiniMax is a popular LLM in China Mainland recently, the link: MiniMax

For some reasons, products from OpenAI and others can't be directly used in Chinese Mainland.

However ZhiPuAI, Moonshot, MiniMax, BaiChuanAI are referred to as the Four Dragons of China's LLM.

If they can supported, it will further aid spring-ai to promotion in Chinese Mainland.

If necessary, I can take care of subsequent maintenance since I'm currently using them.

The Moonshot PR is #596
The ZhiPuAI PR is #623

I'll also provide PR for BaiChuan later.

@tzolov tzolov added this to the 1.0.0-M1 milestone Apr 26, 2024
@markpollack
Copy link
Member

Thanks, it has taken a long time for me to get to this but I am reviewing now. Thanks for such a comprehensive PR!

@markpollack
Copy link
Member

@mxsl-gr I have sent you an email as I am not able to get an API key on the minimax web site. I enter my phone number to get a verification code, but the code never comes.

*
* <pre>{@code List.of("text1", "text2", "text3") or List.of(List.of(1, 2, 3), List.of(3, 4, 5))} </pre>
*/
public <T> ResponseEntity<EmbeddingList> embeddings(EmbeddingRequest embeddingRequest) {
Copy link
Member

Choose a reason for hiding this comment

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

I believe the <T> needs to be removed.

@markpollack
Copy link
Member

I've merged the PR in 6b67401 Please review the comments above that were not address in the merge.

Much thanks again

@mxsl-gr
Copy link
Contributor Author

mxsl-gr commented May 21, 2024

@mxsl-gr I have sent you an email as I am not able to get an API key on the minimax web site. I enter my phone number to get a verification code, but the code never comes.

@markpollack Regarding the inability to receive verification codes from MiniMax or other model providers, it may be that they are only integrated with SMS providers in mainland China, and phone numbers from other countries or regions cannot receive the messages.

In my email reply, I have provided the test API keys for MiniMax, Moonshot, and DeepSeek.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants