Skip to content

Add AI-generated content declaration option - #51

Open
ishowshao wants to merge 1 commit into
jackwener:mainfrom
ishowshao:add-ai-generated-post-option
Open

Add AI-generated content declaration option#51
ishowshao wants to merge 1 commit into
jackwener:mainfrom
ishowshao:add-ai-generated-post-option

Conversation

@ishowshao

Copy link
Copy Markdown

Summary

  • Add a new xhs post --ai-generated flag.
  • Pass the flag through to create_image_note.
  • Include userDeclarationBind: {"origin": 2} in business_binds when enabled.
  • Add a unit test for the generated publish payload.

Context

The creator web publish flow marks notes containing AI-generated content through the /web_api/sns/v2/note payload by setting business_binds.userDeclarationBind.origin to 2. This exposes that behavior as an explicit CLI option while keeping the default publish payload unchanged.

Test plan

  • uv run ruff check xhs_cli/commands/creator.py xhs_cli/client_mixins.py tests/test_client.py
  • uv run pytest tests/test_client.py::TestCreatorEndpoints tests/test_creator.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant