{"id":18498380,"url":"https://github.com/phaniteja5789/langserve-ollama-codesummarization-using-docker","last_synced_at":"2026-04-09T11:01:18.407Z","repository":{"id":239345324,"uuid":"799263547","full_name":"phaniteja5789/langserve-ollama-codesummarization-using-docker","owner":"phaniteja5789","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-11T17:12:16.000Z","size":419,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T17:42:40.371Z","etag":null,"topics":["docker","docker-compose","docker-image","dockerfile","langchain-python","langserve","ollama","prompt","python3"],"latest_commit_sha":null,"homepage":"","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/phaniteja5789.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}},"created_at":"2024-05-11T16:02:52.000Z","updated_at":"2024-05-14T19:20:51.000Z","dependencies_parsed_at":"2024-05-11T18:01:15.829Z","dependency_job_id":null,"html_url":"https://github.com/phaniteja5789/langserve-ollama-codesummarization-using-docker","commit_stats":null,"previous_names":["phaniteja5789/langserve-ollama-codesummarization-using-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaniteja5789%2Flangserve-ollama-codesummarization-using-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaniteja5789%2Flangserve-ollama-codesummarization-using-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaniteja5789%2Flangserve-ollama-codesummarization-using-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaniteja5789%2Flangserve-ollama-codesummarization-using-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phaniteja5789","download_url":"https://codeload.github.com/phaniteja5789/langserve-ollama-codesummarization-using-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239217107,"owners_count":19601593,"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":["docker","docker-compose","docker-image","dockerfile","langchain-python","langserve","ollama","prompt","python3"],"created_at":"2024-11-06T13:39:23.600Z","updated_at":"2025-10-05T14:20:59.509Z","avatar_url":"https://github.com/phaniteja5789.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository details out the code summarization using the Langchain framework with LangServe, Ollama and docker.\n\nThe sourcecode.py is the entry point for the application.\n\nThis project is developed in 2 phases\n\nphase-1\n\n\t\n\tThe prompt has been developed using PromptTemplate\n\t\n\tAnd using the PromptTemplate and the LLM a langchain Chain is created. And the chain will be invoked whenever the endpoint will be hit since its been integrated with LangServe\n\t\n\tThe Langserve internally uses the FastAPI uvicorn server and it will be running in the port 8080 of the Local host.\n\t\n\tA Dockerfile is created in order to build a image, which uses the uvicorn server in order to run an API in the port 8080.\n\t\n\t\n\tAfter completion of Phase-1, the image is built with the name langservecontainer.\n\n \tFramework used in this Phase are langchain\n\n  \tModules used in this Phase are \n\n   \t\tlangchain_community.llms.ollama import Ollama ==\u003e in order to use Ollama where the llama3 model will be running in the local host at port 11434\n     \t        langserve import add_routes ==\u003e used to run the Chain at the endpoint 8080.\n       \t\tlangchain.prompts import PromptTemplate ==\u003e used the PromptTemplate in order to create a Prompt that needs to be sent to the LLM.\n\t\nphase-2\n\n\t\n\tThe DockerCompose.yaml is created, in this compose file, there are 2 images are used.\n\t\n\t1st Image\n\t\t\n\t\tIn this Image, the Ollama image will be pulled from the repository and it will be running in the port 11434\n\t\t\n\t\tThe model that I am using is llama3 and it will be saved in the /root/.ollama\n\t\t\n\t2nd Image\n\t\n\t\tIn this Image, the Langserve endpoint will be running which uses the Langchain Chain in order to generate the summary for the method and the result will be shown in the output of the LangServe Playground\n\t\t\n\nThe final output is shown as below\n![LangServeUI](https://github.com/phaniteja5789/langserve-ollama-codesummarization-using-docker/assets/36558484/a41e74af-2836-4d60-be9e-9dd9e107ec97)\n\nThe prompt that is sent to the LLM(llama3) using Ollama in order to run the LLM locally is as below screenshot.\n![InputPrompt](https://github.com/phaniteja5789/langserve-ollama-codesummarization-using-docker/assets/36558484/632c46b7-d8b6-4c19-aaf7-9c2fe473a0c5)\n\n\n\n\t\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaniteja5789%2Flangserve-ollama-codesummarization-using-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphaniteja5789%2Flangserve-ollama-codesummarization-using-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaniteja5789%2Flangserve-ollama-codesummarization-using-docker/lists"}