{"id":43543352,"url":"https://github.com/devsapp/ollama","last_synced_at":"2026-02-03T18:38:01.467Z","repository":{"id":240203733,"uuid":"801923542","full_name":"devsapp/ollama","owner":"devsapp","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-18T06:32:31.000Z","size":5817,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-07-18T08:28:11.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/devsapp.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-17T07:23:26.000Z","updated_at":"2024-07-18T06:32:34.000Z","dependencies_parsed_at":"2024-05-17T10:03:01.900Z","dependency_job_id":"3730fc8a-9c86-49fc-beba-b26158c9cbb3","html_url":"https://github.com/devsapp/ollama","commit_stats":null,"previous_names":["devsapp/ollama"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/devsapp/ollama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Follama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Follama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Follama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Follama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsapp","download_url":"https://codeload.github.com/devsapp/ollama/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsapp%2Follama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29052640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"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":[],"created_at":"2026-02-03T18:38:00.734Z","updated_at":"2026-02-03T18:38:01.458Z","avatar_url":"https://github.com/devsapp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003e 注：当前项目为 Serverless Devs 应用，由于应用中会存在需要初始化才可运行的变量（例如应用部署地区、函数名等等），所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用，**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化，详情可参考[部署 \u0026 体验](#部署--体验) 。\n\n# ollama 帮助文档\n\u003cp align=\"center\" class=\"flex justify-center\"\u003e\n    \u003ca href=\"https://www.serverless-devs.com\" class=\"ml-1\"\u003e\n    \u003cimg src=\"http://editor.devsapp.cn/icon?package=ollama\u0026type=packageType\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://www.devsapp.cn/details.html?name=ollama\" class=\"ml-1\"\u003e\n    \u003cimg src=\"http://editor.devsapp.cn/icon?package=ollama\u0026type=packageVersion\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://www.devsapp.cn/details.html?name=ollama\" class=\"ml-1\"\u003e\n    \u003cimg src=\"http://editor.devsapp.cn/icon?package=ollama\u0026type=packageDownload\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdescription\u003e\n\n通过函数计算开箱即用Ollama，极低成本部署自己的云端LLM服务。\n\n\u003c/description\u003e\n\n\u003ccodeUrl\u003e\n\n\n\n\u003c/codeUrl\u003e\n\u003cpreview\u003e\n\n\n\n\u003c/preview\u003e\n\n\n## 前期准备\n\n使用该项目，您需要有开通以下服务并拥有对应权限：\n\n\u003cservice\u003e\n\n\n\n| 服务/业务 |  权限  | 相关文档 |\n| --- |  --- | --- |\n| 函数计算 |  AliyunFCFullAccess | [帮助文档](https://help.aliyun.com/product/2508973.html) [计费文档](https://help.aliyun.com/document_detail/2512928.html) |\n\n\u003c/service\u003e\n\n\u003cremark\u003e\n\n\n\n\u003c/remark\u003e\n\n\u003cdisclaimers\u003e\n\n\n\n\u003c/disclaimers\u003e\n\n## 部署 \u0026 体验\n\n\u003cappcenter\u003e\n   \n- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=ollama) ，\n  [![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=ollama) 该应用。\n   \n\u003c/appcenter\u003e\n\u003cdeploy\u003e\n    \n- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署：\n  - [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ，并进行[授权信息配置](https://docs.serverless-devs.com/fc/config) ；\n  - 初始化项目：`s init ollama -d ollama`\n  - 进入项目，并进行项目部署：`cd ollama \u0026\u0026 s deploy -y`\n   \n\u003c/deploy\u003e\n\n## 案例介绍\n\n\u003cappdetail id=\"flushContent\"\u003e\n\n基于 Ollama 案例，您可以轻松地将 Ollama 服务部署到函数计算中，享受高效、灵活的 AI 语言模型服务。Ollama 是一款专为开发者设计的高性能语言模型，它能够处理各种自然语言处理任务，包括文本生成、翻译、摘要等，是您开发智能应用的强大后盾。\n\nOllama 以其卓越的性能和易用性在业界获得了广泛认可，Ollama 服务的部署通常需要一定的技术背景和资源配置。然而，通过 Serverless 开发平台，您可以快速、便捷地将 Ollama 服务部署至函数计算，无需担心底层资源管理和运维问题，让您专注于应用的创新和开发。此外，开发平台还提供了包括模型管理、API 集成、云存储等在内的多种服务，以满足不同用户的需求。\n\n使用本案例，servereless开发平台将为您提供开箱即用的ollama服务，并可以**开启GPU闲置预留模式**，在保证使用性能的同时，以最小成本持有自己专属的LLM服务。GPU闲置预留模式公测中，请提交[公测申请](https://survey.aliyun.com/apps/zhiliao/dXfRVPEm-)\n\n当前版本软件内置了以下三种尺寸的Qwen模型：Qwen 0.5b, Qwen 7b, Qwen 14b。每种模型都具有不同的参数量和复杂度，以适应不同的应用场景和性能要求，您可以在应用初始化时进行选择。\n\n\u003c/appdetail\u003e\n\n## 使用流程\n\n\u003cusedetail id=\"flushContent\"\u003e\n\n### 通过API进行调用\n我们推荐以openAI的API范式进行函数调用，其中model需替换为您当前使用的模型名字(`qwen:0.5b`, `qwen:7b`, `qwen:14b`)，如下是一个调用qwen_7b模型的示例：\n```\ncurl \"${FunctionEndpoint}/v1/chat/completions\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"qwen:7b\",\n    \"messages\": [\n      {\n        \"role\": \"system\",\n        \"content\": \"You are a helpful assistant.\"\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"How can you help me?\"\n      }\n    ]\n  }'\n```\nAPI参数说明及更多请参考 https://github.com/ollama/ollama/blob/main/docs/api.md\n\n\n### 通过 Open WebUI 进行测试\n\n通过应用 [fc-open-webui](https://github.com/devsapp/fc-open-webui) 部署，并配置 ollama 接口为当前应用触发器\n\n应用中心创建地址 https://fcnext.console.aliyun.com/applications/create?template=fc-open-webui\n\n\n\n\u003c/usedetail\u003e\n\n## 注意事项\n\n\u003cmatters id=\"flushContent\"\u003e\n\u003c/matters\u003e\n\n\n\u003cdevgroup\u003e\n\n\n## 开发者社区\n\n您如果有关于错误的反馈或者未来的期待，您可以在 [Serverless Devs repo Issues](https://github.com/serverless-devs/serverless-devs/issues) 中进行反馈和交流。如果您想要加入我们的讨论组或者了解 FC 组件的最新动态，您可以通过以下渠道进行：\n\n\u003cp align=\"center\"\u003e  \n\n| \u003cimg src=\"https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407298906_20211028074819117230.png\" width=\"130px\" \u003e | \u003cimg src=\"https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407044136_20211028074404326599.png\" width=\"130px\" \u003e | \u003cimg src=\"https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407252200_20211028074732517533.png\" width=\"130px\" \u003e |\n| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| \u003ccenter\u003e微信公众号：`serverless`\u003c/center\u003e                                                                                         | \u003ccenter\u003e微信小助手：`xiaojiangwh`\u003c/center\u003e                                                                                        | \u003ccenter\u003e钉钉交流群：`33947367`\u003c/center\u003e                                                                                           |\n\u003c/p\u003e\n\u003c/devgroup\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsapp%2Follama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsapp%2Follama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsapp%2Follama/lists"}