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.3.0.tar.gz (9.0 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.3.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for neurostore-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b4a3aab509d243faa0f991744140fbdd1561dde042ce85219a223a2ac8282875
MD5 15b20ca5e0a0b7778515482c672d503a
BLAKE2b-256 10c05e065bd2e619b1c10237d97af1dd5af921d5474e9d9ab09b004f658e5a5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neurostore-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b1e165c114bf9f105aa0c6a0677244f6e5c0120edd97322b198f93a131f83ff
MD5 92afeb7c150ae436cc484d0b809a488c
BLAKE2b-256 22401e6b90cd82b6dfd6009f6ede9d1b0ebe4b14debfab7989fe3eb896cc0e5d

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