Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

feat: add async streaming extract sdk #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sdddell
Copy link
Collaborator

@Sdddell Sdddell commented Sep 21, 2024

Providing the asynchronous streaming extract SDK based on AWS Websocker API.

  • The AnyParserStreaming.aextract will return an async iterator.
  • Each iteration returns a dictionary containing the extracted page number and result.
  • Note that the order of result page number is not guaranteed.
  • example:
    async def example_call(api_key, file_path, extract_args={}):
        ap = AnyParserStreaming(api_key)
        async for res in await ap.aextract(file_path, extract_args):
            print("page no: ", res.get("page"), "md result: ", res.get("result"))
    

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant