{"id":28502637,"url":"https://github.com/davidhintelmann/chatzilla","last_synced_at":"2025-10-14T14:39:41.902Z","repository":{"id":294078300,"uuid":"985922669","full_name":"davidhintelmann/chatzilla","owner":"davidhintelmann","description":"Query local ollama instance to explore the world of open source large language models","archived":false,"fork":false,"pushed_at":"2025-05-20T05:42:38.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T11:44:09.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/davidhintelmann.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":"2025-05-18T19:51:35.000Z","updated_at":"2025-05-20T05:42:42.000Z","dependencies_parsed_at":"2025-05-18T20:45:19.477Z","dependency_job_id":null,"html_url":"https://github.com/davidhintelmann/chatzilla","commit_stats":null,"previous_names":["davidhintelmann/chatzilla"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidhintelmann/chatzilla","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhintelmann%2Fchatzilla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhintelmann%2Fchatzilla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhintelmann%2Fchatzilla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhintelmann%2Fchatzilla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidhintelmann","download_url":"https://codeload.github.com/davidhintelmann/chatzilla/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidhintelmann%2Fchatzilla/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019154,"owners_count":26086682,"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-10-14T02:00:06.444Z","response_time":60,"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":"2025-06-08T16:31:14.268Z","updated_at":"2025-10-14T14:39:41.896Z","avatar_url":"https://github.com/davidhintelmann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chatzilla\n\nQuery local ollama instance to explore the world of open source large language models.\nProvides a simple and intuitive way to send prompts, start conversations, \nand retrieve chat histories.\n\n\u003c!-- ![overview](docs/imgs/\u003cimage\u003e.png) --\u003e\n\n## Take a Gander\n\n- Checkout `demo/demo.ipynb` jupyter notebook to get a quick demo on the capabilties of this library.\n- Jump into `demo/chat.py` to extend an ongoing conversation.\n- chatzilla folder is the package developed as shown below.\n\n## Features \n\n- Send single prompts or start conversations\n- Continue conversations while including chat history\n- Retrieve chat history and assistant responses\n\n## Installation\n\nclone this repository and install the requirements with:\n\n```pwsh\npip install -r requirements.txt\n```\n\nuse the following command to point your chat requests to ollama's api endpoint\n\n```python\nfrom dotenv import load_dotenv\n\nload_dotenv()\nollama_url = os.getenv(\"OLLAMA_CHAT\") # http://localhost:11434/api/chat   \n```\n\n**Recommend:** create a python virtual environment first. \n\nIf you haven't done this before, please check the python [docs](https://docs.python.org/3/library/venv.html) for more information.\n\n## Usage\n\n### Single Prompt\n\nUse the `PromptOllama` function to send a single prompt to LLaMA.\n\n```python\nfrom chatzilla import PromptOllama\n\nresponse = PromptOllama(\"What do you call a fake noodle?\", \"llama3.1\")\nprint(response)  # prints \"An impasta!\"\n```\n\n#### Conversation\n\nUse the `ChatOllama` class to start and continue conversations.\n\n```python\nfrom chatzilla import ChatOllama\n\nchat = ChatOllama(\"Hello!\", \"llama3.1\")\nresponse = chat.begin()\nprint(response)  # prints \"How are you today?\"\n\nnext_response = chat.next(\"I'm good, thanks!\")\nprint(next_response)  # prints something like a continuation of the conversation\n```\n\n#### Chat History\n\nUse the `history` method to retrieve the current chat history.\n\n```python\nprint(chat.history()) # prints list of chat history, example below: \n# [     \n#   {\"role\": \"user\", \"content\": \"Hello!\"},\n#   {\"role\": \"assistant\", \"content\": \"How are you today?\"} \n# ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidhintelmann%2Fchatzilla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidhintelmann%2Fchatzilla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidhintelmann%2Fchatzilla/lists"}