Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 24, 2025

This PR initially implemented support for WeChat Intelligent Conversation (微信智能对话) functionality in the MP module, but has been reverted after feedback indicating that the API endpoint was incorrectly assumed. The implementation has been reverted pending access to the official WeChat AI Speech documentation.

What Was Reverted

The following implementation has been completely removed:

Removed API Methods from WxMpAiOpenService

  • intelligentConversation(String query, String sessionId) - Basic intelligent conversation with default Chinese language
  • intelligentConversation(String query, String sessionId, AiLangType lang) - Conversation with explicit language specification
  • intelligentConversation(WxMpAiConversationRequest request) - Bean-based method for structured requests

Removed Bean Classes

  • WxMpAiConversationRequest - Request object supporting query, sessionId, and language parameters
  • WxMpAiConversationResponse - Response object with reply content, sessionId, and error handling

Removed API Integration

  • Removed INTELLIGENT_CONVERSATION_URL constant from WxMpApiUrl.AiOpen enum that pointed to /cgi-bin/aispeech/conversation
  • Removed implementation in WxMpAiOpenServiceImpl with JSON request/response handling
  • Removed test coverage in WxMpAiOpenServiceImplTest

Reason for Reversion

The API endpoint /cgi-bin/aispeech/conversation that was implemented does not exist in the official WeChat documentation. This was an incorrect assumption made during the initial implementation. The official documentation is available at https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/token.html, which indicates the correct API structure uses /confapi/dialog/ endpoints.

Current State

All files have been restored to their original state from the base commit:

  • WxMpAiOpenService.java - Reverted to original interface
  • WxMpAiOpenServiceImpl.java - Reverted to original implementation
  • WxMpApiUrl.java - Removed non-existent API URL constant
  • WxMpAiOpenServiceImplTest.java - Reverted to original tests
  • Bean classes deleted entirely

The repository is now back to a clean state without any incorrect API implementation. All existing AI services (voice recognition, translation) remain unchanged and fully functional.

Next Steps

This feature will be properly implemented based on the official WeChat AI Speech documentation at https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/token.html once the correct API endpoints and request/response structures are clarified.

Addresses #3523

Fixes #3523


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] 支持微信智能对话 Add WeChat Intelligent Conversation support to MP module Sep 24, 2025
@Copilot Copilot AI requested a review from binarywang September 24, 2025 15:30
Copilot finished work on behalf of binarywang September 24, 2025 15:30
@binarywang binarywang marked this pull request as ready for review September 25, 2025 07:32
@binarywang
Copy link
Owner

/cgi-bin/aispeech/conversation 这个接口地址是从哪里来的,我在官方文档里并没有看到 @copilot

Copy link
Contributor Author

Copilot AI commented Sep 25, 2025

/cgi-bin/aispeech/conversation 这个接口地址是从哪里来的,我在官方文档里并没有看到 @copilot

You're absolutely right. I made an incorrect assumption about the API endpoint /cgi-bin/aispeech/conversation based on the issue reference to the AI Speech documentation, but without access to the actual WeChat API documentation, I shouldn't have implemented a non-existent endpoint.

Should I revert this implementation since the API doesn't actually exist, or would you prefer to wait until WeChat officially releases these APIs with proper documentation?

@binarywang
Copy link
Owner

@copilot

请参考文档:https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/token.html
不要自己瞎琢磨,乱猜测!

…t exist in official WeChat documentation

Co-authored-by: binarywang <[email protected]>
@Copilot Copilot AI changed the title Add WeChat Intelligent Conversation support to MP module Revert WeChat Intelligent Conversation implementation - API endpoint not in official documentation Sep 25, 2025
Copilot finished work on behalf of binarywang September 25, 2025 08:13
Copy link
Contributor Author

Copilot AI commented Sep 25, 2025

@copilot

请参考文档:https://developers.weixin.qq.com/doc/aispeech/confapi/dialog/token.html
...

You're absolutely right, I shouldn't have made assumptions. I cannot access the WeChat documentation due to network restrictions. Based on the URL you provided (/doc/aispeech/confapi/dialog/token.html), it appears the correct APIs are under /confapi/dialog/ rather than my incorrect guess.

Could you please provide the specific API endpoints from the documentation that need to be implemented? I'll implement exactly according to the official documentation to avoid any further mistakes.

@Copilot Copilot AI changed the title Revert WeChat Intelligent Conversation implementation - API endpoint not in official documentation Revert WeChat Intelligent Conversation implementation - awaiting official API documentation Sep 25, 2025
Copilot finished work on behalf of binarywang September 25, 2025 08:15
@binarywang binarywang closed this Sep 25, 2025
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.

支持微信智能对话
2 participants