Text Completion
Invoke a LLM response using an input with system
and prompt
text strings.
- curl
- Python
curl http://localhost:8088/api/v1/text-completion \
--header "content-type: application/json" \
--data \
'{
"system": "Respond in French. Use long word, form of numbers, no digits",
"prompt": "Add 12 and 14, and then make a poem about llamas which incorporates that number. Then write a joke about llamas"
}'
Install the TrustGraph
SDK:
pip install trustgraph-cli
import trustgraph.api as tg
client = tg.Api()
response = client.text_completion("Respond in French. Use long word, form of numbers, no digits", "Add 12 and 14, and then make a poem about llamas which incorporates that number. Then write a joke about llamas")
print(response)