{"id":13408335,"url":"https://github.com/tmc/langchaingo","last_synced_at":"2025-10-23T02:47:05.980Z","repository":{"id":65964518,"uuid":"603535454","full_name":"tmc/langchaingo","owner":"tmc","description":"LangChain for Go, the easiest way to write LLM-based programs in Go","archived":false,"fork":false,"pushed_at":"2025-05-06T05:24:44.000Z","size":13301,"stargazers_count":6485,"open_issues_count":316,"forks_count":814,"subscribers_count":59,"default_branch":"main","last_synced_at":"2025-05-07T06:19:44.857Z","etag":null,"topics":["ai","go","golang","langchain"],"latest_commit_sha":null,"homepage":"https://tmc.github.io/langchaingo/","language":"Go","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/tmc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"tmc"}},"created_at":"2023-02-18T20:04:54.000Z","updated_at":"2025-05-07T03:27:11.000Z","dependencies_parsed_at":"2024-01-02T02:42:43.788Z","dependency_job_id":"f732b78f-c8a1-4ea6-a137-3ae42658b8f6","html_url":"https://github.com/tmc/langchaingo","commit_stats":{"total_commits":1076,"total_committers":153,"mean_commits":7.032679738562091,"dds":0.8085501858736059,"last_synced_commit":"238d1c713de3ca983e8f6066af6b9080c9b0e088"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flangchaingo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flangchaingo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flangchaingo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Flangchaingo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmc","download_url":"https://codeload.github.com/tmc/langchaingo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092647,"owners_count":22013290,"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":["ai","go","golang","langchain"],"created_at":"2024-07-30T20:00:52.223Z","updated_at":"2025-10-23T02:47:05.976Z","avatar_url":"https://github.com/tmc.png","language":"Go","readme":"\u003e 🎉 **Join our new official Discord community!** Connect with other LangChain Go developers, get help and contribute: [Join Discord](https://discord.gg/t9UbBQs2rG)\n\n# 🦜️🔗 LangChain Go\n\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/github.com/tmc/langchaingo)\n[![scorecard](https://goreportcard.com/badge/github.com/tmc/langchaingo)](https://goreportcard.com/report/github.com/tmc/langchaingo)\n[![](https://dcbadge.vercel.app/api/server/t9UbBQs2rG?compact=true\u0026style=flat)](https://discord.gg/t9UbBQs2rG)\n[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers\u0026message=Open\u0026color=blue\u0026logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/tmc/langchaingo)\n[\u003cimg src=\"https://github.com/codespaces/badge.svg\" title=\"Open in Github Codespace\" width=\"150\" height=\"20\"\u003e](https://codespaces.new/tmc/langchaingo)\n\n⚡ Building applications with LLMs through composability, with Go! ⚡\n\n## 🤔 What is this?\n\nThis is the Go language implementation of [LangChain](https://github.com/langchain-ai/langchain).\n\n## 📖 Documentation\n\n- [Documentation Site](https://tmc.github.io/langchaingo/docs/)\n- [API Reference](https://pkg.go.dev/github.com/tmc/langchaingo)\n\n\n## 🎉 Examples\n\nSee [./examples](./examples) for example usage.\n\n```go\npackage main\n\nimport (\n  \"context\"\n  \"fmt\"\n  \"log\"\n\n  \"github.com/tmc/langchaingo/llms\"\n  \"github.com/tmc/langchaingo/llms/openai\"\n)\n\nfunc main() {\n  ctx := context.Background()\n  llm, err := openai.New()\n  if err != nil {\n    log.Fatal(err)\n  }\n  prompt := \"What would be a good company name for a company that makes colorful socks?\"\n  completion, err := llms.GenerateFromSinglePrompt(ctx, llm, prompt)\n  if err != nil {\n    log.Fatal(err)\n  }\n  fmt.Println(completion)\n}\n```\n\n```shell\n$ go run .\nSocktastic\n```\n\n# Resources\n\nJoin the Discord server for support and discussions: [Join Discord](https://discord.gg/8bHGKzHBkM)\n\nHere are some links to blog posts and articles on using Langchain Go:\n\n- [Using Gemini models in Go with LangChainGo](https://eli.thegreenplace.net/2024/using-gemini-models-in-go-with-langchaingo/) - Jan 2024\n- [Using Ollama with LangChainGo](https://eli.thegreenplace.net/2023/using-ollama-with-langchaingo/) - Nov 2023\n- [Creating a simple ChatGPT clone with Go](https://sausheong.com/creating-a-simple-chatgpt-clone-with-go-c40b4bec9267?sk=53a2bcf4ce3b0cfae1a4c26897c0deb0) - Aug 2023\n- [Creating a ChatGPT Clone that Runs on Your Laptop with Go](https://sausheong.com/creating-a-chatgpt-clone-that-runs-on-your-laptop-with-go-bf9d41f1cf88?sk=05dc67b60fdac6effb1aca84dd2d654e) - Aug 2023\n\n\n# Contributors\n\nThere is a momentum for moving the development of langchaingo to a more community effort, if you are interested in being a maintainer or you are a contributor please join our [Discord](https://discord.gg/8bHGKzHBkM) and let us know.\n\n\u003ca href=\"https://github.com/tmc/langchaingo/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=tmc/langchaingo\" /\u003e\n\u003c/a\u003e\n","funding_links":["https://github.com/sponsors/tmc"],"categories":["Artificial Intelligence","API SDKs","Go","Agent","A01_文本生成_文本对话","语言资源库","Large Language Model","HarmonyOS","Repos","其他语言移植版本","Ports to other languages","🚀 Specialized Agents","人工智能 (AI) 框架","2. Libraries \u0026 Frameworks"],"sub_categories":["大语言对话模型及数据","go","DevTools","Windows Manager","🗣️ Programming Language Agents","Go"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmc%2Flangchaingo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmc%2Flangchaingo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmc%2Flangchaingo/lists"}