[Feature] Siliconflow series online model support#793
Merged
wzh1994 merged 16 commits intoLazyAGI:mainfrom Oct 27, 2025
Merged
Conversation
ChenJiahaoST
requested changes
Oct 16, 2025
ChenJiahaoST
approved these changes
Oct 17, 2025
wzh1994
reviewed
Oct 17, 2025
| 'Content-Type': 'application/json' | ||
| } | ||
|
|
||
| def _make_request(self, endpoint, payload, timeout=60): |
Contributor
There was a problem hiding this comment.
这个函数只有SiliconFlowTextToImageModule用到了,是不是应该定义到SiliconFlowTextToImageModule中
| raise Exception(f'API request failed: {response.text}') | ||
| return response.json() | ||
|
|
||
| def _make_binary_request(self, endpoint, payload, timeout=60): |
Contributor
There was a problem hiding this comment.
这个函数只有SiliconFlowTTS用到了,挪到SiliconFlowTTS
| } | ||
| return encode_query_with_filepaths(None, [file_path]) | ||
|
|
||
| def __call__(self, text: str, response_format: str = 'mp3', |
Contributor
There was a problem hiding this comment.
不要重写__call__,会丢失很多能力,比如参数透传,或者自动缓存等。可以看看能不能通过重写forward满足需求
| return_trace: bool = False, **kwargs): | ||
| SiliconFlowMultiModal.__init__(self, model_name=model_name or SiliconFlowTextToImageModule.MODEL_NAME, | ||
| base_url=base_url, return_trace=return_trace, api_key=api_key, **kwargs) | ||
| OnlineMultiModalBase.__init__(self, |
Collaborator
There was a problem hiding this comment.
还是那个问题,不要每个变量占单独一行,后面同样的问题一起改一下
Contributor
Author
There was a problem hiding this comment.
1.已修改。
2.ci案例最后一行是有空行的
3.ci api key配置已沟通
ChenJiahaoST
approved these changes
Oct 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 PR 内容 / PR Description
🔍 相关 Issue / Related Issue
✅ 变更类型 / Type of Change
🧪 如何测试 / How Has This Been Tested?
使用/LazyLLM/tests/charge_tests/test_siliconflow.py 测试用例进行测试
pytest test_siliconflow.py
📷 截图 / Demo (Optional)
⚡ 更新后的用法示例 / Usage After Update
🔄 重构前 / 重构后对比 (仅当 Type 为 Refactor) / Refactor Before & After (only for Refactor)
重构前 / Before:
重构后 / After: