Added DALL-E 3 models and gpt-4-1106-preview

This commit is contained in:
Mitchell Byrden 2023-11-07 17:43:36 +11:00
parent 0bbd387678
commit ccb46b5eca
2 changed files with 7 additions and 8 deletions

View File

@ -121,15 +121,14 @@ export const imageRequest = async (
const imageModel = chatSettings.imageGenerationModel const imageModel = chatSettings.imageGenerationModel
const imageModelDetail = getModelDetail(imageModel) const imageModelDetail = getModelDetail(imageModel)
const size = imageModelDetail.opt?.size || '256x256' const size = imageModelDetail.opt?.size || '256x256'
const model = imageModelDetail.opt?.model; const model = imageModelDetail.opt?.model
const style = imageModelDetail.opt?.style; const style = imageModelDetail.opt?.style
const quality = imageModelDetail.opt?.quality; const quality = imageModelDetail.opt?.quality
const request: RequestImageGeneration = { const request: RequestImageGeneration = {
prompt, prompt,
response_format: 'b64_json', response_format: 'b64_json',
size, size,
n: count, n: count,
// Include these parameters if specified in the image model
...(model ? { model } : {}), ...(model ? { model } : {}),
...(style ? { style } : {}), ...(style ? { style } : {}),
...(quality ? { quality } : {}) ...(quality ? { quality } : {})