{"id":26541358,"url":"https://github.com/kassane/ollama-d","last_synced_at":"2026-02-17T01:02:36.777Z","repository":{"id":283488746,"uuid":"951537443","full_name":"kassane/ollama-d","owner":"kassane","description":"D bindings for the Ollama API","archived":false,"fork":false,"pushed_at":"2025-03-22T20:07:02.000Z","size":24,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T00:22:07.487Z","etag":null,"topics":["ai","d","dlang","llama","llm","ollama","ollama-api","ollama-client"],"latest_commit_sha":null,"homepage":"http://ollama-d.dub.pm/","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kassane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-03-19T20:51:07.000Z","updated_at":"2025-03-26T04:51:40.000Z","dependencies_parsed_at":"2025-06-06T10:09:11.510Z","dependency_job_id":"8b05a293-e993-4710-a324-c719a0ad7767","html_url":"https://github.com/kassane/ollama-d","commit_stats":null,"previous_names":["kassane/ollama-d"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/kassane/ollama-d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Follama-d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Follama-d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Follama-d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Follama-d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kassane","download_url":"https://codeload.github.com/kassane/ollama-d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Follama-d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29528243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"ssl_error","status_checked_at":"2026-02-17T00:54:25.811Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","d","dlang","llama","llm","ollama","ollama-api","ollama-client"],"created_at":"2025-03-22T01:20:11.634Z","updated_at":"2026-02-17T01:02:36.299Z","avatar_url":"https://github.com/kassane.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ollama-d\n\n[![Static Badge](https://img.shields.io/badge/v2.110.0%20(stable)-f8240e?logo=d\u0026logoColor=f8240e\u0026label=runtime)](https://dlang.org/download.html)\n![Latest release](https://img.shields.io/github/v/release/kassane/ollama-d?include_prereleases\u0026label=latest)\n[![Artifacts](https://github.com/kassane/ollama-d/actions/workflows/ci.yml/badge.svg)](https://github.com/kassane/ollama-d/actions/workflows/ci.yml)\n\nD language bindings for the Ollama REST API - Seamless integration with local AI models\n\n## Features\n\n- Text generation with native\n- Chat interactions with local AI models\n- Model management (list, create, show, pull, push, copy, delete models)\n- Configurable timeout settings\n- Simple and intuitive API design using `std.net.curl` and `std.json`\n- Server version retrieval\n- OpenAI-compatible API endpoints\n\n## Prerequisites\n\n- [D compiler](https://dlang.org/download.html) installed on your system\n- Ollama server running locally (default: \"http://127.0.0.1:11434\")\n- Installed AI model (e.g., \"llama3.2\")\n\n## Quick Examples\n\n```d\nimport ollama;\nimport std.stdio;\n\nvoid main() {\n    // Initialize Ollama client on localhost at port 11434\n    auto client = new OllamaClient();\n\n    // Text generation\n    auto generateResponse = client.generate(\"llama3.2\", \"Why is the sky blue?\");\n    writeln(\"Generate Response: \", generateResponse[\"response\"].str);\n\n    // Chat interaction\n    Message[] messages = [Message(\"user\", \"Hello, how are you?\")];\n    auto chatResponse = client.chat(\"llama3.2\", messages);\n    writeln(\"Chat Response: \", chatResponse[\"message\"][\"content\"].str);\n\n    // List available models\n    auto models = client.listModels();\n    writeln(\"Available Models: \", models);\n\n    // OpenAI-compatible chat completions\n    auto openaiResponse = client.chatCompletions(\"llama3.2\", messages, 50, 0.7);\n    writeln(\"OpenAI-style Response: \", openaiResponse[\"choices\"][0][\"message\"][\"content\"].str);\n\n    // Get server version\n    auto version = client.getVersion();\n    writeln(\"Ollama Server Version: \", version);\n}\n```\n\n## Additional Methods\n\n- `generate()`: Text generation with custom options\n- `chat()`: Conversational interactions\n- `listModels()`: Retrieve available models\n- `showModel()`: Get detailed model information\n- `createModel()`: Create custom models\n- `copy()`: Copy existing models\n- `deleteModel()`: Remove models from server\n- `pull()`: Download models from registry\n- `push()`: Upload models to registry\n- `chatCompletions()`: OpenAI-compatible chat endpoint\n- `completions()`: OpenAI-compatible text completion\n- `getModels()`: List models in OpenAI-compatible format\n- `setTimeOut()`: Configure request timeout duration\n- `getVersion()`: Retrieve Ollama server version\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkassane%2Follama-d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkassane%2Follama-d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkassane%2Follama-d/lists"}