{"id":25719188,"url":"https://github.com/tameronline/ollamachatagent","last_synced_at":"2026-06-12T04:31:11.140Z","repository":{"id":278096588,"uuid":"934508120","full_name":"TamerOnLine/OllamaChatAgent","owner":"TamerOnLine","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-18T15:47:10.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T14:50:27.648Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TamerOnLine.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":"2025-02-18T00:28:18.000Z","updated_at":"2025-02-18T15:47:14.000Z","dependencies_parsed_at":"2025-02-18T01:29:11.718Z","dependency_job_id":"39816a40-5058-4f56-965d-eed217c1167f","html_url":"https://github.com/TamerOnLine/OllamaChatAgent","commit_stats":null,"previous_names":["tameronline/ollamachatagent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TamerOnLine/OllamaChatAgent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2FOllamaChatAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2FOllamaChatAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2FOllamaChatAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2FOllamaChatAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TamerOnLine","download_url":"https://codeload.github.com/TamerOnLine/OllamaChatAgent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2FOllamaChatAgent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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-02-25T16:37:10.940Z","updated_at":"2026-06-12T04:31:11.115Z","avatar_url":"https://github.com/TamerOnLine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ollama Chat Agent 🚀\n\n![Project Banner](img/screenshot.png)\n\n![License](https://img.shields.io/badge/license-MIT-green)  \nA lightweight conversational agent powered by **LangChain**, **Ollama**, and **FastAPI**. This project provides an interactive chat API using **Llama3** as the language model.\n\n## 📝 Features\n- 🔥 **Conversational AI**: Uses `Llama3` for text-based interactions.\n- 🛠 **LangChain Agent**: Implements a LangChain-powered conversational agent.\n- ⚡ **FastAPI Backend**: Provides an efficient REST API for chat queries.\n- 🛠 **Extensible Tooling**: Includes an example `echo_tool` that can be expanded.\n- 🖥 **Docker-Ready**: Easily containerized for deployment.\n\n---\n\n## 🚀 Quick Start\n\n### 1️⃣ Clone the Repository\n```bash\ngit clone https://github.com/TamerOnLine/tameronline-ollamachatagent.git\ncd tameronline-ollamachatagent\n```\n\n### 2️⃣ Install Dependencies\nEnsure you have Python 3.9+ installed, then run:\n```bash\npip install -r requirements.txt\n```\n\n### 3️⃣ Run the FastAPI Server\n```bash\nuvicorn main:app --host 0.0.0.0 --port 8000 --reload\n```\n\n### 4️⃣ Test the API  \nUse **cURL** or **Postman** to send a chat request:\n\n```bash\ncurl -X POST \"http://127.0.0.1:8000/chat/\" -H \"Content-Type: application/json\" -d '{\"query\": \"Hello, how are you?\"}'\n```\n\nExpected JSON response:\n```json\n{\n    \"response\": \"Hello! How can I assist you today?\"\n}\n```\n\n---\n\n## 🛠 Project Structure\n```\ntameronline-ollamachatagent/\n│── agent.py              # Defines the LangChain Agent with Llama3\n│── main.py               # FastAPI server handling chat requests\n│── requirements.txt      # Dependencies list\n│── LICENSE               # MIT License\n│── README.md             # Project Documentation\n└── img/                  # Images or assets (if any)\n```\n\n---\n\n## ⚡ Configuration\nBy default, the model used is **Llama3**. If you want to switch to another Ollama model (e.g., `mistral`), modify `agent.py`:\n```python\nllm = ChatOllama(model=\"mistral\", temperature=0)\n```\n\n---\n\n## 🛠 Extending the Agent\n### Adding Custom Tools\nYou can extend the agent by defining new tools. Example:\n```python\ndef reverse_tool(text: str):\n    return text[::-1]  # Reverses the input text\n\ntools.append(Tool(name=\"reverse_tool\", func=reverse_tool, description=\"Reverses the input text.\"))\n```\n\n---\n\n## 🐳 Docker Support\nTo run this project in a container:\n```bash\ndocker build -t ollama-chat-agent .\ndocker run -p 8000:8000 ollama-chat-agent\n```\n\n---\n\n## 📜 License\nThis project is licensed under the **MIT License**. See [LICENSE](LICENSE) for details.\n\n---\n\n## 📩 Contact\n- **Author:** [Tamer Hamad Faour](https://www.linkedin.com/in/tameronline/)\n- **GitHub:** [TamerOnLine](https://github.com/TamerOnLine)\n- **Website:** [mystrotamer.com](https://www.tameronline.com/)\n\n---\n\n🌟 **Enjoy building with Ollama \u0026 LangChain!** 🚀\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Follamachatagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftameronline%2Follamachatagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Follamachatagent/lists"}