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-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for neurostore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ddf916654ba31756ae9059d6990c57ba5efa874b297c385e5eed8a454a89f4c
MD5 628bd81a57478a1d0e90e15fa0215095
BLAKE2b-256 d4fd856cc97ef129f58e32060eb7ec0e870422135b825f4c1d2cb2abe7bf6443

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neurostore-0.1.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-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7487fea6b2def549325d850d4e75fe26b1056c5f2f3f61f6a7a59b98c29e0d9
MD5 f7c4ade9ceb9d12f66ebd422136b0f07
BLAKE2b-256 0ee47e160c92391eb8c87298270bd39681749d238aa049fb32aa5ae35f345da8

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