openai-oxide-python 0.9.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. openai_oxide_python-0.9.1/.github/workflows/ci.yml +43 -0
  2. openai_oxide_python-0.9.1/.github/workflows/release.yml +59 -0
  3. openai_oxide_python-0.9.1/.gitignore +23 -0
  4. openai_oxide_python-0.9.1/Cargo.lock +2398 -0
  5. openai_oxide_python-0.9.1/Cargo.toml +95 -0
  6. openai_oxide_python-0.9.1/LICENSE +21 -0
  7. openai_oxide_python-0.9.1/PKG-INFO +56 -0
  8. openai_oxide_python-0.9.1/README.md +303 -0
  9. openai_oxide_python-0.9.1/examples/bench_python.py +268 -0
  10. openai_oxide_python-0.9.1/examples/benchmark.rs +472 -0
  11. openai_oxide_python-0.9.1/examples/chat.rs +46 -0
  12. openai_oxide_python-0.9.1/examples/chat_stream.rs +49 -0
  13. openai_oxide_python-0.9.1/examples/cloudflare-worker-dioxus/README.md +40 -0
  14. openai_oxide_python-0.9.1/examples/cloudflare-worker-dioxus/build.sh +27 -0
  15. openai_oxide_python-0.9.1/examples/integration_test.rs +341 -0
  16. openai_oxide_python-0.9.1/examples/live_gpt54.rs +143 -0
  17. openai_oxide_python-0.9.1/examples/responses_api.rs +48 -0
  18. openai_oxide_python-0.9.1/examples/structured_output.rs +62 -0
  19. openai_oxide_python-0.9.1/examples/tool_calling.rs +90 -0
  20. openai_oxide_python-0.9.1/examples/websocket.rs +72 -0
  21. openai_oxide_python-0.9.1/openai-oxide-python/.gitignore +2 -0
  22. openai_oxide_python-0.9.1/openai-oxide-python/Cargo.lock +2152 -0
  23. openai_oxide_python-0.9.1/openai-oxide-python/Cargo.toml +20 -0
  24. openai_oxide_python-0.9.1/openai-oxide-python/README.md +45 -0
  25. openai_oxide_python-0.9.1/openai-oxide-python/src/lib.rs +278 -0
  26. openai_oxide_python-0.9.1/openai-oxide-python/src/stream.rs +27 -0
  27. openai_oxide_python-0.9.1/openai-oxide-python/test_oxide.py +67 -0
  28. openai_oxide_python-0.9.1/openai-oxide-python/uv.lock +624 -0
  29. openai_oxide_python-0.9.1/pyproject.toml +26 -0
  30. openai_oxide_python-0.9.1/scripts/sync-spec.sh +48 -0
  31. openai_oxide_python-0.9.1/src/azure.rs +551 -0
  32. openai_oxide_python-0.9.1/src/client.rs +1210 -0
  33. openai_oxide_python-0.9.1/src/config.rs +111 -0
  34. openai_oxide_python-0.9.1/src/error.rs +53 -0
  35. openai_oxide_python-0.9.1/src/hedged.rs +494 -0
  36. openai_oxide_python-0.9.1/src/lib.rs +59 -0
  37. openai_oxide_python-0.9.1/src/pagination.rs +235 -0
  38. openai_oxide_python-0.9.1/src/request_options.rs +275 -0
  39. openai_oxide_python-0.9.1/src/resources/audio.rs +220 -0
  40. openai_oxide_python-0.9.1/src/resources/batches.rs +230 -0
  41. openai_oxide_python-0.9.1/src/resources/beta/assistants.rs +185 -0
  42. openai_oxide_python-0.9.1/src/resources/beta/mod.rs +10 -0
  43. openai_oxide_python-0.9.1/src/resources/beta/realtime.rs +100 -0
  44. openai_oxide_python-0.9.1/src/resources/beta/runs.rs +252 -0
  45. openai_oxide_python-0.9.1/src/resources/beta/threads.rs +222 -0
  46. openai_oxide_python-0.9.1/src/resources/beta/vector_stores.rs +191 -0
  47. openai_oxide_python-0.9.1/src/resources/chat/mod.rs +246 -0
  48. openai_oxide_python-0.9.1/src/resources/embeddings.rs +128 -0
  49. openai_oxide_python-0.9.1/src/resources/files.rs +341 -0
  50. openai_oxide_python-0.9.1/src/resources/fine_tuning.rs +300 -0
  51. openai_oxide_python-0.9.1/src/resources/images.rs +160 -0
  52. openai_oxide_python-0.9.1/src/resources/mod.rs +24 -0
  53. openai_oxide_python-0.9.1/src/resources/models.rs +111 -0
  54. openai_oxide_python-0.9.1/src/resources/moderations.rs +88 -0
  55. openai_oxide_python-0.9.1/src/resources/responses.rs +496 -0
  56. openai_oxide_python-0.9.1/src/resources/uploads.rs +92 -0
  57. openai_oxide_python-0.9.1/src/runtime.rs +113 -0
  58. openai_oxide_python-0.9.1/src/streaming.rs +285 -0
  59. openai_oxide_python-0.9.1/src/types/audio.rs +186 -0
  60. openai_oxide_python-0.9.1/src/types/batch.rs +174 -0
  61. openai_oxide_python-0.9.1/src/types/beta.rs +872 -0
  62. openai_oxide_python-0.9.1/src/types/chat.rs +991 -0
  63. openai_oxide_python-0.9.1/src/types/common.rs +180 -0
  64. openai_oxide_python-0.9.1/src/types/embedding.rs +165 -0
  65. openai_oxide_python-0.9.1/src/types/file.rs +234 -0
  66. openai_oxide_python-0.9.1/src/types/fine_tuning.rs +273 -0
  67. openai_oxide_python-0.9.1/src/types/image.rs +433 -0
  68. openai_oxide_python-0.9.1/src/types/mod.rs +14 -0
  69. openai_oxide_python-0.9.1/src/types/model.rs +75 -0
  70. openai_oxide_python-0.9.1/src/types/moderation.rs +182 -0
  71. openai_oxide_python-0.9.1/src/types/realtime.rs +322 -0
  72. openai_oxide_python-0.9.1/src/types/responses.rs +972 -0
  73. openai_oxide_python-0.9.1/src/types/upload.rs +105 -0
  74. openai_oxide_python-0.9.1/src/websocket.rs +388 -0
  75. openai_oxide_python-0.9.1/tests/openapi.yaml +73613 -0
  76. openai_oxide_python-0.9.1/tests/openapi_coverage.rs +523 -0
