{"id":21731769,"url":"https://github.com/evref-bl/pharo-ollamaapi","last_synced_at":"2025-09-07T02:44:38.415Z","repository":{"id":206228069,"uuid":"716109863","full_name":"Evref-BL/Pharo-OllamaAPI","owner":"Evref-BL","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-14T11:05:53.000Z","size":57,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T20:26:37.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","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/Evref-BL.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}},"created_at":"2023-11-08T13:15:53.000Z","updated_at":"2024-12-05T13:23:22.000Z","dependencies_parsed_at":"2023-11-28T11:24:14.184Z","dependency_job_id":"2fd3ef25-0ffd-45f3-9afb-1c369ce324f9","html_url":"https://github.com/Evref-BL/Pharo-OllamaAPI","commit_stats":null,"previous_names":["evref-bl/pharo-ollamaapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FPharo-OllamaAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FPharo-OllamaAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FPharo-OllamaAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FPharo-OllamaAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Evref-BL","download_url":"https://codeload.github.com/Evref-BL/Pharo-OllamaAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244711938,"owners_count":20497417,"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":"2024-11-26T04:27:21.093Z","updated_at":"2025-03-20T23:43:21.816Z","avatar_url":"https://github.com/Evref-BL.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pharo-OllamaAPI\n\n[![Pharo 12](https://img.shields.io/badge/Pharo-12-%23aac9ff.svg)](https://github.com/pharo-project/pharo)\n[![Moose version](https://img.shields.io/badge/Moose-12-%23aac9ff.svg)](https://github.com/moosetechnology/Moose)\n\nThis is a simple API to call the [Ollama API](https://github.com/jmorganca/ollama/blob/main/docs/api.md)\n\n\u003e You must first install [Ollama](https://ollama.ai/) on your computer\n\n## Example\n\n### Generate code with CodeLlama\n\n```st\nollama := OllamaAPI new.\nollama model: OCodeLlamaModel new.\nollama model tag: '7b-code'.\nollama temperature: 0.1.\nollama num_predict: 30.\nollama top_p: 0.5.\n\nollama query: '\u003cPRE\u003e\u003cbody\u003e\n    \u003c!-- here a table --\u003e\n    \u003cSUF\u003e\n\u003c/body\u003e\u003cMID\u003e'\n```\n\n### Generate a comment code with CodeLlama\n\n```st\nollama := OllamaAPI new.\nollama model: OCodeLlamaModel new.\nollama model tag: '7b'.\nollama temperature: 0.5.\nollama num_predict: 75.\nollama top_p: 0.5.\n\nollama query: 'Writte a comment that explain this function\n\n\u003cyourcode\u003e'\n```\n\n### Use the stream API\n\n```st\n[ollama := OllamaAPI new.\nollama model: OCodeLlamaModel new.\nollama model tag: '7b'.\nollama temperature: 0.5.\nollama num_predict: 100.\nollama top_p: 0.5.\nollama stream: true.\n\nanswer := ollama query: 'Hello world'.\nreader := NeoJSONReader on: (ZnCharacterReadStream on: answer).\n[ reader atEnd ] whileFalse: [\n\t| val |\n\tval := reader next.\n\tTranscript crShow: (val at: #response).\n\t(val at: #done) ifTrue: [ answer close ] ]] forkAt: Processor lowIOPriority\n```\n\n## Installation\n\n```st\nMetacello new\n  githubUser: 'Evref-BL' project: 'Pharo-OllamaAPI' commitish: 'main' path: 'src';\n  baseline: 'PharoOllama';\n  load\n```\n\n### As a dependency\n\n```st\nspec\n  baseline: 'PharoOllama'\n  with: [\n  spec repository: 'github://Evref-BL/Pharo-OllamaAPI:main/src' ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevref-bl%2Fpharo-ollamaapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevref-bl%2Fpharo-ollamaapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevref-bl%2Fpharo-ollamaapi/lists"}