(t *testing.T)
| 104 | } |
| 105 | |
| 106 | func TestUserMessageWithPDFDocument(t *testing.T) { |
| 107 | t.Parallel() |
| 108 | msg := session.UserMessage( |
| 109 | "Summarise this PDF", |
| 110 | chat.MessagePart{Type: chat.MessagePartTypeText, Text: "Summarise this PDF"}, |
| 111 | chat.MessagePart{ |
| 112 | Type: chat.MessagePartTypeDocument, |
| 113 | Document: &chat.Document{ |
| 114 | Name: "report.pdf", |
| 115 | MimeType: "application/pdf", |
| 116 | Size: 251658, // ~245 KB |
| 117 | Source: chat.DocumentSource{InlineData: []byte{0x25, 0x50, 0x44, 0x46}}, |
| 118 | }, |
| 119 | }, |
| 120 | ) |
| 121 | sess := session.New() |
| 122 | sess.AddMessage(msg) |
| 123 | content := PlainText(sess) |
| 124 | golden.Assert(t, content, "user_message_pdf_document.golden") |
| 125 | } |
| 126 | |
| 127 | func TestUserMessageWithTextDocument(t *testing.T) { |
| 128 | t.Parallel() |
nothing calls this directly
no test coverage detected