Skip to main content

A package for storing and managing LLM queries.

Project description

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

pip install neurostore

Configure your environment variables for you desired LLM

(e.g

  export OPENAI_API_KEY=....

Store an run as you would normally

Query your desired LLM as you normally would

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

neurostore

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neurostore-1.0.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neurostore-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file neurostore-1.0.0.tar.gz.

File metadata

  • Download URL: neurostore-1.0.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for neurostore-1.0.0.tar.gz
Algorithm Hash digest
SHA256 de4f313cb5a104875d25f386df7d2302d3120c49791a3ea3843312e0e525c6ea
MD5 ce4ec0dcb8c77b1572f687ac8f1038bb
BLAKE2b-256 d978d191031cf2f36f4f491fa73a791595be27f1c47839b17866ce193daddafe

See more details on using hashes here.

File details

Details for the file neurostore-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: neurostore-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for neurostore-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1af086420e95b965f3d040f07661feea6638dbe1d8f32da5fb8b57bb3523c791
MD5 10e5dffb114970508966cd959851a25e
BLAKE2b-256 f8438b1921a52f35afd9563579954e3094c7f48d53f4280574c840ff29d9e4ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page