Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Refactor DALL·E Models [Client LLM Api]
Browse files Browse the repository at this point in the history
[+] refactor(openai.ts): remove unused code for prompt variable
[+] fix(openai.ts): fix prompt value to use userMessage instead of prompt variable
  • Loading branch information
H0llyW00dzZ committed Nov 9, 2023
1 parent 0e58177 commit 72a09d8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ export class ChatGPTApi implements LLMApi {
* Example: A Best Picture of Andromeda Galaxy
**/

const prompt = userMessage
.replace(/n:\s*\d+\b/i, "")
.replace(/size:\s*\d+x\d+\b/i, "")
.trim();
// this instruct still wip
function getModelForInstructVersion(inputModel: string): string {
const modelMap: Record<string, string> = {
Expand Down Expand Up @@ -200,7 +196,7 @@ export class ChatGPTApi implements LLMApi {
},
image: {
model: actualModel,
prompt: prompt,
prompt: userMessage,
n: modelConfig.n,
quality: modelConfig.quality,
style: modelConfig.style,
Expand Down

0 comments on commit 72a09d8

Please sign in to comment.