|
AQIT 0.1.0
|
Functions | |
| dict[str, Any] | parse_llm_json_object (str raw) |
| tuple[list[str], list[str]] | sentence_lists_from_llm (str raw) |
| list[str] | _as_str_list (Any value) |
| str | llm_sentence_generation_error () |
| Any | chat_json_completion (Any client, **Any kwargs) |
|
protected |
Definition at line 55 of file llm_json.py.
Referenced by sentence_lists_from_llm().
| Any chat_json_completion | ( | Any | client, |
| **Any | kwargs ) |
Chat completion preferring JSON object mode, with a plain fallback.
Definition at line 69 of file llm_json.py.
| str llm_sentence_generation_error | ( | ) |
User-facing message when LLM example generation fails.
Definition at line 61 of file llm_json.py.
| dict[str, Any] parse_llm_json_object | ( | str | raw | ) |
Extract the first JSON object from an LLM reply (handles fences and trailing text).
Definition at line 14 of file llm_json.py.
Referenced by sentence_lists_from_llm().
| tuple[list[str], list[str]] sentence_lists_from_llm | ( | str | raw | ) |
Parse positive/negative sentence lists from an LLM JSON reply.
Definition at line 45 of file llm_json.py.
References _as_str_list(), and parse_llm_json_object().