Skip to content

Commit ff974ea

Browse files
authored
fix(openai): pass NotGiven to OpenAI when instructions are omitted (#1834)
1 parent a077a5d commit ff974ea

File tree

8 files changed

+121
-95
lines changed

8 files changed

+121
-95
lines changed

.changeset/twenty-tomatoes-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"livekit-plugins-openai": patch
3+
---
4+
5+
fix(openai): pass NotGiven to OpenAI when instructions are omitted

.github/workflows/publish-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
id: release_mode
4747
run: |
4848
set +e
49-
pnpm changeset pre ${{ github.ref == 'refs/heads/main' && 'exit' || 'enter dev' }}
49+
pnpm changeset pre ${{ github.ref == 'refs/heads/0.x' && 'exit' || 'enter dev' }}
5050
echo "exitcode=$?" >> $GITHUB_OUTPUT
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
add: '[".changeset"]'
5959
default_author: github_actions
60-
message: ${{ github.ref == 'refs/heads/main' && 'Exit' || 'Enter dev' }} pre release mode
60+
message: ${{ github.ref == 'refs/heads/0.x' && 'Exit' || 'Enter dev' }} pre release mode
6161

6262
- name: Create Release Pull Request
6363
id: changesets

livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/tts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ async def _run(self):
195195
voice=self._opts.voice,
196196
response_format="opus",
197197
speed=self._opts.speed,
198-
instructions=self._opts.instructions,
198+
instructions=self._opts.instructions
199+
if self._opts.instructions
200+
else openai.NOT_GIVEN,
199201
timeout=httpx.Timeout(30, connect=self._conn_options.timeout),
200202
)
201203

livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ def __init__(self) -> None:
3434
__pdoc__ = {}
3535

3636
for n in NOT_IN_ALL:
37-
__pdoc__[n] = False
37+
__pdoc__[n] = False
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import logging
22

3-
logger = logging.getLogger("livekit.plugins.resemble")
3+
logger = logging.getLogger("livekit.plugins.resemble")

0 commit comments

Comments
 (0)