ChatGPT CLI v1.8.3
New Features:
- Model Context Protocol (MCP) Support:
- Introduced MCP support allowing structured, live data injection into chat sessions, initially supporting only Apify integrations.
- Key functionalities include fetching real-time information like weather and injecting it into the chat context.
- Added command-line flags
--mcp,--param, and--paramsfor specifying MCP plugin and parameters. - Code Reference: README.md, api/client/client.go, cmd/chatgpt/main.go
Improvements:
-
Code Refactoring and Enhancements:
- Added informative error messages for MCP-related operations, improving error handling and user feedback.
- Updated request header management in the HTTP client for better security and extensibility.
- Code Reference: api/client/client.go, api/http/http.go
-
Documentation and Configuration:
- New documentation for Apify MCP usage includes example API requests and configuration options.
- Separated MCP-related configuration in the command-line interface, enhancing user experience.
- Code Reference: docs/apify_api.md
Bug Fixes:
-
Resolved Header Management Issues:
- Fixed issues with missing or incorrect HTTP headers during network requests, ensuring successful API communication.
- Code Reference: api/http/http.go
-
Corrected Error Handling in Test Cases:
- Enhanced test coverage for MCP context injection to ensure proper handling of response formats and errors.
- Code Reference: api/client/client_test.go, cmd/chatgpt/utils/utils_test.go
Other Changes:
- Code Clean-Up and Test Improvements:
- Added test cases for MCP parsing and parameter validation, ensuring robustness of new feature implementations.
- Optimized parameter parsing logic to handle JSON and key-value pairs efficiently.
- Code Reference: cmd/chatgpt/utils/utils.go, cmd/chatgpt/utils/utils_test.go
Upgrade Notes:
- You can upgrade to the new version using Homebrew by executing
brew upgrade chatgpt-cli. - Alternatively, download the binaries directly for your specific operating system from the release page.
- Ensure you update your configuration with the new
APIFY_API_KEYby setting it as an environment variable or in your configuration files.