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.2.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.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neurostore-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 e69c0d4677a962c9558e03b4affe897acde8bef6392dd5e3a5f6afb2392dbe38
MD5 f066ba8afccea216032146c21eca2c15
BLAKE2b-256 2883efb71707c90df81586cd541fcda5e9bfd248656969b37c98f3d670389433

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neurostore-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 706b702d90fd38952a6c4ae1c0962d5f1014367048465561a0ede7364e4ee2ff
MD5 efdf26f5af9483ba579aa1c174945abe
BLAKE2b-256 dfdd2d1603b205f7b6542e367c68326319d1a874585818d3663adea150a4eb7d

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