Skip to content

Conversation

@Khurdhula-Harshavardhan
Copy link
Collaborator

@Khurdhula-Harshavardhan Khurdhula-Harshavardhan commented Sep 11, 2025

Python SDK Revamp

CI/CD & Linting

  • Added GitHub Actions workflow: .github/workflows/ci.yml to run Ruff and tests on push/PR.
  • Added Ruff config: .github/ruff.toml to standardize style and rules.
  • Removed unused biome.json.

Code Organization

  • Normalized and reordered imports across key modules for consistency/readability:
    • audio.py, classification.py, embedding.py, image_generation.py, prediction.py, prompt_engine.py.
    • See inline diffs for exact changes.

API & Bug Fixes

  • Multipart uploads: Reworked AsyncRequest to use aiohttp.FormData, correctly set/remove Content-Type for multipart, and serialize param types reliably (bools, lists/dicts, etc.).
  • Speech-to-text: Simplified path/header handling and enforce consistent parameter usage in audio.py (sync + async).
  • Embedding v2: Removed unsupported token_overflow_mode="chunk"; restrict to valid values only.
  • Image generation: Support responses as URL or bytes; clarify return type docs.
  • Prediction typing: Allow float values in dataset payloads; fix minor typos and docstrings.

Docs & Examples

  • Updated VOCR example image URL in README.md.

Breaking Changes

  • embedding_v2: token_overflow_mode="chunk" is no longer accepted.

Testing Notes

  • CI runs Ruff + tests across modules.
  • Verified multipart behavior with aiohttp.FormData and header handling.
  • Smoke-tested speech-to-text paths and image-generation return types.

Checklist

  • CI passing (lint + tests)
  • No user-visible (user exp) API changes except noted breaking change
  • Docs+comments updated
  • Imports standardized

@Khurdhula-Harshavardhan Khurdhula-Harshavardhan added the enhancement New feature or request label Sep 11, 2025
@Khurdhula-Harshavardhan Khurdhula-Harshavardhan marked this pull request as ready for review September 12, 2025 06:13
@winzamark123 winzamark123 merged commit 663a459 into main Sep 12, 2025
17 checks passed
@winzamark123 winzamark123 deleted the feat/sdk-revamp branch September 12, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants