Plugin entry point for System Prompt Learning. Args: system_prompt: The system prompt initial_query: The user's query client: The LLM client model: The model identifier request_config: Optional request configuration Can include
(system_prompt: str, initial_query: str, client, model: str, request_config: dict = None)
| 20 | SLUG = "spl" |
| 21 | |
| 22 | def run(system_prompt: str, initial_query: str, client, model: str, request_config: dict = None) -> Tuple[str, int]: |
| 23 | """ |
| 24 | Plugin entry point for System Prompt Learning. |
| 25 | |
| 26 | Args: |
| 27 | system_prompt: The system prompt |
| 28 | initial_query: The user's query |
| 29 | client: The LLM client |
| 30 | model: The model identifier |
| 31 | request_config: Optional request configuration |
| 32 | Can include {'spl_learning': True} to enable learning mode |
| 33 | |
| 34 | Returns: |
| 35 | Tuple[str, int]: The LLM response and token count |
| 36 | """ |
| 37 | return run_spl(system_prompt, initial_query, client, model, request_config) |