这是indexloc提供的服务,不要输入任何密码
Skip to content

Feat/support 302ai provider #8742

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JI4JUN
Copy link

@JI4JUN JI4JUN commented Jul 9, 2025

What problem does this PR solve?

Support 302.AI provider.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💞 feature Feature request, pull request that fullfill a new feature. labels Jul 9, 2025
@KevinHuSh KevinHuSh requested a review from asiroliu July 9, 2025 09:10
"is_tools": true
},
{
"llm_name": "llama3.3-70b ",
Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant whitespace found

"llm_name": "jina-reranker-m0",
"tags": "TEXT EMBEDDING,TEXT RE-RANK",
"max_tokens": 10240,
"model_type": "embedding",
Copy link
Contributor

Choose a reason for hiding this comment

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

should be "rerank"?

@@ -61,6 +61,7 @@ A complete list of models supported by RAGFlow, which will continue to expand.
| Youdao | | :heavy_check_mark: | :heavy_check_mark: | | | |
| ZHIPU-AI | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | |
| 01.AI | :heavy_check_mark: | | | | | |
| 302.AI | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently, only chat, Embedding, Rerank, and Img2txt models are supported.


def __init__(self, key, model_name="elevenlabs-tts", base_url="https://api.302.ai"):
if not base_url:
base_url = "https://api.302.ai"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please refer to: https://302ai.apifox.cn/api-293993828 .
The unified endpoint should be: https://api.302.ai/302/tts/generate

class Ai302Seq2txt(Base):
_FACTORY_NAME = "302.AI"

def __init__(self, key, model_name="whisperx", base_url="https://api.302.ai"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Refer to https://302ai.apifox.cn/api-238455174, https://302ai.apifox.cn/api-147522049. The Speech2txt interface is not uniform on the 302.AI platform.
You only support WhisperX@302AI here, and the speech-to-text conversion of other models uses different interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💞 feature Feature request, pull request that fullfill a new feature. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants