;; Smoke test: mixed text + image attachments on Anthropic. ;; Exercises the vector-content branch in anthropic-prepare-message and the ;; data-URL -> base64 conversion for image blocks. ;; ;; Prereqs: ;; - ANTHROPIC_API_KEY in env ;; - An image at /tmp/a.png (edit to match yours) ;; - Egg installed: `chicken-install -n` from repo root ;; ;; Run: csi -s tests/test-multifile-anthropic.scm (import llm) ;; Throwaway text file so the test is self-contained. (with-output-to-file "/tmp/notes.txt" (lambda () (display "The project codename is Aurora. Ship date: Friday."))) (print "=== Anthropic: text file inlined + image as content block ===") (let-values (((c ok?) (llm/send (llm/chat provider: 'anthropic) "Using notes.txt, tell me the codename and ship date, then describe the image in one line." file: '("/tmp/notes.txt" "/tmp/a.png")))) (print (llm/get-last-response c)) (print "tokens: " (llm/get-tokens c)) (print "cost: $" (llm/get-cost c)))