Skip to main content

GoodMem integration for HoneyHive.

Project description

honeyhive-goodmem

GoodMem integration for HoneyHive.

This package wraps the GoodMem REST API with a Python client whose every operation is decorated with HoneyHive's @trace, so calls show up as spans in the active HoneyHive session. The operation shapes mirror the reference GoodMem integration so behavior is identical across frameworks.

Installation

pip install honeyhive-goodmem

For local development:

pip install -e .

Quickstart

from honeyhive import HoneyHiveTracer
from honeyhive_goodmem import GoodMemClient, GoodMemConfig

HoneyHiveTracer.init(api_key="hh_...", project="my-project")

client = GoodMemClient(
    GoodMemConfig(
        base_url="https://localhost:8080",
        api_key="gm_xxxxxxxxxxxxxxxxxxxxxxxx",
        verify_ssl=False,  # self-signed local server
    )
)

embedders = client.list_embedders()
embedder_id = embedders["embedders"][0]["embedder_id"]

space = client.create_space(name="quickstart", embedder_id=embedder_id)
space_id = space["space_id"]

client.create_memory(
    space_id=space_id,
    text_content="The capital of France is Paris.",
)

results = client.retrieve_memories(
    query="What is the capital of France?",
    space_ids=[space_id],
    max_results=3,
)
print(results)

Available operations

GoodMemClient exposes the following 11 traced methods, matching the reference GoodMem integration:

Method Description
list_embedders List embedder models available on the server
list_spaces List all spaces accessible to the API key
get_space Fetch a space by ID
create_space Create a space (idempotent by name)
update_space Update a space's name / labels / public-read flag
delete_space Delete a space
create_memory Store text or a file as a memory
list_memories List memories in a space
retrieve_memories Semantic retrieval, with optional reranker / LLM
get_memory Fetch a memory by ID (with original content)
delete_memory Delete a memory

Retrieval options

GoodMemClient.retrieve_memories accepts the GoodMem post-processor parameters:

Parameter Type Description
reranker_id UUID Reranker model to improve result ordering
llm_id UUID LLM used to generate a contextual abstract reply
relevance_threshold 0–1 Minimum score for including a result
llm_temperature 0–2 Creativity for the LLM post-processor
max_results int Cap on returned chunks
chronological_resort bool Reorder results by memory creation time

License

MIT

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

honeyhive_goodmem-0.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

honeyhive_goodmem-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: honeyhive_goodmem-0.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for honeyhive_goodmem-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8f9140228d96a48cd4a299b9a22f5d6a5630c3123d2551cd5ad4ec6fa1f1ecd7
MD5 5fc250a5c2e38f1003c8cdb9235a1ad9
BLAKE2b-256 e8fafff4b41d1bd4b2f1f63144fb68341fc9f844bf9cd154e1553ea1b569058d

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeyhive_goodmem-0.1.0.tar.gz:

Publisher: publish.yml on PAIR-Systems-Inc/goodmem_honeyhive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for honeyhive_goodmem-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fde45077ad7650cf5b4176e44a46f9566228f2645d99322d630c145e1d2f23ee
MD5 99abd78c682b1cb4f61ff21f1da6da84
BLAKE2b-256 862b23a2ae1d6156ebc636cc1495fbf068b7dceafaff3e21f3ea2066d5f31c73

See more details on using hashes here.

Provenance

The following attestation bundles were made for honeyhive_goodmem-0.1.0-py3-none-any.whl:

Publisher: publish.yml on PAIR-Systems-Inc/goodmem_honeyhive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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