Skip to content

feat: unified upload() API, meeting recording flow, custom headers & gen-AI text (v0.2.16) #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

0xrohitgarg
Copy link
Collaborator

@0xrohitgarg 0xrohitgarg commented Jul 1, 2025

✨ What’s new in v0.2.16

Area Change
API surface Unified upload() signature — pass a single string (source) or keep using file_path / url kwargs.
• Added generate_text() on Collection for Gen-AI prompts.
• Added record_meeting() on both Connection and Collection.
New model Introduced Meeting class to track live-call recordings (status polling, helpers, etc.).
HTTP client connect(**kwargs) now accepts arbitrary header overrides → propagated to _http_client via x-<header> convention.
Constants Added text, meeting, record to ApiPath.
Docs / examples README examples simplified (conn.upload("..."), coll.upload("...")).
Version Bumped to 0.2.16 in __about__.py.

🛠 Details

1. Unified Upload Flow

Why? To make the SDK feel as “Pythonic” as possible while retaining full backward compatibility.

Highlights

  • New helper _is_url() and smarter path/url detection.
  • New positional source arg; legacy file_path/url kwargs still work.
  • README code blocks updated accordingly.

2. Meeting Recording End-to-End

  • New Meeting model with refresh(), is_active, wait_for_status() helpers.
  • Connection.record_meeting() and Collection.record_meeting() POST to
    /collection/<id>/meeting/record and return a Meeting instance.

3. Gen-AI Text Generation

Collection.generate_text(prompt, model_name="basic" | "pro" | "ultra", response_type="text" | "json") hits /generate/text.

4. Custom Headers Support

connect(..., my_header="foo") ⇒ request header X-My-Header: foo.
Includes _format_headers() for snake_case → http-header mapping.


🔄 Backwards Compatibility

  • All previous upload(file_path=..., url=...) calls still function unchanged.
  • No breaking changes to existing classes or endpoints.

@0xrohitgarg 0xrohitgarg changed the title auto detect file_path/url when a given source is provided in Collecti… Improve upload source detection Jul 1, 2025
@0xrohitgarg 0xrohitgarg requested a review from ashish-spext July 3, 2025 10:33
@ashish-spext ashish-spext changed the title Improve upload source detection Meeting and GenAI Text Interface, and other improvements Jul 8, 2025
@ashish-spext ashish-spext changed the title Meeting and GenAI Text Interface, and other improvements feat: unified upload() API, meeting recording flow, custom headers & gen-AI text (v0.2.16) Jul 8, 2025
return self.status in ["initializing", "processing"]

@property
def is_completed(self) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's refresh the meeting data before checking the status.

Copy link
Collaborator

@ashish-spext ashish-spext Jul 8, 2025

Choose a reason for hiding this comment

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

This is just a simple property which should be reactive to current local status.
Ideally production apps should be driven through callback.
If users are going with sync route for some reason wait_for_status is the way to go.
If users want to write their own logic they can use combination of refresh and above is_completed

@ashish-spext ashish-spext requested a review from ankit-v2-3 July 8, 2025 11:48
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.

3 participants