Fix/cli docs (#143)

* Improved documentation in tg-invoke-prompt.  Added tg-invoke-llm.
These are diagnostics for the text-completion and prompt services.

* Fix command name
This commit is contained in:
cybermaggedon 2024-11-07 21:01:51 +00:00 committed by GitHub
parent c308180b54
commit 66d273cf5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 73 additions and 4 deletions

View file

@ -1,7 +1,11 @@
#!/usr/bin/env python3
"""
Uses the GraphRAG service to answer a query
Invokes the LLM prompt service by specifying a prompt identifier and template
terms. The prompt identifier identifies which prompt template to use.
Standard template identifiers are: question, extract-relationship.
The prompt terms specify keyword terms in the template to be replaced, and
provide the values to replace them with.
"""
import argparse
@ -25,7 +29,7 @@ def query(pulsar_host, id, terms):
def main():
parser = argparse.ArgumentParser(
prog='tg-graph-query-rag',
prog='tg-invoke-prompt',
description=__doc__,
)
@ -38,13 +42,14 @@ def main():
parser.add_argument(
'id',
nargs=1,
help=f'Prompt identifier',
help=f'Prompt identifier e.g. question',
)
parser.add_argument(
'term',
nargs='*',
help=f'Prompt terms',
help='''Prompt template terms of the form key=value, can be specified
multiple times''',
)
args = parser.parse_args()