trustgraph/tests/test-graph-embeddings
Cyber MacGeddon ee89a5d8e6 - Added triple query using triples-query-cassandra
- Added triples_query_client.py and a test
2024-08-12 20:12:13 +01:00

22 lines
485 B
Python
Executable file

#!/usr/bin/env python3
import pulsar
from trustgraph.graph_embeddings_client import GraphEmbeddingsClient
from trustgraph.embeddings_client import EmbeddingsClient
ec = EmbeddingsClient(pulsar_host="pulsar://localhost:6650")
vectors = ec.request("What caused the space shuttle to explode?")
print(vectors)
llm = GraphEmbeddingsClient(pulsar_host="pulsar://localhost:6650")
limit=10
resp = llm.request(vectors, limit)
print("Response...")
for val in resp:
print(val.value)