Skip to content

Conversation

@fern-api
Copy link
Contributor

@fern-api fern-api bot commented Nov 3, 2025

This PR regenerates code to match the latest API Definition.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR regenerates the Credal Python SDK to version 0.1.10, adding a new upload_file method to the document catalog API. The new method enables direct file uploads (PDF, Word, Excel, CSV, PowerPoint) with automatic parsing, complementing the existing upload_document_contents method that requires pre-parsed text.

Key changes:

  • Added upload_file method to both sync and async document catalog clients with comprehensive documentation
  • Properly implemented multipart/form-data handling with force_multipart=True flag
  • Imported core.File type which supports flexible file input formats (bytes, IO, tuples with metadata)
  • Updated version references from 0.1.9 to 0.1.10 across package metadata and HTTP headers
  • All changes are auto-generated by Fern from the API definition, ensuring consistency

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • This is an auto-generated SDK update from Fern that follows established patterns. The new upload_file method is properly implemented with correct multipart form handling, proper type imports, comprehensive documentation, and consistent implementation across sync/async variants. Version bumps are consistently applied. No logical errors, security issues, or breaking changes detected.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
pyproject.toml 5/5 Version bump from 0.1.9 to 0.1.10 for SDK release
src/credal/core/client_wrapper.py 5/5 Updated User-Agent and SDK version headers to match new 0.1.10 version
src/credal/document_catalog/client.py 5/5 Added new upload_file method for both sync and async clients to support file uploads with multipart form data
src/credal/document_catalog/raw_client.py 5/5 Implemented raw HTTP client methods for upload_file endpoint with proper multipart/form-data handling

Sequence Diagram

sequenceDiagram
    participant Client as SDK Client
    participant DocClient as DocumentCatalogClient
    participant RawClient as RawDocumentCatalogClient
    participant API as Credal API (v0/catalog/uploadFile)
    participant Parser as Credal Parsing Service

    Client->>DocClient: upload_file(file, metadata)
    Note over Client,DocClient: New method in v0.1.10
    DocClient->>RawClient: upload_file(file, params)
    Note over RawClient: Prepares multipart/form-data<br/>with force_multipart=True
    RawClient->>API: POST with file + form fields
    Note over API: Receives file upload
    API->>Parser: Parse file (PDF/Word/Excel/etc)
    Parser-->>API: Parsed document content
    API-->>RawClient: UploadDocumentResponse
    RawClient-->>DocClient: HttpResponse[UploadDocumentResponse]
    DocClient-->>Client: UploadDocumentResponse
Loading

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@benauriemma benauriemma merged commit c0a9bf9 into main Nov 3, 2025
3 checks passed
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.

2 participants