{"id":23820445,"url":"https://github.com/imclerran/roc-ai","last_synced_at":"2026-02-01T18:33:50.262Z","repository":{"id":239659192,"uuid":"800178234","full_name":"imclerran/roc-ai","owner":"imclerran","description":"Roc Package for building with LLMs.","archived":false,"fork":false,"pushed_at":"2025-07-14T17:05:26.000Z","size":308,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T03:37:02.813Z","etag":null,"topics":["artificial-intelligence","functional-programming","roc-lang"],"latest_commit_sha":null,"homepage":"http://www.imclerran.com/roc-ai/","language":"Roc","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/imclerran.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,"zenodo":null}},"created_at":"2024-05-13T21:09:10.000Z","updated_at":"2025-07-14T17:05:26.000Z","dependencies_parsed_at":"2024-05-13T22:31:36.465Z","dependency_job_id":"67212aac-fa30-4fbd-aa91-d7e77bef6bfe","html_url":"https://github.com/imclerran/roc-ai","commit_stats":null,"previous_names":["imclerran/roc-openrouter","imclerran/roc-ai"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/imclerran/roc-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclerran%2Froc-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclerran%2Froc-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclerran%2Froc-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclerran%2Froc-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imclerran","download_url":"https://codeload.github.com/imclerran/roc-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imclerran%2Froc-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28985818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"last_error":"SSL_read: 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":["artificial-intelligence","functional-programming","roc-lang"],"created_at":"2025-01-02T08:00:46.439Z","updated_at":"2026-02-01T18:33:50.256Z","avatar_url":"https://github.com/imclerran.png","language":"Roc","funding_links":[],"categories":["Roc Packages 📦"],"sub_categories":[],"readme":"# Roc package for building with LLMs\n\n[![Roc-Lang][roc_badge]][roc_link]\n[![GitHub last commit][last_commit_badge]][last_commit_link]\n[![CI status][ci_status_badge]][ci_status_link]\n[![Latest release][version_badge]][version_link]\n\nThis package is still in WIP 🛠️ stages, so the interface may be subject to change. With that said, the package currently supports:\n\n\u003e NOTE: roc-ai is currently undergoing a major refactoring. When complete, it should include better support for \n\u003e Anthropic (including function calling), improve encoding performance, and be structured better for long term\n\u003e maintainance and support. The goal is to keep public facing interface change minimal, but some interface \n\u003e changes may also be inbound.\n\n- 🚀 __NEW!__ Support for many APIs:\n    - Anthropic\n    - OpenAI\n    - OpenAI compliant, with a custom URL \n        - (Includes local providers, such as Ollama or LM Studio)\n    - OpenRouter, with support for hundreds of models, and many OpenRouter exclusive features.\n- Creating and parsing ChatML style requests and responses.\n- Creating and parsing raw prompt style requests and responses.\n- Formatting prompt strings with `[INST]`, `\u003c\u003cSYS\u003e\u003e`, and `\u003cs\u003e` tags for models with llama style fine-tuning.\n- Most common LLM parameters such as `temperature`, `top_p`, `top_k`, `repetition_penalty`, etc.\n- OpenRouter specific features like fallback models and provider preferences.\n- LLM tool use - this enables the AI model to call Roc functions and use the results in its answers.\n  - Includes a collection of prebuilt tools, or you can build your own\n- Prompt caching on supported models\n\n## Known issues:\n- Tool use is currently not supported with the anthropic API, \n    - this is due to missing support in Roc for decoding json dictionaries [roc#5294](https://github.com/roc-lang/roc/issues/5294)\n    - __Workaround:__ Anthropic models can be accessed through OpenRouter, with full tool calling support\n- Prompt caching has currently only be been tested through OpenRouter\n\n\n## Example\n```roc\nmain! = |_|\n    api_key = Env.var!(\"OPENAI_API_KEY\")?\n    client =\n        Chat.new_client({ api: OpenAI, api_key, model: \"gpt-4o\" })\n        |\u003e Chat.append_user_message(\"Hello, computer!\", {})\n    response = Http.send!(Chat.build_http_request(client, {}))?\n    messages = Chat.update_messages(client, response)? |\u003e .messages\n    when List.last(messages) is\n        Ok(message) -\u003e Stdout.line!(message.content)\n        _ -\u003e Ok({})\n```\n\nFor complete example apps, including a full chatbot app with tool use, see the examples folder.\n\n[roc_badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fpastebin.com%2Fraw%2FcFzuCCd7\n[roc_link]: https://github.com/roc-lang/roc\n[ci_status_badge]: https://img.shields.io/github/actions/workflow/status/imclerran/roc-openrouter/ci.yaml?logo=github\u0026logoColor=lightgrey\n[ci_status_link]: https://github.com/imclerran/roc-openrouter/actions/workflows/ci.yaml\n[last_commit_badge]: https://img.shields.io/github/last-commit/imclerran/roc-openrouter?logo=git\u0026logoColor=lightgrey\n[last_commit_link]: https://github.com/imclerran/roc-openrouter/commits/main/\n[version_badge]: https://img.shields.io/github/v/release/imclerran/roc-ai\n[version_link]: https://github.com/imclerran/roc-ai/releases/\n\u003c!--[version_link]: https://github.com/imclerran/roc-ai/releases/latest --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimclerran%2Froc-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimclerran%2Froc-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimclerran%2Froc-ai/lists"}