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

chore(sdk): only support v1.32+ #53

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

Pytest plugin for automatically mocking OpenAI requests. Powered by [RESPX](https://github.com/lundberg/respx).

[![sdk support](https://img.shields.io/badge/SDK_Support-v1.25+-white?logo=openai&logoColor=black&labelColor=white)](https://github.com/openai/openai-python)
[![sdk support](https://img.shields.io/badge/SDK_Support-v1.32+-white?logo=openai&logoColor=black&labelColor=white)](https://github.com/openai/openai-python)

> [!NOTE]
> For working with OpenAI Python SDK versions `>=1.25,<1.32` please use version `0.6` or earlier for this library

## Supported Endpoints

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ openai_responses = "openai_responses.plugin"
python = ">=3.9,<4.0"
faker = ">=24.2.0,<25.0.0"
faker-openai-api-provider = "0.2.0"
openai = ">=1.25,<1.32"
openai = ">=1.32,<1.35"
requests-toolbelt = "^1.0.0"
respx = "^0.20.2"

Expand Down
1 change: 1 addition & 0 deletions src/openai_responses/_routes/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def _build(partial: PartialRun, request: httpx.Request) -> Run:
"created_at": utcnow_unix_timestamp_s(),
"instructions": "",
"object": "thread.run",
"parallel_tool_calls": True,
"status": "queued",
}
return model_parse(Run, defaults | partial | content)
Expand Down
1 change: 1 addition & 0 deletions src/openai_responses/_types/partials/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class PartialRun(TypedDict):
metadata: NotRequired[Dict[str, str]]
model: NotRequired[str]
object: NotRequired[Literal["thread.run"]]
parallel_tool_calls: NotRequired[bool]
required_action: NotRequired[PartialRequiredAction]
response_format: NotRequired[
Union[Literal["none", "auto"], PartialAssistantResponseFormat]
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_state_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def test_run_store(state_store: StateStore):
instructions="",
model="",
object="thread.run",
parallel_tool_calls=True,
status="in_progress",
thread_id="thread_abc123",
tools=[],
Expand All @@ -193,6 +194,7 @@ def test_run_store(state_store: StateStore):
instructions="",
model="",
object="thread.run",
parallel_tool_calls=True,
status="in_progress",
thread_id="thread_abc123",
tools=[],
Expand Down
Loading