(role string, content string)
| 70 | } |
| 71 | |
| 72 | func (c *ChatGPTRequest) AddMessage(role string, content string) { |
| 73 | c.Messages = append(c.Messages, chatgpt_message{ |
| 74 | ID: uuid.New(), |
| 75 | Author: chatgpt_author{Role: role}, |
| 76 | CreateTime: messageCreateTime(), |
| 77 | Content: chatgpt_content{ContentType: "text", Parts: []interface{}{content}}, |
| 78 | Metadata: defaultMessageMetadata(), |
| 79 | }) |
| 80 | } |
| 81 | |
| 82 | func (c *ChatGPTRequest) AddMultimodalMessage(role string, parts []interface{}, metadata map[string]interface{}) { |
| 83 | contentType := "text" |