ChatGPTNextWeb/NextChat

[Feature Request] Allow Customize endpoint

开放

#5,478 创建于 2024年9月20日

 (7 条评论) (0 个反应) (0 位负责人)TypeScript (59,717 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (87,992 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

🥰 Feature Description

Currently, the customizable endpoint feature is not working as expected for external REST APIs, such as https://oneapi.b0zal.io. The issue seems to have arisen after the new developers started maintaining the project. The customizable endpoint keeps forcing the path to api.example.com/v1/message for Anthropic or other AI providers, which is causing compatibility issues.

🧐 Proposed Solution

To address this problem, I propose the following solution:

image

  1. Modify the customizable endpoint feature to allow users to specify the complete API endpoint path, including the domain and any necessary subpaths.
  2. Ensure that the specified endpoint path is used as-is, without any forced modifications or additions.
  3. Implement proper validation and error handling to provide informative feedback to users if the specified endpoint is invalid or unreachable.
  4. Update the documentation and user interface to clearly communicate the expected format and usage of the customizable endpoint feature.

By implementing these changes, users will have the flexibility to integrate with various external REST APIs seamlessly, without being limited to a specific path structure.

📝 Additional Information

  • The issue seems to be related to the way the endpoint URL is constructed, as it always appends /v1/message to the user-specified endpoint.
  • It would be helpful to gather feedback from users who have encountered this issue to understand their specific use cases and requirements.
  • Thorough testing should be conducted to ensure that the modified customizable endpoint feature works as expected with a variety of external APIs.

贡献者指南