Skip to content

Commit

Permalink
fix: default client initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Jan 4, 2025
1 parent b30f3e2 commit faa0da4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mcpx/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ChatConfig:
Stores configuration and session for chats
"""

client: Client = Client()
client: Client | None = None
"""
mcp.run client
"""
Expand Down Expand Up @@ -166,6 +166,8 @@ def __init__(self, config: ChatConfig | None = None):
self.messages = []
self.tools = []
self.config = config or ChatConfig()
if self.config.client is None:
self.config.client = Client()
if self.config.model is None:
self.config.model = self._default_model()
if self.config.provider_client is not None:
Expand Down

0 comments on commit faa0da4

Please sign in to comment.