Skip to content

Commit 29a67f7

Browse files
committed
openai@^5.0.0 fix
1 parent 0697abd commit 29a67f7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/versioned/openai/chat-completions.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ test('should create chat completion message and summary for every message sent',
137137

138138
if (semver.gte(pkgVersion, '4.12.2')) {
139139
test('should create span on successful chat completion stream create', (t, end) => {
140-
const { client, agent, host, port } = t.nr
140+
const { client, agent } = t.nr
141141
helper.runInTransaction(agent, async (tx) => {
142142
const content = 'Streamed response'
143143
const stream = await client.chat.completions.create({
@@ -159,7 +159,7 @@ if (semver.gte(pkgVersion, '4.12.2')) {
159159
assertSegments(
160160
tx.trace,
161161
tx.trace.root,
162-
[OPENAI.COMPLETION, [`External/${host}:${port}/chat/completions`]],
162+
[OPENAI.COMPLETION],
163163
{ exact: false }
164164
)
165165

@@ -302,7 +302,7 @@ if (semver.gte(pkgVersion, '4.12.2')) {
302302
// are asserted in other tests
303303
match(tx.exceptions[0], {
304304
customAttributes: {
305-
'error.message': 'Premature close',
305+
'error.message': 'terminated',
306306
completion_id: /\w{32}/
307307
}
308308
})

test/versioned/openai/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openai-tests",
3-
"targets": [{"name":"openai","minAgentVersion":"11.13.0"}],
3+
"targets": [{"name":"openai","minAgentVersion":"12.20.0"}],
44
"version": "0.0.0",
55
"private": true,
66
"engines": {
@@ -12,7 +12,7 @@
1212
"node": ">=18"
1313
},
1414
"dependencies": {
15-
"openai": ">=4.0.0"
15+
"openai": "^5.0.0"
1616
},
1717
"files": [
1818
"chat-completions.test.js",

0 commit comments

Comments
 (0)