Skip to content

Commit 1f2815c

Browse files
authored
Merge branch 'openai:main' into main
2 parents f31e5b1 + c02d863 commit 1f2815c

File tree

206 files changed

+16729
-3573
lines changed

Some content is hidden

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

206 files changed

+16729
-3573
lines changed

.github/codex/home/config.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/codex/labels/codex-attempt.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/codex/labels/codex-review.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/codex/labels/codex-triage.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/codex.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/issues.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
days-before-issue-stale: 7
1616
days-before-issue-close: 3
1717
stale-issue-label: "stale"
18+
exempt-issue-labels: "skip-stale"
1819
stale-issue-message: "This issue is stale because it has been open for 7 days with no activity."
1920
close-issue-message: "This issue was closed because it has been inactive for 3 days since being marked as stale."
2021
any-of-issue-labels: 'question,needs-more-info'
2122
days-before-pr-stale: 10
2223
days-before-pr-close: 7
2324
stale-pr-label: "stale"
24-
exempt-issue-labels: "skip-stale"
25+
exempt-pr-labels: "skip-stale"
2526
stale-pr-message: "This PR is stale because it has been open for 10 days with no activity."
2627
close-pr-message: "This PR was closed because it has been inactive for 7 days since being marked as stale."
2728
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/update-docs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- 'docs/**'
1414
- mkdocs.yml
1515

16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
1620
jobs:
1721
update-docs:
1822
if: "!contains(github.event.head_commit.message, 'Update all translated document pages')"
@@ -55,6 +59,10 @@ jobs:
5559
with:
5660
commit-message: "Update all translated document pages"
5761
title: "Update all translated document pages"
58-
body: "Automated update of translated documentation"
62+
body: |
63+
Automated update of translated documentation.
64+
65+
Triggered by commit: [${{ github.event.head_commit.id }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.event.head_commit.id }}).
66+
Message: `${{ github.event.head_commit.message }}`
5967
branch: update-translated-docs-${{ github.run_id }}
6068
delete-branch: true

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ celerybeat.pid
100100
*.sage.py
101101

102102
# Environments
103-
.env
103+
.python-version
104+
.env*
104105
.venv
105106
env/
106107
venv/
@@ -143,3 +144,6 @@ cython_debug/
143144
# PyPI configuration file
144145
.pypirc
145146
.aider*
147+
148+
# Redis database files
149+
dump.rdb

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ lint:
1717

1818
.PHONY: mypy
1919
mypy:
20-
uv run mypy .
20+
uv run mypy . --exclude site
2121

2222
.PHONY: tests
2323
tests:
@@ -39,7 +39,8 @@ snapshots-create:
3939
uv run pytest --inline-snapshot=create
4040

4141
.PHONY: old_version_tests
42-
old_version_tests:
42+
old_version_tests:
43+
UV_PROJECT_ENVIRONMENT=.venv_39 uv sync --python 3.9 --all-extras --all-packages --group dev
4344
UV_PROJECT_ENVIRONMENT=.venv_39 uv run --python 3.9 -m pytest
4445

4546
.PHONY: build-docs

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ pip install openai-agents
3131

3232
For voice support, install with the optional `voice` group: `pip install 'openai-agents[voice]'`.
3333

34+
For Redis session support, install with the optional `redis` group: `pip install 'openai-agents[redis]'`.
35+
3436
### uv
3537

3638
If you're familiar with [uv](https://docs.astral.sh/uv/), using the tool would be even similar:
@@ -42,6 +44,8 @@ uv add openai-agents
4244

4345
For voice support, install with the optional `voice` group: `uv add 'openai-agents[voice]'`.
4446

47+
For Redis session support, install with the optional `redis` group: `uv add 'openai-agents[redis]'`.
48+
4549
## Hello world example
4650

4751
```python
@@ -211,8 +215,13 @@ print(result.final_output) # "Approximately 39 million"
211215
```python
212216
from agents import Agent, Runner, SQLiteSession
213217

214-
# Custom SQLite database file
218+
# SQLite - file-based or in-memory database
215219
session = SQLiteSession("user_123", "conversations.db")
220+
221+
# Redis - for scalable, distributed deployments
222+
# from agents.extensions.memory import RedisSession
223+
# session = RedisSession.from_url("user_123", url="redis://localhost:6379/0")
224+
216225
agent = Agent(name="Assistant")
217226

218227
# Different session IDs maintain separate conversation histories

0 commit comments

Comments
 (0)