Documentation
¶
Overview ¶
Document analysis example - analyzing PDF, text files, or other documents.
This example shows how to send document content to the model for analysis. For text-based documents (PDF, TXT, MD, code files), we extract the text and send it as a text message.
To run:
export OPENAI_API_KEY="your-key-here" go run examples/07_document_analysis/main.go path/to/document.txt
Click to show internal directories.
Click to hide internal directories.