Skip to content

ZhiPuAi and MiniMax ChatModel support completions-path properties config #3314

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

Open
ChenKangQiang opened this issue May 24, 2025 · 0 comments

Comments

@ChenKangQiang
Copy link

Expected Behavior

support completions-path properties config

Current Behavior
ZhiPuAi completions-path default /v4/chat/completions

public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {

	Assert.notNull(chatRequest, "The request body can not be null.");
	Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

	return this.restClient.post()
			.uri("/v4/chat/completions")
			.body(chatRequest)
			.retrieve()
			.toEntity(ChatCompletion.class);
}

MiniMax completions-path default /v1/text/chatcompletion_v2

public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {

	Assert.notNull(chatRequest, "The request body can not be null.");
	Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

	return this.restClient.post()
			.uri("/v1/text/chatcompletion_v2")
			.body(chatRequest)
			.retrieve()
			.toEntity(ChatCompletion.class);
}
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

No branches or pull requests

1 participant