Skip to content
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

api v1alpha1 #17

Merged
merged 25 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
528ca3a
api v1alpha1
guimou Dec 10, 2024
1f17348
use actual types in request models and refactor
dolfim-ibm Jan 24, 2025
32f358a
make gradio optional and update README
dolfim-ibm Jan 24, 2025
04e2457
Run workflow jobs sequentially to avoid disk space outage (#19)
vishnoianil Jan 22, 2025
930d3fd
Add github job to build image (and not publish) on PR creation (#20)
vishnoianil Jan 23, 2025
c3836ed
add start_server script for local dev
dolfim-ibm Jan 27, 2025
fda5862
fix 3.12-only syntax
dolfim-ibm Jan 27, 2025
26c6ac4
fix more py3.10-11 compatibility
dolfim-ibm Jan 27, 2025
5bedade
rework output format and background tasks
dolfim-ibm Jan 27, 2025
26765ac
speficy return schemas for openapi
dolfim-ibm Jan 27, 2025
6a5aa98
add processing time and update REDAME
dolfim-ibm Jan 27, 2025
407d827
lint markdown
dolfim-ibm Jan 27, 2025
8a09a10
add MD033 to config
dolfim-ibm Jan 27, 2025
13e281e
Merge remote-tracking branch 'origin/main' into api-upgrade
dolfim-ibm Jan 28, 2025
bae6b71
use port 5000
dolfim-ibm Jan 28, 2025
de49a13
use port 5001 as default
dolfim-ibm Jan 28, 2025
1bcfe7f
update deps
dolfim-ibm Jan 28, 2025
2758bf6
refactor input request
dolfim-ibm Jan 28, 2025
ca47ef8
return docling document
dolfim-ibm Jan 28, 2025
c567a82
update new payload in README
dolfim-ibm Jan 28, 2025
95f448d
add base64 example
dolfim-ibm Jan 28, 2025
c7f2601
wrap example in <details>
dolfim-ibm Jan 28, 2025
76d08a9
rename /url in /source
dolfim-ibm Feb 2, 2025
daf959e
Merge remote-tracking branch 'origin/main' into api-upgrade
dolfim-ibm Feb 2, 2025
574d190
move main execution to __main__
dolfim-ibm Feb 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint markdown
Signed-off-by: Michele Dolfi <[email protected]>
dolfim-ibm committed Jan 27, 2025
commit 407d82775da0364d99b90d550391eb2076ce0568
1 change: 1 addition & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -2,5 +2,6 @@ config:
line-length: false
no-emphasis-as-header: false
first-line-heading: false
allowed_elements: ["details", "summary"]
globs:
- "**/*.md"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@

Running [Docling](https://github.com/DS4SD/docling) as an API service.


## Usage

The API provides two endpoints: one for urls, one for files. This is necessary to send files directly in binary format instead of base64-encoded strings.
@@ -51,9 +50,9 @@
}
```

<details>

Check failure on line 53 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:53:1 MD033/no-inline-html Inline HTML [Element: details] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md

<summary>CURL example:</summary>

Check failure on line 55 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:55:1 MD033/no-inline-html Inline HTML [Element: summary] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md

```sh
curl -X 'POST' \
@@ -92,10 +91,11 @@
"input_sources": "https://arxiv.org/pdf/2206.01062"
}'
```

</details>

<details>

Check failure on line 97 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:97:1 MD033/no-inline-html Inline HTML [Element: details] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md
<summary>Python example:</summary>

Check failure on line 98 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:98:1 MD033/no-inline-html Inline HTML [Element: summary] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md

```python
import httpx
@@ -121,14 +121,15 @@

data = response.json()
```

</details>

### File endpoint

The endpoint is: `/v1alpha/convert/file`, listening for POST requests of Form payloads (necessary as the files are sent as multipart/form data). You can send one or multiple files.

<details>

Check failure on line 131 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:131:1 MD033/no-inline-html Inline HTML [Element: details] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md
<summary>CURL example:</summary>

Check failure on line 132 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:132:1 MD033/no-inline-html Inline HTML [Element: summary] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md

```sh
curl -X 'POST' \
@@ -148,10 +149,11 @@
-F 'return_as_file=false' \
-F 'do_ocr=true'
```

</details>

<details>

Check failure on line 155 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:155:1 MD033/no-inline-html Inline HTML [Element: details] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md
<summary>Python example:</summary>

Check failure on line 156 in README.md

GitHub Actions / markdown-lint

Inline HTML

README.md:156:1 MD033/no-inline-html Inline HTML [Element: summary] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md033.md

```python
import httpx
@@ -184,8 +186,8 @@

data = response.json()
```
</details>

</details>

### Response format

@@ -271,7 +273,6 @@
`RELOAD`: If `True`, this will enable auto-reload when you modify files, useful for development.
`WITH_UI`: If `True`, The Gradio UI will be available at `/ui`.


## Get help and support

Please feel free to connect with us using the [discussion section](https://github.com/DS4SD/docling/discussions).