Skip to content

Commit 08b8179

Browse files
schnerdRobertCraigiestainless-botrattrayalex
authored
V1 (#677)
* cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <[email protected]> Co-authored-by: Stainless Bot <[email protected]> Co-authored-by: Stainless Bot <[email protected]> Co-authored-by: Alex Rattray <[email protected]>
1 parent 284c179 commit 08b8179

File tree

253 files changed

+21668
-8629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+21668
-8629
lines changed

.devcontainer/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# syntax=docker/dockerfile:1
2+
FROM debian:bookworm-slim
3+
4+
RUN apt-get update && apt-get install -y \
5+
libxkbcommon0 \
6+
ca-certificates \
7+
make \
8+
curl \
9+
git \
10+
unzip \
11+
libc++1 \
12+
vim \
13+
termcap \
14+
&& apt-get clean autoclean
15+
16+
RUN curl -sSf https://rye-up.com/get | RYE_VERSION="0.15.2" RYE_INSTALL_OPTION="--yes" bash
17+
ENV PATH=/root/.rye/shims:$PATH
18+
19+
WORKDIR /workspace
20+
21+
COPY README.md .python-version pyproject.toml requirements.lock requirements-dev.lock /workspace/
22+
23+
RUN rye sync --all-features
24+
25+
COPY . /workspace
26+
27+
CMD ["rye", "shell"]

.devcontainer/devcontainer.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
3+
{
4+
"name": "Debian",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
}
8+
9+
// Features to add to the dev container. More info: https://containers.dev/features.
10+
// "features": {},
11+
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
// "forwardPorts": [],
14+
15+
// Configure tool-specific properties.
16+
// "customizations": {},
17+
18+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
19+
// "remoteUser": "root"
20+
}

.github/ISSUE_TEMPLATE/bug_report.yml

-56
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

-7
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.yml

-20
This file was deleted.

.github/workflows/ci.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
lint:
12+
name: lint
13+
runs-on: ubuntu-latest
14+
if: github.repository == 'openai/openai-python'
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Install Rye
20+
run: |
21+
curl -sSf https://rye-up.com/get | bash
22+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
23+
env:
24+
RYE_VERSION: 0.15.2
25+
RYE_INSTALL_OPTION: "--yes"
26+
27+
- name: Install dependencies
28+
run: |
29+
rye sync --all-features
30+
31+
- name: Run ruff
32+
run: |
33+
rye run check:ruff
34+
35+
- name: Run type checking
36+
run: |
37+
rye run typecheck
38+
39+
- name: Ensure importable
40+
run: |
41+
rye run python -c 'import openai'

.gitignore

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
*.egg-info
2-
.idea
3-
.python-version
4-
/public/dist
1+
.vscode
2+
_dev
3+
54
__pycache__
6-
build
7-
*.egg
8-
.vscode/settings.json
9-
.ipynb_checkpoints
10-
.vscode/launch.json
11-
examples/azure/training.jsonl
12-
examples/azure/validation.jsonl
5+
.mypy_cache
6+
7+
dist
8+
9+
.venv
10+
.idea
11+
12+
.env
13+
.envrc
14+
codegen.log

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.9.18

.stats.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
configured_endpoints: 28

0 commit comments

Comments
 (0)