{"id":21993087,"url":"https://github.com/emi420/ollama-batch","last_synced_at":"2025-08-30T12:36:28.546Z","repository":{"id":256659053,"uuid":"805093596","full_name":"emi420/ollama-batch","owner":"emi420","description":"This simple utility will runs LLM prompts over a list of texts or images for classify them, printing the results as a JSON response.","archived":false,"fork":false,"pushed_at":"2025-08-15T14:42:57.000Z","size":849,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T15:40:09.918Z","etag":null,"topics":["ai","data-science","llm","ollama"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emi420.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2024-05-23T21:46:37.000Z","updated_at":"2025-08-15T14:43:01.000Z","dependencies_parsed_at":"2024-09-12T09:10:00.000Z","dependency_job_id":"f5db42c5-96ec-45bd-ac03-2d88eab7ff5e","html_url":"https://github.com/emi420/ollama-batch","commit_stats":null,"previous_names":["emi420/ollama-batch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emi420/ollama-batch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emi420%2Follama-batch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emi420%2Follama-batch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emi420%2Follama-batch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emi420%2Follama-batch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emi420","download_url":"https://codeload.github.com/emi420/ollama-batch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emi420%2Follama-batch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272852277,"owners_count":25004052,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","data-science","llm","ollama"],"created_at":"2024-11-29T20:15:59.562Z","updated_at":"2025-08-30T12:36:28.541Z","avatar_url":"https://github.com/emi420.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ollama Batch Classification Tool\n\nThis simple utility will runs LLM prompts over a list of texts\nor images for classify them, printing the results as a JSON response.\n\n## Quick start\n\n### Requirements\n\nYou'll need Ollama installed in your system.\n\nDefault model is `gemma3:4b`, but you can use any other model with the `-m \u003cmodel\u003e` parameter.\n\n### Install\n\n```bash\npip install ollama-batch\n```\n\n### Usage\n\n```bash\nollama-batch -f -f examples/recipes.json -p 'Is this recipe a sweet dessert or salty food?'\n```\n\n```json\n[\n    {\"result\": \"salty\"},\n    {\"result\": \"sweet\"},\n    {\"result\": \"salty\"},\n    {\"result\": \"sweet\"},\n    {\"result\": \"sweet\"},\n    {\"result\": \"sweet\"}\n]\n```\n\n### Other examples\n\n```bash\nollama-batch -d examples/recipes -p 'Is this recipe a sweet dessert or salty food?' --json-property=ingredients\nollama-batch -d examples/recipes -p 'Is this recipe a sweet dessert or salty food?' --json-property=title\nollama-batch -f examples/recipes.json --prompt-file examples/sweet_or_salty.txt\nollama-batch -f examples/recipes.json --prompt-file examples/sweet_or_salty.txt --json-append=title,url\nollama-batch -d examples/images -i --prompt-file examples/sweet_or_salty.txt\n```\n\n### Help\n\n```bash\nollama-batch \\\n    [--directory DIRECTORY] \\\n    [--file FILE] [--model MODEL] \\\n    [--prompt PROMPT] \\\n    [--prompt-file PROMPT_FILE] \\\n    [--json-property JSON_PROPERTY] \\\n    [--json-append JSON_APPEND] \\\n    [--question-first]\n\noptions:\n  -h, --help\n            Show this help message and exit\n  --directory DIRECTORY, -d DIRECTORY\n            Directory with files you want to process\n  --file FILE, -f FILE\n            JSON file you want to process\n  --model MODEL, -m MODEL\n            Model you want to use\n  --prompt PROMPT, -p PROMPT\n            Prompt text\n  --prompt-file PROMPT_FILE\n            Text file with a prompt\n  --json-property JSON_PROPERTY\n            JSON property that you want to use\n  --json-append JSON_APPEND\n            Property that you want to append to the results\n  --question-first\n            First the question, then the prompt\n  --images, -i\n            Look for images (use a vision model)\n```\n\n### License\n\nYou may use this project under the terms of the GNU Affero General Public License (GNU AGPL) Version 3.\n\n(c) 2024 Emilio Mariscal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femi420%2Follama-batch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femi420%2Follama-batch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femi420%2Follama-batch/lists"}