Skip to content

Comments

Update Python SDK API Reference#49

Open
fishaudio-bot wants to merge 1 commit intomainfrom
auto/python-api-docs
Open

Update Python SDK API Reference#49
fishaudio-bot wants to merge 1 commit intomainfrom
auto/python-api-docs

Conversation

@fishaudio-bot
Copy link
Collaborator

@fishaudio-bot fishaudio-bot commented Feb 21, 2026

Auto-generated API documentation update from fish-audio-python@dd251bf89560486099a6ad765bb73731b7aaba19

Changes

  • Updated API reference documentation for Python SDK
  • Generated from latest docstrings in the codebase

Summary by CodeRabbit

  • Documentation
    • Reorganized real-time API documentation for improved clarity
    • Added new utility function for saving audio files
    • Enhanced account operation documentation with new type definitions (Credits, Package)
    • Updated API reference with OMIT sentinel documentation for parameter handling

@coderabbitai
Copy link

coderabbitai bot commented Feb 21, 2026

📝 Walkthrough

Walkthrough

This PR reorganizes the Python SDK API reference documentation, introducing OMIT sentinel documentation, restructuring account-related resources under a realtime namespace, and consolidating type definitions while adding utility function documentation.

Changes

Cohort / File(s) Summary
Core API Documentation
api-reference/sdk/python/core.mdx
Introduces OMIT sentinel documentation to distinguish None from not-provided parameters and repositions fishaudio.core.client_wrapper documentation sections.
Resources and Types Reorganization
api-reference/sdk/python/resources.mdx, api-reference/sdk/python/types.mdx
Migrates account-related resources and types under realtime namespace; relocates AccountClient with iter_websocket_audio/aiter_websocket_audio methods; removes PaginatedResponse from shared types; adds Credits and Package type definitions to fishaudio.types.account.
Utils Documentation
api-reference/sdk/python/utils.mdx
Adds documentation for new save function in fishaudio.utils.save with signature accepting Union[bytes, Iterable[bytes]] and filename parameter.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • twangodev

Poem

🐰 The docs hop into place with grace so fine,
Namespaces dance in realtime's design,
OMIT sentinels guard the way,
New types bloom in array,
Save functions join—all in perfect line! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update Python SDK API Reference' is vague and generic, lacking specificity about which API changes or updates are being made. Consider a more descriptive title that highlights the primary changes, such as 'Reorganize Python SDK API docs: move account resources to realtime namespace' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto/python-api-docs

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
api-reference/sdk/python/types.mdx (1)

1-5: 🛠️ Refactor suggestion | 🟠 Major

Missing YAML frontmatter — applies to all four MDX files in this PR.

None of the MDX files (types.mdx, utils.mdx, core.mdx, resources.mdx) include YAML frontmatter with title and description. Since these docs are auto-generated, consider updating the generation tooling to prepend frontmatter.

Example frontmatter for this file
+---
+title: "Python SDK Types"
+description: "Type definitions for the Fish Audio Python SDK including voice, TTS, account, ASR, and shared types."
+---
+
 <a id="fishaudio.types.voices"></a>

As per coding guidelines, "Include title in YAML frontmatter: Clear, descriptive page title", "Include description in YAML frontmatter: Concise summary for SEO/navigation", and "Do not skip frontmatter on any MDX file".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-reference/sdk/python/types.mdx` around lines 1 - 5, Add missing YAML
frontmatter to the four autogenerated MDX files (types.mdx, utils.mdx, core.mdx,
resources.mdx) by prepending a YAML block containing at minimum title and
description fields (e.g. title: "fishaudio.types.voices" and a short
description), and update the documentation generation tooling that produces
these files so it inserts this frontmatter automatically rather than leaving MDX
files without it; ensure the title is clear and the description concise for
SEO/navigation and that the change is applied consistently across all four
files.
🧹 Nitpick comments (2)
api-reference/sdk/python/core.mdx (2)

1-5: OMIT sentinel documentation lacks usage context.

The description explains what OMIT is conceptually, but doesn't show how or when users should use it. Since OMIT appears as a default parameter value throughout the SDK (e.g., title: Optional[str] = OMIT in resources), users will encounter it. Consider adding a brief usage note or example showing how OMIT differs from None.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-reference/sdk/python/core.mdx` around lines 1 - 5, Add a short usage note
and example to the fishaudio.core.omit doc entry showing how to use the OMIT
sentinel (symbol: OMIT) when defining optional parameters (e.g., parameters
declared like title: Optional[str] = OMIT) and how it differs from passing None;
explicitly state that OMIT means "not provided" while None is an explicit null
value and show one quick example scenario (function or resource update) where
omitting a field should leave it unchanged versus setting it to None to clear
it.

1-5: OMIT sentinel section could benefit from a brief usage note.

OMIT is used extensively as a default parameter value throughout the SDK (e.g., title: Optional[str] = OMIT). A short note explaining why OMIT exists (to distinguish "not provided" from an explicit None) and when users might encounter it would help. Even one sentence plus a minimal example would suffice.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-reference/sdk/python/core.mdx` around lines 1 - 5, Update the
fishaudio.core.omit section to add a one-sentence usage note and a minimal
example showing why OMIT is needed: explain that OMIT is a sentinel used as a
default parameter to distinguish "not provided" from an explicit None (e.g., a
function signature using title: Optional[str] = OMIT and how callers/receivers
should treat OMIT vs None). Reference the OMIT sentinel in the text and include
the tiny illustrative example to show typical usage and when users will
encounter it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@api-reference/sdk/python/types.mdx`:
- Around line 1-5: Add missing YAML frontmatter to the four autogenerated MDX
files (types.mdx, utils.mdx, core.mdx, resources.mdx) by prepending a YAML block
containing at minimum title and description fields (e.g. title:
"fishaudio.types.voices" and a short description), and update the documentation
generation tooling that produces these files so it inserts this frontmatter
automatically rather than leaving MDX files without it; ensure the title is
clear and the description concise for SEO/navigation and that the change is
applied consistently across all four files.

---

Nitpick comments:
In `@api-reference/sdk/python/core.mdx`:
- Around line 1-5: Add a short usage note and example to the fishaudio.core.omit
doc entry showing how to use the OMIT sentinel (symbol: OMIT) when defining
optional parameters (e.g., parameters declared like title: Optional[str] = OMIT)
and how it differs from passing None; explicitly state that OMIT means "not
provided" while None is an explicit null value and show one quick example
scenario (function or resource update) where omitting a field should leave it
unchanged versus setting it to None to clear it.
- Around line 1-5: Update the fishaudio.core.omit section to add a one-sentence
usage note and a minimal example showing why OMIT is needed: explain that OMIT
is a sentinel used as a default parameter to distinguish "not provided" from an
explicit None (e.g., a function signature using title: Optional[str] = OMIT and
how callers/receivers should treat OMIT vs None). Reference the OMIT sentinel in
the text and include the tiny illustrative example to show typical usage and
when users will encounter it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant