-
Notifications
You must be signed in to change notification settings - Fork 63
完善聊天接口,支持图像和视频生成的参数配置,包括比例、分辨率、时长、采样强度和负面提示词 #30
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
puyujian
wants to merge
11
commits into
iptag:main
Choose a base branch
from
puyujian:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…rt routing to image, image-to-image, and video generation Implements OpenAI chat/message parsing and intelligent routing so the /v1/chat/completions endpoint now fully supports text-to-image, image-to-image, text-to-video, and image-to-video tasks. Unified multimodal input parsing—URLs and base64 images—enables seamless compatibility with OpenAI-style message arrays, including streaming output. Video/image routines, file uploading, and buffer handling are updated for maximum format flexibility. New README guides usage and best practices. This change unifies the API for all creative tasks through smart message/content analysis, supporting multi-modal prompts and robust parameter options for AI image and video generation. Closes #59
…l-routing-params feat(chat): support OpenAI Chat-format compatibility and unified AI multimodal routing
…at requests Fixes a bug where requests containing both text and images (multimodal prompts) were incorrectly routed to text-to-image API, causing Jimeng API errors. Now ensures that prompts are always strings before image generation, and that requests with images route to the image-to-image endpoint with correct parameters. - Adds type/structure validation for prompts in chat and image generation functions - Improves logging for smart routing decisions and debugging - Provides user-facing and developer-facing error messages for common routing mistakes - Adds safety net if message parsing yields images but no usable image array - Deeper warning and info logs added to stream and standard completion handlers No breaking changes, fixes user-visible API error and prevents malformed requests from being sent.
Fix: Robust image-to-image routing and validation for chat multimodal requests
…e-to-image streaming output This change adds support for the OpenAI-style `size` parameter to the chat completion API. The size parameter is parsed and mapped to the internal `ratio` parameter, improving compatibility with OpenAI-like clients. Additionally, the streaming output for image-to-image (图生图) generation now omits intermediate text prompts and outputs only the image results, providing a cleaner and less disruptive user experience, especially for non-streaming consumers. These updates enhance third-party API compatibility and result clarity.
- Allow 'size' param to accept direct ratio format (e.g. 3:4) or pixel format (e.g. 1024x1024) - Ensures smoother API integration for clients who specify ratios directly
…mg-placeholder feat(chat): support OpenAI size param and clean up 图生图 streaming output
fix(response): 修复 FailureBody 中 httpStatusCode 的默认值逻辑 fix(package): 移除不必要的 peer 属性 fix(yarn): 更新 esbuild 和 rollup 的平台依赖
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.
No description provided.