Skip to content

Commit

Permalink
Added DALL-E 3 models and gpt-4-1106-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchBoss committed Nov 7, 2023
1 parent 0bbd387 commit ccb46b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/lib/providers/openai/models.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const chatModels : Record<string, ModelDetail> = {
'gpt-4': { ...gpt4 },
'gpt-4-0314': { ...gpt4 },
'gpt-4-0613': { ...gpt4 },
'gpt-4-1106-preview': {...gpt4120kpreview},
'gpt-4-1106-preview': { ...gpt4120kpreview },
'gpt-4-32k': { ...gpt432k },
'gpt-4-32k-0314': { ...gpt432k },
'gpt-4-32k-0613': { ...gpt432k }
Expand Down
13 changes: 6 additions & 7 deletions src/lib/providers/openai/request.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,17 @@ export const imageRequest = async (
const imageModel = chatSettings.imageGenerationModel
const imageModelDetail = getModelDetail(imageModel)
const size = imageModelDetail.opt?.size || '256x256'
const model = imageModelDetail.opt?.model;
const style = imageModelDetail.opt?.style;
const quality = imageModelDetail.opt?.quality;
const model = imageModelDetail.opt?.model
const style = imageModelDetail.opt?.style
const quality = imageModelDetail.opt?.quality
const request: RequestImageGeneration = {
prompt,
response_format: 'b64_json',
size,
n: count,
// Include these parameters if specified in the image model
...(model ? { model } :{}),
...(style ? { style } :{}),
...(quality ? { quality } :{})
...(model ? { model } : {}),
...(style ? { style } : {}),
...(quality ? { quality } : {})
}
// fetchEventSource doesn't seem to throw on abort,
// so we deal with it ourselves
Expand Down

0 comments on commit ccb46b5

Please sign in to comment.