mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-19 10:11:01 +02:00
Prompt template working
This commit is contained in:
parent
44b1d7e508
commit
b110af41fb
15 changed files with 380 additions and 526 deletions
|
|
@ -3,13 +3,18 @@
|
|||
import pulsar
|
||||
from trustgraph.clients.prompt_client import PromptClient
|
||||
|
||||
p = PromptClient(pulsar_host="pulsar://localhost:6650")
|
||||
p = PromptClient(
|
||||
pulsar_host="pulsar://localhost:6650",
|
||||
input_queue="non-persistent://tg/request/prompt:default",
|
||||
output_queue="non-persistent://tg/response/prompt:default",
|
||||
subscriber="test1",
|
||||
)
|
||||
|
||||
question = """What is the square root of 16?"""
|
||||
|
||||
resp = p.request(
|
||||
id="question",
|
||||
terms = {
|
||||
variables = {
|
||||
"question": question
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue