{"id":28323425,"url":"https://github.com/fzdwx/dify","last_synced_at":"2025-10-26T20:02:06.686Z","repository":{"id":294840131,"uuid":"988249741","full_name":"fzdwx/dify","owner":"fzdwx","description":"Dify Golang Client","archived":false,"fork":false,"pushed_at":"2025-06-09T08:58:33.000Z","size":2444,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T09:41:17.636Z","etag":null,"topics":["dify","dify-client","go"],"latest_commit_sha":null,"homepage":"","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/fzdwx.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,"zenodo":null}},"created_at":"2025-05-22T09:17:42.000Z","updated_at":"2025-06-09T08:58:37.000Z","dependencies_parsed_at":"2025-05-22T10:45:28.848Z","dependency_job_id":"c5a2adb4-85cf-4445-863f-f1be38037e5a","html_url":"https://github.com/fzdwx/dify","commit_stats":null,"previous_names":["fzdwx/dify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fzdwx/dify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fdify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fdify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fdify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fdify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fzdwx","download_url":"https://codeload.github.com/fzdwx/dify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fdify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261582578,"owners_count":23180616,"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":["dify","dify-client","go"],"created_at":"2025-05-25T15:13:06.661Z","updated_at":"2025-10-26T20:02:01.666Z","avatar_url":"https://github.com/fzdwx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dify Golang Client\n\ndify 的 Golang 客户端，用于管理数据集、创建应用等。\n\n## 快速开始\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/fzdwx/dify\"\n)\n\nfunc main() {\n\t// 使用用户名和密码创建客户端\n\t// 客户端会自动登录并获取或创建 datasets API key\n\tclient, err := dify.NewClient(\"http://your-dify-host\", \"your-email\", \"your-password\")\n\tif err != nil {\n\t\tlog.Fatal(\"创建客户端失败:\", err)\n\t}\n\n\tctx := context.Background()\n\n\t// 创建数据集\n\tuniqueName := fmt.Sprintf(\"测试数据集_%d\", time.Now().Unix())\n\tresp, err := client.CreateEmptyDataset(ctx, \u0026dify.CreateEmptyDatasetRequest{\n\t\tName:              uniqueName,\n\t\tDescription:       \"测试数据集\",\n\t\tIndexingTechnique: dify.IndexingTechniqueEconomy,\n\t\tPermission:        dify.DatasetPermissionAllTeamMembers,\n\t\tProvider:          dify.DatasetProviderVendor,\n\t\tRetrievalModel: dify.RetrievalModel{\n\t\t\tSearchMethod:    dify.RetrievalModelSearchMethodHybridSearch,\n\t\t\tRerankingEnable: true,\n\t\t\tTopK:            10,\n\t\t},\n\t})\n\n\tif err != nil {\n\t\tlog.Fatal(\"创建数据集失败:\", err)\n\t}\n\n\tfmt.Printf(\"成功创建数据集: %s (ID: %s)\\n\", resp.Result.Name, resp.Result.ID)\n}\n```\n\n## 许可证\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzdwx%2Fdify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffzdwx%2Fdify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzdwx%2Fdify/lists"}