aw.llm
The one place aw reaches a language model: aix first, oa only as a fallback.
Generation is routed through aix (the fleet’s LLM facade). oa stays an optional
extra (the llm extra) and is used only when aix cannot be imported, so an
install that has only oa keeps working.
>>> callable(default_chat())
True
Functions
-
aw.llm.default_chat()[source]
chat(prompt, **kwargs) -> str: aix.chat, else oa.chat.
Raises ImportError when neither is installed.
- Return type:
Callable[..., str]
-
aw.llm.default_json_function_maker()[source]
maker(template, *, json_schema) -> function: aix.prompt_to_json, else oa.prompt_json_function.
Raises ImportError when neither is installed.
- Return type:
Callable[..., Callable[..., Any]]