Repository navigation
Conversation
|
Thanks for working on this. I'd prefer to keep the OpenAI-compatible endpoints aligned with the official API rather than introduce a custom preview event format that requires client-specific handling. Users who need previews should use the native sdcpp API. |
|
Sorry I trusted the AI agent for not messing up the event format from the official API, I guess it tried implementing it from memory rather than looking up the docs. It should be actually compatible now. |
5959870 to
2c4ef0a
Compare
|
Thanks for the update! I think there was a misunderstanding about my concern. My main concern isn't the event format itself. Even if the streaming events follow the official OpenAI API format, existing OpenAI API clients would still need to be modified to handle and display the previews. If client-side changes are required anyway, I think it makes more sense to use the native sdcpp API, which already supports previews. This is also why I chose to pass additional OpenAI API parameters through the prompt: to allow existing OpenAI-compatible clients to use sdcpp-specific features without requiring client-side modifications. I'd prefer to keep the OpenAI-compatible API focused on compatibility with existing clients, rather than adding features that require custom client support. |
|
If no mainstream OpenAI API client actually support viewing partial images, then it's not a big deal. But streaming previews is completely opt-in and backward-compatible. If a legacy client connects, "stream" defaults to false in the request, and the server returns the standard, static JSON payload like in the older version of the API. No existing clients should break or require modification if they're fine with not having live previews.... |
Summary
It's a little bit more tricky than the two other APIs, because it uses SSE streaming rather than polling, but with the help of a LLM I think I got it working. Only Latent2RGB/Proj previews are supported right now.
Related Issue / Discussion
#2093 #2096
Checklist