{"id":20282365,"url":"https://github.com/redisai/redisai-go","last_synced_at":"2025-07-31T02:12:01.245Z","repository":{"id":40387856,"uuid":"205855710","full_name":"RedisAI/redisai-go","owner":"RedisAI","description":"A Golang client for RedisAI","archived":false,"fork":false,"pushed_at":"2024-09-05T09:21:28.000Z","size":179624,"stargazers_count":25,"open_issues_count":5,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-21T06:33:17.688Z","etag":null,"topics":["deep-learning","redis","redis-ai","redisai"],"latest_commit_sha":null,"homepage":"https://redisai.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisAI.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":"2019-09-02T12:47:17.000Z","updated_at":"2024-09-05T09:21:31.000Z","dependencies_parsed_at":"2024-06-19T00:29:01.728Z","dependency_job_id":null,"html_url":"https://github.com/RedisAI/redisai-go","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fredisai-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fredisai-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fredisai-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fredisai-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisAI","download_url":"https://codeload.github.com/RedisAI/redisai-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360145,"owners_count":21090656,"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":["deep-learning","redis","redis-ai","redisai"],"created_at":"2024-11-14T14:09:06.192Z","updated_at":"2025-04-11T07:59:53.127Z","avatar_url":"https://github.com/RedisAI.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license](https://img.shields.io/github/license/RediSearch/redisearch-go.svg)](https://github.com/RedisAI/redisai-go)\n[![CircleCI](https://circleci.com/gh/RedisAI/redisai-go/tree/master.svg?style=svg)](https://circleci.com/gh/RedisAI/redisai-go/tree/master)\n[![GitHub issues](https://img.shields.io/github/release/RedisAI/redisai-go.svg)](https://github.com/RedisAI/redisai-go/releases/latest)\n[![Codecov](https://codecov.io/gh/RedisAI/redisai-go/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisAI/redisai-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/RedisAI/redisai-go)](https://goreportcard.com/report/github.com/RedisAI/redisai-go)\n[![GoDoc](https://godoc.org/github.com/RedisAI/redisai-go?status.svg)](https://godoc.org/github.com/RedisAI/redisai-go)\n\n# RedisAI Go Client\n[![Forum](https://img.shields.io/badge/Forum-RedisAI-blue)](https://forum.redislabs.com/c/modules/redisai)\n[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/rTQm7UZ)\n\nGo client for [RedisAI](http://redisai.io), based on redigo.\n\n# Installing \n\n```sh\ngo get github.com/RedisAI/redisai-go/redisai\n```\n\n# Supported RedisAI Commands\n\n| Command | Recommended API and godoc  |\n| :---          |  ----: |\nAI.TENSORSET | [TensorSet](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.TensorSet) and [TensorSetFromTensor](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.TensorSetFromTensor)\nAI.TENSORGET | [TensorGet](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.TensorGet) and [TensorGetToTensor](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.TensorGetToTensor)\nAI.MODELSET | [ModelSet](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ModelSet) and [ModelSetFromModel](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ModelSetFromModel)\nAI.MODELGET | [ModelGet](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ModelGet) and [ModelGetToModel](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ModelGetToModel)\nAI.MODELDEL | [ModelDel](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ModelDel)\nAI.MODELRUN | [ModelRun](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ModelRun)\nAI._MODELSCAN |  \nAI.SCRIPTSET | [ScriptSet](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ScriptSet)\nAI.SCRIPTGET | [ScriptGet](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ScriptGet)\nAI.SCRIPTDEL | [ScriptDel](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ScriptDel)\nAI.SCRIPTRUN | [ScriptRun](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.ScriptRun)\nAI._SCRIPTSCAN |  \nAI.DAGRUN | [DagRun](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.DagRun)\nAI.DAGRUN_RO | [DagRunRO](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.DagRunRO)\nAI.INFO |  [Info](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.Info)\nAI.CONFIG * | [LoadBackend](https://godoc.org/github.com/RedisAI/redisai-go/redisai#Client.LoadBackend)\n\n\n# Usage Examples\nSee the [examples](./examples) folder for further feature samples:\n\n## Simple Client \n[(sample code here)](./examples/redisai_simple_client)\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/RedisAI/redisai-go/redisai\"\n\t\"log\"\n)\n\nfunc main() {\n\n\t// Create a client.\n\tclient := redisai.Connect(\"redis://localhost:6379\", nil)\n\n\t// Set a tensor\n\t// AI.TENSORSET foo FLOAT 2 2 VALUES 1.1 2.2 3.3 4.4\n\t_ = client.TensorSet(\"foo\", redisai.TypeFloat, []int64{2, 2}, []float32{1.1, 2.2, 3.3, 4.4})\n\n\t// Get a tensor content as a slice of values\n\t// dt DataType, shape []int, data interface{}, err error\n\t// AI.TENSORGET foo VALUES\n\t_, _, fooTensorValues, err := client.TensorGetValues(\"foo\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(fooTensorValues)\n\t// Output: [1.1 2.2 3.3 4.4]\n}\n```\n\n## Pipelined Client \n[(sample code here)](./examples/redisai_pipelined_client)\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/RedisAI/redisai-go/redisai\"\n\t\"log\"\n)\n\nfunc main() {\n\n\t// Create a client.\n\tclient := redisai.Connect(\"redis://localhost:6379\", nil)\n\n\t// Enable pipeline of commands on the client.\n\tclient.Pipeline(3)\n\n\t// Set a tensor\n\t// AI.TENSORSET foo FLOAT 2 2 VALUES 1.1 2.2 3.3 4.4\n\terr := client.TensorSet(\"foo1\", redisai.TypeFloat, []int64{2, 2}, []float32{1.1, 2.2, 3.3, 4.4})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// AI.TENSORSET foo2 FLOAT 1\" 1 VALUES 1.1\n\terr = client.TensorSet(\"foo2\", redisai.TypeFloat, []int64{1, 1}, []float32{1.1})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// AI.TENSORGET foo2 META\n\t_, err = client.TensorGet(\"foo2\", redisai.TensorContentTypeMeta)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// Ignore the AI.TENSORSET Reply\n\t_, err = client.Receive()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// Ignore the AI.TENSORSET Reply\n\t_, err = client.Receive()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfoo2TensorMeta, err := client.Receive()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(foo2TensorMeta)\n\t// Output: [FLOAT [1 1]]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisai%2Fredisai-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredisai%2Fredisai-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisai%2Fredisai-go/lists"}