{"id":13633296,"url":"https://github.com/awa-ai/awadb","last_synced_at":"2025-04-05T17:04:31.268Z","repository":{"id":167376444,"uuid":"642912355","full_name":"awa-ai/awadb","owner":"awa-ai","description":"AI Native database for embedding vectors","archived":false,"fork":false,"pushed_at":"2024-01-11T14:00:38.000Z","size":4332,"stargazers_count":159,"open_issues_count":4,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-17T13:42:47.554Z","etag":null,"topics":["ai-native","aigc","chatgpt","embedding-vectors","llm","vectordb"],"latest_commit_sha":null,"homepage":"https://ljeagle.github.io/awadb","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awa-ai.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":"ROADMAP.md","authors":null}},"created_at":"2023-05-19T16:22:02.000Z","updated_at":"2024-05-15T09:04:59.000Z","dependencies_parsed_at":"2024-01-14T08:55:13.481Z","dependency_job_id":"86a59930-051a-448f-8c76-8356053d02ec","html_url":"https://github.com/awa-ai/awadb","commit_stats":null,"previous_names":["awa-ai/awadb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awa-ai%2Fawadb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awa-ai%2Fawadb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awa-ai%2Fawadb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awa-ai%2Fawadb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awa-ai","download_url":"https://codeload.github.com/awa-ai/awadb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369953,"owners_count":20927928,"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-native","aigc","chatgpt","embedding-vectors","llm","vectordb"],"created_at":"2024-08-01T23:00:32.869Z","updated_at":"2025-04-05T17:04:31.246Z","avatar_url":"https://github.com/awa-ai.png","language":"C++","funding_links":[],"categories":["Search"],"sub_categories":["Vector search"],"readme":"# AwaDB - AI Native Database for embedding vectors\n\nEasily Use - No boring database schema definition. No need to pay attention to vector indexing details.  \n\nRealtime Search - Lock free realtime index keeps new data fresh with millisecond level latency. No wait no manual operation.  \n\nStability - AwaDB builds upon over 5 years experience running production workloads at scale using a system called [Vearch](https://github.com/vearch/vearch), combined with best-of-breed ideas and practices from the community.\n\n## Run awadb locally on Mac OSX or Linux\n\nFirst install awadb:\n```bash\npip3 install awadb\n```\n\nThen use as below:\n```bash\nimport awadb\n# 1. Initialize awadb client!\nawadb_client = awadb.Client()\n\n# 2. Create table\nawadb_client.Create(\"test_llm1\") \n\n# 3. Add sentences, the sentence is embedded with SentenceTransformer by default\n#    You can also embed the sentences all by yourself with OpenAI or other LLMs\nawadb_client.Add([{'embedding_text':'The man is happy'}, {'source' : 'pic1'}])\nawadb_client.Add([{'embedding_text':'The man is very happy'}, {'source' : 'pic2'}])\nawadb_client.Add([{'embedding_text':'The cat is happy'}, {'source' : 'pic3'}])\nawadb_client.Add([{'embedding_text':'The man is eating'}, {'source':'pic4'}])\n\n# 4. Search the most Top3 sentences by the specified query\nquery = \"The man is happy\"\nresults = awadb_client.Search(query, 3)\n\n# Output the results\nprint(results)\n```\nHere the text is embedded by SentenceTransformer which is supported by [Hugging Face](https://huggingface.co)  \nMore detailed python local library usage you can read [here](https://ljeagle.github.io/awadb/)\n\n## Run AwaDB as a service \nIf you are on the Windows platform or want a awadb service, you can download and deploy the awadb docker.\nThe installation of awadb docker please see [here](https://github.com/awa-ai/awadb/tree/main/docs/source/docker_deploy.md)\n\n- Python Usage\n\nFirst, Install gRPC and awadb service python client as below:\n\n```bash\npip3 install grpcio\npip3 install awadb-client\n```\n\nA simple example as below:\n\n```bash\n# Import the package and module\nfrom awadb_client import Awa\n\n# Initialize awadb client\nclient = Awa()\n\n# Add dict with vector to table 'example1'\nclient.add(\"example1\", {'name':'david', 'feature':[1.3, 2.5, 1.9]})\nclient.add(\"example1\", {'name':'jim', 'feature':[1.1, 1.4, 2.3]})\n\n# Search\nresults = client.search(\"example1\", [1.0, 2.0, 3.0])\n\n# Output results\nprint(results)\n\n# '_id' is the primary key of each document\n# It can be specified clearly when adding documents\n# Here no field '_id' is specified, it is generated by the awadb server \ndb_name: \"default\"\ntable_name: \"example1\"\nresults {\n  total: 2\n  msg: \"Success\"\n  result_items {\n    score: 0.860000074\n    fields {\n      name: \"_id\" \n      value: \"64ddb69d-6038-4311-9118-605686d758d9\"\n    }\n    fields {\n      name: \"name\"\n      value: \"jim\"\n    }\n  }\n  result_items {\n    score: 1.55\n    fields {\n      name: \"_id\"\n      value: \"f9f3035b-faaf-48d4-a947-801416c005b3\"\n    }\n    fields {\n      name: \"name\"\n      value: \"david\"\n    }\n  }\n}\nresult_code: SUCCESS\n```\nMore python sdk for service is [here](https://ljeagle.github.io/awadb/)  \n\n- RESTful Usage\n```bash\n# add documents to table 'test' of db 'default', no need to create table first\ncurl -H \"Content-Type: application/json\" -X POST -d '{\"db\":\"default\", \"table\":\"test\", \"docs\":[{\"_id\":1, \"name\":\"lj\", \"age\":23, \"f\":[1,0]},{\"_id\":2, \"name\":\"david\", \"age\":32, \"f\":[1,2]}]}' http://localhost:8080/add\n\n# search documents by the vector field 'f' of the value '[1, 1]'\ncurl -H \"Content-Type: application/json\" -X POST -d '{\"db\":\"default\", \"table\":\"test\", \"vector_query\":{\"f\":[1, 1]}}' http://localhost:8080/search\n```\nMore detailed RESTful API is [here](https://github.com/awa-ai/awadb/tree/main/docs/source/restful_tutorial.md)\n\n\n## What are the Embeddings?\n\nAny unstructured data(image/text/audio/video) can be transferred to vectors which are generally understanded by computers through AI(LLMs or other deep neural networks).   \n  \nFor example, \"The man is happy\"-this sentence can be transferred to a 384-dimension vector(a list of numbers `[0.23, 1.98, ....]`) by SentenceTransformer language model. This process is called embedding.\n\nMore detailed information about embeddings can be read from [OpenAI](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings)\n\nAwadb uses [Sentence Transformers](https://huggingface.co/sentence-transformers) to embed the sentence by default, while you can also use OpenAI or other LLMs to do the embeddings according to your needs.\n\n\n\n## Get involved\n\n- [Issues and PR](https://github.com/awa-ai/awadb/issues)  \n- [Roadmap and Contribution](https://github.com/awa-ai/awadb/blob/main/ROADMAP.md)\n\n\n## License\n\n[Apache 2.0](./LICENSE)\n\n\n## Community\n\nJoin the AwaDB community to share any problem, suggestion, or discussion with us:\n\n- [Discord](https://discord.gg/GP7QxRrDjB)\n- [Slack](https://awadbhq.slack.com)\n- [Reddit](https://www.reddit.com/r/Awadb/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawa-ai%2Fawadb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawa-ai%2Fawadb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawa-ai%2Fawadb/lists"}