{"id":17637878,"url":"https://github.com/tusharad/ollama-haskell","last_synced_at":"2025-08-02T09:38:34.162Z","repository":{"id":253988404,"uuid":"845121500","full_name":"tusharad/ollama-haskell","owner":"tusharad","description":"Ollama client for Haskell","archived":false,"fork":false,"pushed_at":"2025-06-10T09:15:16.000Z","size":5555,"stargazers_count":42,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-22T14:57:38.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/ollama-haskell","language":"Haskell","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/tusharad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-08-20T16:12:02.000Z","updated_at":"2025-06-10T09:15:19.000Z","dependencies_parsed_at":"2025-06-09T20:05:17.735Z","dependency_job_id":"3fa1c760-b8e6-49b4-926d-410207d367d1","html_url":"https://github.com/tusharad/ollama-haskell","commit_stats":null,"previous_names":["tusharad/ollama-haskell"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tusharad/ollama-haskell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2Follama-haskell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2Follama-haskell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2Follama-haskell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2Follama-haskell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tusharad","download_url":"https://codeload.github.com/tusharad/ollama-haskell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharad%2Follama-haskell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268363038,"owners_count":24238548,"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-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-10-23T03:06:33.333Z","updated_at":"2025-08-02T09:38:34.147Z","avatar_url":"https://github.com/tusharad.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"# 🦙 Ollama Haskell\n\n\u003cdiv style=\"text-align: center;\"\u003e\n\u003cimg src=\"./examples/ollama_haskell.png\" alt=\"logo image\" height=\"200\"/\u003e\n\u003c/div\u003e\n\n**`ollama-haskell`** is an unofficial Haskell client for [Ollama](https://ollama.com), inspired by [`ollama-python`](https://github.com/ollama/ollama-python). It enables interaction with locally running LLMs through the Ollama HTTP API — directly from Haskell.\n\n---\n\n## ✨ Features\n\n* 💬 Chat with models\n* ✍️ Text generation (with streaming)\n* ✅ Chat with structured messages and tools\n* 🧠 Embeddings\n* 🧰 Model management (list, pull, push, show, delete)\n* 🗃️ In-memory conversation history\n* ⚙️ Configurable timeouts, retries, streaming handlers\n\n---\n\n## ⚡ Quick Example\n\n```haskell\n{-# LANGUAGE OverloadedStrings #-}\nmodule Main where\n\nimport Data.Ollama.Generate\nimport qualified Data.Text.IO as T\n\nmain :: IO ()\nmain = do\n  let ops =\n        defaultGenerateOps\n          { modelName = \"gemma3\"\n          , prompt = \"What is the meaning of life?\"\n          }\n  eRes \u003c- generate ops Nothing\n  case eRes of\n    Left err -\u003e putStrLn $ \"Something went wrong: \" ++ show err\n    Right r -\u003e do\n      putStr \"LLM response: \"\n      T.putStrLn (genResponse r)\n```\n\n---\n\n## 📦 Installation\n\nAdd to your `.cabal` file:\n\n```cabal\nbuild-depends:\n  base \u003e=4.7 \u0026\u0026 \u003c5,\n  ollama-haskell\n```\n\nOr use with `stack`/`nix-shell`.\n\n---\n\n## 📚 More Examples\n\nSee [`examples/OllamaExamples.hs`](examples/OllamaExamples.hs) for:\n\n* Chat with conversation memory\n* Structured JSON output\n* Embeddings\n* Tool/function calling\n* Multimodal input\n* Streaming and non-streaming variants\n\n---\n\n## 🛠 Prerequisite\n\nMake sure you have [Ollama installed and running locally](https://ollama.com/download). Run `ollama pull llama3` to download a model.\n\n---\n\n## 🧪 Dev \u0026 Nix Support\n\nUse Nix:\n\n```bash\nnix-shell\n```\n\nThis will install `stack` and Ollama.\n\n---\n\n## 👨‍💻 Author\n\nCreated and maintained by [@tusharad](https://github.com/tusharad). PRs and feedback are welcome!\n\n---\n\n## 🤝 Contributing\n\nHave ideas or improvements? Feel free to [open an issue](https://github.com/tusharad/ollama-haskell/issues) or submit a PR!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusharad%2Follama-haskell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftusharad%2Follama-haskell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusharad%2Follama-haskell/lists"}