mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
18 lines
422 B
Python
Executable file
18 lines
422 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import pulsar
|
|
from trustgraph.clients.embeddings_client import EmbeddingsClient
|
|
|
|
embed = EmbeddingsClient(
|
|
pulsar_host="pulsar://pulsar:6650",
|
|
input_queue="non-persistent://tg/request/embeddings:default",
|
|
output_queue="non-persistent://tg/response/embeddings:default",
|
|
subscriber="test1",
|
|
)
|
|
|
|
prompt="Write a funny limerick about a llama"
|
|
|
|
resp = embed.request(prompt)
|
|
|
|
print(resp)
|
|
|