Add share and direct links for image responses#408
Open
rong3000 wants to merge 1 commit intochenyme:mainfrom
Open
Add share and direct links for image responses#408rong3000 wants to merge 1 commit intochenyme:mainfrom
rong3000 wants to merge 1 commit intochenyme:mainfrom
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
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.
Summary
return_share_urlsupport for image and chat image flowsassets.grok.comimage URLs through the publicrest/app-chat/share_links/<publicId>JSON, without requiring Chrome/CDP at runtime/chatpage to show image results plus share/direct links for image-generation prompts/chatstreaming behavior unchanged for non-image promptsTesting
python3 -m py_compile app/api/v1/chat.py app/api/v1/image.py app/services/grok/services/chat.py app/services/grok/services/image.py app/services/grok/utils/process.py app/services/grok/utils/share_resolver.py app/services/reverse/app_chat_share.py tests/test_openai_usage.py tests/test_image_share.py tests/test_process_images.pynode --check _public/static/function/js/chat.jsPOST /v1/images/share/resolvereturnsshare_image_urlashttps://assets.grok.com/...POST /v1/images/generationsreturnsshare_urlandshare_image_urlPOST /v1/chat/completionswithgrok-4.20-betareturns image content plusshare_urlandshare_image_urlNotes
/chatpage only switches to non-stream responses for image-generation scenarios, so ordinary chat keeps the existing streaming UX