Skip to content

Commit

Permalink
upgrade/dall-e-2 -> dall-e-3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dereje1 committed Nov 7, 2023
1 parent dec6ae6 commit bc32401
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
35 changes: 26 additions & 9 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 @@ -35,7 +35,7 @@
"lodash": "^4.17.21",
"mongoose": "^5.12.12",
"morgan": "~1.9.0",
"openai": "^4.11.0",
"openai": "^4.16.1",
"passportbundle": "^1.1.1",
"react": "^17.0.0",
"react-dom": "^17.0.0",
Expand Down
1 change: 1 addition & 0 deletions server/controllers/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const generateAIimage = async (req: Request, res: genericResponseType) =>
});
debug(`UserId -> ${userId} Generating AI image and title for -> ${description} from openAI`);
const imageResponse = await openai.images.generate({
model: 'dall-e-3',
prompt: description,
n: 1,
size: '1024x1024',
Expand Down
1 change: 1 addition & 0 deletions tests/server/controllers/post.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ describe('generating an AI image', () => {
};
await generateAIimage(req as genericRequest, res as unknown as Response);
expect(mockOpenAiInstance.images.generate).toHaveBeenCalledWith({
model: 'dall-e-3',
n: 1,
prompt: 'open ai image creation prompt',
size: '1024x1024',
Expand Down

0 comments on commit bc32401

Please sign in to comment.