Skip to content

Commit 98d398f

Browse files
committed
Docstring in query_llm.py
1 parent e021896 commit 98d398f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

scripts/query_llm.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,21 @@
1313

1414

1515
def main() -> int:
16-
"""Entry point to this tool."""
16+
"""
17+
CLI entry point that sends a query to a local LLM endpoint and prints the model response.
18+
19+
Parses command-line arguments (--query, --system-prompt, --url, --timeout),
20+
POSTs a JSON payload with the query and system prompt to the configured
21+
endpoint, and prints the returned "response" value followed by the request
22+
elapsed time. Error diagnostics are printed to stderr.
23+
24+
Returns:
25+
int: Exit code where
26+
`0` indicates success,
27+
`1` indicates an HTTP/request failure,
28+
`2` indicates the server response was not valid JSON,
29+
`3` indicates the JSON response did not contain a `"response"` field.
30+
"""
1731
parser = argparse.ArgumentParser(
1832
description="Send a query to a local LLM endpoint."
1933
)

0 commit comments

Comments
 (0)