{"id":29195654,"url":"https://github.com/gptscript-ai/gpt4-v-vision","last_synced_at":"2025-07-02T05:05:12.740Z","repository":{"id":223864532,"uuid":"761492952","full_name":"gptscript-ai/gpt4-v-vision","owner":"gptscript-ai","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-11T14:07:14.000Z","size":1898,"stargazers_count":9,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-28T23:42:48.322Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gptscript-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-21T23:44:17.000Z","updated_at":"2024-10-15T00:42:23.000Z","dependencies_parsed_at":"2024-03-08T18:27:48.086Z","dependency_job_id":"06413199-a2e6-49dc-9718-7be3952ab5eb","html_url":"https://github.com/gptscript-ai/gpt4-v-vision","commit_stats":null,"previous_names":["njhale/vision","gptscript-ai/gpt4-v-vision"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gptscript-ai/gpt4-v-vision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fgpt4-v-vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fgpt4-v-vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fgpt4-v-vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fgpt4-v-vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gptscript-ai","download_url":"https://codeload.github.com/gptscript-ai/gpt4-v-vision/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fgpt4-v-vision/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263077631,"owners_count":23410167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-02T05:05:12.148Z","updated_at":"2025-07-02T05:05:12.718Z","avatar_url":"https://github.com/gptscript-ai.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpt4-v-vision\n\n`gpt4-v-vision` is a simple OpenAI CLI and GPTScript Tool for interacting with vision models.\n\n## Prerequisites\n\n- NodeJS \n- OpenAI API key\n\n\n## Usage\n\nImport `vision` into any `.gpt` script by referencing this GitHub repo.\n\n```yaml\nTools: github.com/gptscript-ai/gpt4-v-vision\n\nDescribe the images at the following locations:\n- examples/eiffel-tower.png\n- https://avatars.githubusercontent.com/u/158112119?s=400\u0026u=d2c6ae055a80ced8209f4aab2562986a97d79e9f\u0026v=4\n```\n\nYou will be prompted to enter your OpenAI API key if you have not provided it before.\n\n## Testing Changes\n\n1. Clone this repository or download the source code:\n\n    ```bash\n    git clone git@github.com:gptscript-ai/gpt4-v-vision.git\n    cd gpt4-v-vision\n    ```\n\n2. Install the `npm` dependencies\n\n    ```bash\n    npm install \n    ```\n\n3. Import the local `tools.gpt` file to test local changes\n\n    Here's a simple example: \n\n    ```yaml\n    # The tool script import path is relative to the directory of the script importing it; in this case ./examples\n    Tools: ../tool.gpt\n    Description: This script is used to test local changes to the vision tool by invoking it with a simple prompt and image references.\n\n    Describe the images at the following locations:\n    - examples/eiffel-tower.png\n    - https://avatars.githubusercontent.com/u/158112119?s=400\u0026u=d2c6ae055a80ced8209f4aab2562986a97d79e9f\u0026v=4\n    ```\n\n    It can be run from the root directory of this repo\n\n    ```sh\n    # Disable response caching to ensure the tool is always called for testing purposes\n    gptscript --disable-cache examples/test.gpt\n    ```\n\n## Running the CLI\n\n```console\n$ node index.js --help\nUsage: index [options] \u003cprompt\u003e \u003cimages...\u003e\n\nUtility for processing images with the OpenAI API\n\nArguments:\n  prompt                      Prompt to send to the vision model\n  images                      List of image URIs to process. Supports file:// and https:// protocols. Images must be jpeg or png.\n\nOptions:\n  --openai-api-key \u003ckey\u003e      OpenAI API Key (env: OPENAI_API_KEY)\n  --openai-base-url \u003cstring\u003e  OpenAI base URL (env: OPENAI_BASE_URL)\n  --openai-org-id \u003cstring\u003e    OpenAI Org ID to use (env: OPENAI_ORG_ID)\n  --max-tokens \u003cnumber\u003e       Max tokens to use (default: 2048, env: MAX_TOKENS)\n  --model \u003cmodel\u003e             Model to process images with (choices: \"gpt-4o\", \"gpt-4-turbo\", default: \"gpt-4o\", env: MODEL)\n  --detail \u003cdetail\u003e           Fidelity to use when processing images (choices: \"low\", \"high\", \"auto\", default: \"auto\", env: DETAIL)\n  -h, --help                  display help for command\n```\n\n### Ask a question about an image in a local file \n\n```bash\nnode index.js 'Describe the picture' 'file://examples/eiffel-tower.png'\n```\n\n### Ask a question about an image at a remote URL \n```bash\nnode index.js 'Describe the picture' 'https://github.com/gptscript-ai/vision/blob/main/examples/eiffel-tower.png?raw=true'\n```\n\n### Ask a question related to multiple images \n```bash\nnode index.js 'Do you think these two portraits are by the same artist?' 'https://github.com/gptscript-ai/vision/blob/main/examples/eiffel-tower.png?raw=true' 'file://examples/eiffel-tower.png'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgptscript-ai%2Fgpt4-v-vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgptscript-ai%2Fgpt4-v-vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgptscript-ai%2Fgpt4-v-vision/lists"}