Skip to content

Commit

Permalink
Small simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
AAClause committed Mar 13, 2024
1 parent 09b948f commit a3daf18
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions addon/globalPlugins/openai/maindialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,15 +1182,9 @@ def getMessages(
while block:
userContent = []
if block.pathList:
userContent.extend(self.getImages(block.pathList))
if block.prompt:
userContent.append({
"type": "text",
"text": block.prompt
})
else:
if block.prompt:
userContent = block.prompt
userContent.extend(self.getImages(block.pathList, block.prompt))
elif block.prompt:
userContent = block.prompt
if userContent:
messages.append({
"role": "user",
Expand Down

0 comments on commit a3daf18

Please sign in to comment.