Ask a single question about the database. This is a convenience function for one-shot questions without maintaining conversation history. Args: question: The question to ask sid: Server ID did: Database ID provider: Optional LLM provider override
(
question: str,
sid: int,
did: int,
provider: Optional[str] = None,
model: Optional[str] = None
)
| 267 | |
| 268 | |
| 269 | def single_query( |
| 270 | question: str, |
| 271 | sid: int, |
| 272 | did: int, |
| 273 | provider: Optional[str] = None, |
| 274 | model: Optional[str] = None |
| 275 | ) -> str: |
| 276 | """ |
| 277 | Ask a single question about the database. |
| 278 | |
| 279 | This is a convenience function for one-shot questions without |
| 280 | maintaining conversation history. |
| 281 | |
| 282 | Args: |
| 283 | question: The question to ask |
| 284 | sid: Server ID |
| 285 | did: Database ID |
| 286 | provider: Optional LLM provider override |
| 287 | model: Optional model override |
| 288 | |
| 289 | Returns: |
| 290 | The LLM's response text |
| 291 | |
| 292 | Raises: |
| 293 | LLMClientError: If the LLM request fails |
| 294 | RuntimeError: If LLM is not available |
| 295 | """ |
| 296 | response, _ = chat_with_database( |
| 297 | user_message=question, |
| 298 | sid=sid, |
| 299 | did=did, |
| 300 | provider=provider, |
| 301 | model=model |
| 302 | ) |
| 303 | return response |
nothing calls this directly
no test coverage detected