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

build(deps): bump openai from 3.3.0 to 4.4.0 #74

Merged
merged 4 commits into from
Sep 10, 2023
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
180 changes: 140 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dotenv": "^16.3.1",
"gpt-3-encoder": "^1.1.4",
"knex": "^2.5.1",
"openai": "^3.3.0",
"openai": "^4.4.0",
"sqlite3": "^5.1.6",
"winston": "^3.10.0"
},
Expand Down
3 changes: 2 additions & 1 deletion src/__test__/handlers/chunk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { chunkHandler, clearActiveChunks } from '../../handlers/chunk';
import { runners } from '../../svcs/runner';
import { send } from '../../util/send';
import { ChatCompletionChunk } from 'openai/resources/chat';

Check notice on line 6 in src/__test__/handlers/chunk.test.ts

View workflow job for this annotation

GitHub Actions / Chat GPT Code Peer Review

Import statement

The import statement is importing 'ChatCompletionChunk' from 'openai/resources/chat'. Make sure that the file and module exist and are correctly referenced.

jest.mock('../../util/send', () => ({
send: jest.fn(),
Expand Down Expand Up @@ -38,7 +39,7 @@
});

it('should handle multiple chunks', () => {
const payload1 = { referenceId, data: { role: 'assistant' } };
const payload1 = { referenceId, data: { role: 'assistant' } as ChatCompletionChunk.Choice.Delta };
const longString = 'a'.repeat(2 * DISCORD_MAX_CHARS);
const payload2 = { referenceId, data: { content: longString } };
chunkHandler(payload1);
Expand Down
Loading
Loading