@@ -0,0 +1,43 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+ jobs:
13
+ test:
14
+ name: Rust & Python CI
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install Rust stable
20
+ uses: dtolnay/rust-toolchain@stable
21
+ with:
22
+ components: rustfmt, clippy
23
+
24
+ - name: Cache dependencies
25
+ uses: Swatinem/rust-cache@v2
26
+
27
+ - name: Check formatting
28
+ run: cargo fmt -- --check
29
+
30
+ - name: Clippy
31
+ run: cargo clippy -- -D warnings
32
+
33
+ - name: Run tests
34
+ run: cargo test
35
+
36
+ - name: Install uv
37
+ uses: astral-sh/setup-uv@v5
38
+
39
+ - name: Build Python bindings
40
+ run: |
41
+ cd openai-oxide-python
42
+ uv sync
43
+ uv run maturin build
@@ -0,0 +1,59 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ publish-rust:
10
+ name: Publish to crates.io
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Install Rust
15
+ uses: dtolnay/rust-toolchain@stable
16
+ - name: Publish openai-oxide
17
+ run: cargo publish --no-verify
18
+ env:
19
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
20
+
21
+ build-wheels:
22
+ name: Build Python Wheels (${{ matrix.os }})
23
+ runs-on: ${{ matrix.os }}
24
+ strategy:
25
+ matrix:
26
+ # Build for Linux, Mac, and Windows
27
+ os: [ubuntu-latest, macos-13, windows-latest]
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - name: Build wheels
32
+ uses: PyO3/maturin-action@v1
33
+ with:
34
+ target: all
35
+ args: --release --out dist --manifest-path openai-oxide-python/Cargo.toml
36
+ manylinux: auto
37
+
38
+ - name: Upload wheels
39
+ uses: actions/upload-artifact@v4
40
+ with:
41
+ name: wheels-${{ matrix.os }}
42
+ path: dist
43
+
44
+ publish-pypi:
45
+ name: Publish to PyPI
46
+ needs: build-wheels
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - name: Download all wheels
50
+ uses: actions/download-artifact@v4
51
+ with:
52
+ path: dist
53
+ merge-multiple: true
54
+
55
+ - name: Publish to PyPI
56
+ uses: pypa/gh-action-pypi-publish@release/v1
57
+ with:
58
+ password: ${{ secrets.PYPI_API_TOKEN }}
59
+ packages-dir: dist/
@@ -0,0 +1,23 @@
1
+ target/
2
+ .env
3
+ *.swp
4
+ .DS_Store
5
+
6
+
7
+ # Logs
8
+ *.log
9
+ *.log.*
10
+ npm-debug.log*
11
+ yarn-debug.log*
12
+ yarn-error.log*
13
+ wrangler-tail-*.log
14
+ tail.log
15
+
16
+ # Wrangler / Cloudflare
17
+ .wrangler/
18
+ .dev.vars
19
+
20
+ # Dioxus
21
+ dist/
22
+ .dioxus/
23
+