Send a chat request to the LLM. Args: messages: List of conversation messages. tools: Optional list of tools the LLM can use. system_prompt: Optional system prompt to set context. max_tokens: Maximum tokens in the response.
(
self,
messages: list[Message],
tools: Optional[list[Tool]] = None,
system_prompt: Optional[str] = None,
max_tokens: int = 4096,
**kwargs
)
| 50 | |
| 51 | @abstractmethod |
| 52 | def chat( |
| 53 | self, |
| 54 | messages: list[Message], |
| 55 | tools: Optional[list[Tool]] = None, |
| 56 | system_prompt: Optional[str] = None, |
| 57 | max_tokens: int = 4096, |
| 58 | **kwargs |
| 59 | ) -> LLMResponse: |
| 60 | """ |
| 61 | Send a chat request to the LLM. |
| 62 | |
| 63 | Args: |
| 64 | messages: List of conversation messages. |
| 65 | tools: Optional list of tools the LLM can use. |
| 66 | system_prompt: Optional system prompt to set context. |
| 67 | max_tokens: Maximum tokens in the response. |
| 68 | **kwargs: Additional provider-specific parameters. |
| 69 | |
| 70 | Returns: |
| 71 | LLMResponse containing the model's response. |
| 72 | |
| 73 | Raises: |
| 74 | LLMError: If the request fails. |
| 75 | """ |
| 76 | pass |
| 77 | |
| 78 | def chat_stream( |
| 79 | self, |
no outgoing calls
no test coverage detected