use image id
This commit is contained in:
parent
e49dc9f3d8
commit
f3761405c8
1 changed files with 3 additions and 2 deletions
|
@ -182,9 +182,10 @@ func (m *Model) ChatPrompts(msgs []api.Message) (*ChatHistory, error) {
|
||||||
|
|
||||||
currentVars.Prompt = msg.Content
|
currentVars.Prompt = msg.Content
|
||||||
for i := range msg.Images {
|
for i := range msg.Images {
|
||||||
currentVars.Prompt += fmt.Sprintf(" [img-%d]", len(images)+i)
|
id := len(images) + i
|
||||||
|
currentVars.Prompt += fmt.Sprintf(" [img-%d]", id)
|
||||||
currentVars.Images = append(currentVars.Images, llm.ImageData{
|
currentVars.Images = append(currentVars.Images, llm.ImageData{
|
||||||
ID: len(images) + i,
|
ID: id,
|
||||||
Data: msg.Images[i],
|
Data: msg.Images[i],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue