Name | neurostore JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | A package for storing and managing LLM queries. |
upload_time | 2024-09-04 20:43:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | == Neurostore License (MIT) == MIT License Copyright (c) [2024] [Kunal Kapur] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
openai
milvus
vector database
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Neurostore
This package serves as a way to 'cache' previous queries from LLMs to reduce the number of API calls necessary by using Milvus vector databases.
A user can use their choice of embedding model from OpenAI to small Albert models that can be run locally. This allows for more optimized storage and more efficient search when finding previous queries/answers
## Getting started
```bash
pip install neurostore
```
### Configure your environment variables for you desired LLM
(e.g
```bash
export OPENAI_API_KEY=....
```
#### Store an run as you would normally
Query your desired LLM as you normally would
```python
cache = Neurostore()
my_message = [
{
"role": "system",
"content": "Put something about fish at the beginning of each prompt",
},
{"role": "user", "content": "Tell me about birds"},
]
cache.create(messages=my_message, store=True, model="gpt-3.5-turbo-1106",temperature=0.5)
print(cache.query(messages=my_message, num_results=2))
```
## Diagram

Raw data
{
"_id": null,
"home_page": null,
"name": "neurostore",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "Kunal Kapur <kunalkapur888@gmail.com>",
"keywords": "openAI, milvus, vector database",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/d9/78/d191031cf2f36f4f491fa73a791595be27f1c47839b17866ce193daddafe/neurostore-1.0.0.tar.gz",
"platform": null,
"description": "# Neurostore\n\nThis package serves as a way to 'cache' previous queries from LLMs to reduce the number of API calls necessary by using Milvus vector databases. \nA user can use their choice of embedding model from OpenAI to small Albert models that can be run locally. This allows for more optimized storage and more efficient search when finding previous queries/answers\n\n\n## Getting started \n```bash\npip install neurostore\n```\n### Configure your environment variables for you desired LLM \n(e.g \n```bash\n export OPENAI_API_KEY=....\n```\n\n#### Store an run as you would normally \nQuery your desired LLM as you normally would\n```python\n\ncache = Neurostore()\nmy_message = [\n {\n \"role\": \"system\",\n \"content\": \"Put something about fish at the beginning of each prompt\",\n },\n {\"role\": \"user\", \"content\": \"Tell me about birds\"},\n]\ncache.create(messages=my_message, store=True, model=\"gpt-3.5-turbo-1106\",temperature=0.5)\nprint(cache.query(messages=my_message, num_results=2))\n```\n\n\n## Diagram\n\n\n",
"bugtrack_url": null,
"license": "== Neurostore License (MIT) == MIT License Copyright (c) [2024] [Kunal Kapur] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A package for storing and managing LLM queries.",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/kunal-kapur/neurostore"
},
"split_keywords": [
"openai",
" milvus",
" vector database"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f8438b1921a52f35afd9563579954e3094c7f48d53f4280574c840ff29d9e4ba",
"md5": "10e5dffb114970508966cd959851a25e",
"sha256": "1af086420e95b965f3d040f07661feea6638dbe1d8f32da5fb8b57bb3523c791"
},
"downloads": -1,
"filename": "neurostore-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "10e5dffb114970508966cd959851a25e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 7719,
"upload_time": "2024-09-04T20:43:11",
"upload_time_iso_8601": "2024-09-04T20:43:11.550736Z",
"url": "https://files.pythonhosted.org/packages/f8/43/8b1921a52f35afd9563579954e3094c7f48d53f4280574c840ff29d9e4ba/neurostore-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d978d191031cf2f36f4f491fa73a791595be27f1c47839b17866ce193daddafe",
"md5": "ce4ec0dcb8c77b1572f687ac8f1038bb",
"sha256": "de4f313cb5a104875d25f386df7d2302d3120c49791a3ea3843312e0e525c6ea"
},
"downloads": -1,
"filename": "neurostore-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "ce4ec0dcb8c77b1572f687ac8f1038bb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 9086,
"upload_time": "2024-09-04T20:43:12",
"upload_time_iso_8601": "2024-09-04T20:43:12.417258Z",
"url": "https://files.pythonhosted.org/packages/d9/78/d191031cf2f36f4f491fa73a791595be27f1c47839b17866ce193daddafe/neurostore-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-04 20:43:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kunal-kapur",
"github_project": "neurostore",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "neurostore"
}