MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / chat

Method chat

web/pgadmin/llm/client.py:52–76  ·  view source on GitHub ↗

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
    )

Source from the content-addressed store, hash-verified

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,

Callers 4

chat_streamMethod · 0.95
validate_connectionMethod · 0.95
generateFunction · 0.45
chat_with_databaseFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected